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


#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <clutter-gtk/clutter-gtk.h>
#include <games-scores.h>
#include <games-pause-action.h>
#include <games-fullscreen-action.h>
#include <games-stock.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
#include <stdlib.h>
#include <string.h>
#include <games-score.h>
#include <float.h>
#include <math.h>
#include <games-controls.h>
#include <games-scores-dialog.h>
#include <locale.h>
#include <clutter/clutter.h>
#include <stdio.h>


#define TYPE_QUADRAPASSEL (quadrapassel_get_type ())
#define QUADRAPASSEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_QUADRAPASSEL, Quadrapassel))
#define QUADRAPASSEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_QUADRAPASSEL, QuadrapasselClass))
#define IS_QUADRAPASSEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_QUADRAPASSEL))
#define IS_QUADRAPASSEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_QUADRAPASSEL))
#define QUADRAPASSEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_QUADRAPASSEL, QuadrapasselClass))

typedef struct _Quadrapassel Quadrapassel;
typedef struct _QuadrapasselClass QuadrapasselClass;
typedef struct _QuadrapasselPrivate QuadrapasselPrivate;

#define TYPE_GAME (game_get_type ())
#define GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GAME, Game))
#define GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GAME, GameClass))
#define IS_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GAME))
#define IS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GAME))
#define GAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GAME, GameClass))

typedef struct _Game Game;
typedef struct _GameClass GameClass;

#define TYPE_GAME_VIEW (game_view_get_type ())
#define GAME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GAME_VIEW, GameView))
#define GAME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GAME_VIEW, GameViewClass))
#define IS_GAME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GAME_VIEW))
#define IS_GAME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GAME_VIEW))
#define GAME_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GAME_VIEW, GameViewClass))

typedef struct _GameView GameView;
typedef struct _GameViewClass GameViewClass;

#define TYPE_PREVIEW (preview_get_type ())
#define PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PREVIEW, Preview))
#define PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PREVIEW, PreviewClass))
#define IS_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PREVIEW))
#define IS_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PREVIEW))
#define PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PREVIEW, PreviewClass))

typedef struct _Preview Preview;
typedef struct _PreviewClass PreviewClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GameViewPrivate GameViewPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _GamePrivate GamePrivate;

#define TYPE_SHAPE (shape_get_type ())
#define SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHAPE, Shape))
#define SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHAPE, ShapeClass))
#define IS_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHAPE))
#define IS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHAPE))
#define SHAPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHAPE, ShapeClass))

typedef struct _Shape Shape;
typedef struct _ShapeClass ShapeClass;

#define TYPE_BLOCK (block_get_type ())
#define BLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BLOCK, Block))
#define BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BLOCK, BlockClass))
#define IS_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BLOCK))
#define IS_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BLOCK))
#define BLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BLOCK, BlockClass))

typedef struct _Block Block;
typedef struct _BlockClass BlockClass;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))

struct _Quadrapassel {
	GtkApplication parent_instance;
	QuadrapasselPrivate * priv;
};

struct _QuadrapasselClass {
	GtkApplicationClass parent_class;
};

struct _QuadrapasselPrivate {
	GSettings* settings;
	GtkWindow* main_window;
	Game* game;
	GameView* view;
	Preview* preview;
	GtkLabel* score_label;
	GtkLabel* n_destroyed_label;
	GtkLabel* level_label;
	GamesScores* high_scores;
	GSimpleAction* pause;
	GamesPauseAction* pause_action;
	GamesFullscreenAction* fullscreen_action;
	GtkDialog* preferences_dialog;
	GtkSpinButton* starting_level_spin;
	Preview* theme_preview;
	GtkSpinButton* fill_height_spinner;
	GtkSpinButton* fill_prob_spinner;
	GtkCheckButton* do_preview_toggle;
	GtkCheckButton* difficult_blocks_toggle;
	GtkCheckButton* rotate_counter_clock_wise_toggle;
	GtkCheckButton* show_shadow_toggle;
	GtkCheckButton* sound_toggle;
};

struct _GameView {
	GtkClutterEmbed parent_instance;
	GameViewPrivate * priv;
	gboolean mute;
};

struct _GameViewClass {
	GtkClutterEmbedClass parent_class;
};

struct _Game {
	GObject parent_instance;
	GamePrivate * priv;
	Shape* shape;
	Shape* next_shape;
	Block** blocks;
	gint blocks_length1;
	gint blocks_length2;
	gint n_lines_destroyed;
	gint score;
	gboolean game_over;
};

struct _GameClass {
	GObjectClass parent_class;
};


static gpointer quadrapassel_parent_class = NULL;

GType quadrapassel_get_type (void) G_GNUC_CONST;
GType game_get_type (void) G_GNUC_CONST;
GType game_view_get_type (void) G_GNUC_CONST;
GType preview_get_type (void) G_GNUC_CONST;
#define QUADRAPASSEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_QUADRAPASSEL, QuadrapasselPrivate))
enum  {
	QUADRAPASSEL_DUMMY_PROPERTY
};
static void quadrapassel_new_game_cb (Quadrapassel* self);
static void _quadrapassel_new_game_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void quadrapassel_toggle_cb (Quadrapassel* self, GSimpleAction* action, GVariant* parameter);
static void _quadrapassel_toggle_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void quadrapassel_pause_changed (Quadrapassel* self, GSimpleAction* action, GVariant* state);
static void _quadrapassel_pause_changed_gsimple_action_change_state_callback (GSimpleAction* action, GVariant* value, gpointer self);
static void quadrapassel_scores_cb (Quadrapassel* self);
static void _quadrapassel_scores_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void quadrapassel_preferences_cb (Quadrapassel* self);
static void _quadrapassel_preferences_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void quadrapassel_help_cb (Quadrapassel* self);
static void _quadrapassel_help_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void quadrapassel_about_cb (Quadrapassel* self);
static void _quadrapassel_about_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void quadrapassel_quit_cb (Quadrapassel* self);
static void _quadrapassel_quit_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _quadrapassel_new_game_cb_gtk_action_callback (GtkAction* action, gpointer self);
Quadrapassel* quadrapassel_new (void);
Quadrapassel* quadrapassel_construct (GType object_type);
static void quadrapassel_real_startup (GApplication* base);
static gboolean quadrapassel_key_press_event_cb (Quadrapassel* self, GtkWidget* widget, GdkEventKey* event);
static gboolean _quadrapassel_key_press_event_cb_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
static gboolean quadrapassel_key_release_event_cb (Quadrapassel* self, GtkWidget* widget, GdkEventKey* event);
static gboolean _quadrapassel_key_release_event_cb_gtk_widget_key_release_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
GameView* game_view_new (void);
GameView* game_view_construct (GType object_type);
void game_view_set_theme (GameView* self, const gchar* value);
void game_view_set_show_shadow (GameView* self, gboolean value);
Game* game_new (gint lines, gint columns, gint starting_level, gint filled_lines, gint fill_prob, gboolean pick_difficult_blocks);
Game* game_construct (GType object_type, gint lines, gint columns, gint starting_level, gint filled_lines, gint fill_prob, gboolean pick_difficult_blocks);
void game_view_set_game (GameView* self, Game* value);
static void quadrapassel_pause_cb (Quadrapassel* self);
static void _quadrapassel_pause_cb_games_pause_action_state_changed (GamesPauseAction* _sender, gpointer self);
Preview* preview_new (void);
Preview* preview_construct (GType object_type);
void preview_set_theme (Preview* self, const gchar* value);
void preview_set_enabled (Preview* self, gboolean value);
static void _vala_GamesScoresCategory_array_free (GamesScoresCategory* array, gint array_length);
static GVariant* _variant_new1 (gboolean value);
static void quadrapassel_real_shutdown (GApplication* base);
gpointer shape_ref (gpointer instance);
void shape_unref (gpointer instance);
GParamSpec* param_spec_shape (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_shape (GValue* value, gpointer v_object);
void value_take_shape (GValue* value, gpointer v_object);
gpointer value_get_shape (const GValue* value);
GType shape_get_type (void) G_GNUC_CONST;
gpointer block_ref (gpointer instance);
void block_unref (gpointer instance);
GParamSpec* param_spec_block (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_block (GValue* value, gpointer v_object);
void value_take_block (GValue* value, gpointer v_object);
gpointer value_get_block (const GValue* value);
GType block_get_type (void) G_GNUC_CONST;
static void quadrapassel_real_activate (GApplication* base);
static void quadrapassel_preferences_dialog_close_cb (Quadrapassel* self);
static void quadrapassel_preferences_dialog_response_cb (Quadrapassel* self, gint response_id);
static void _quadrapassel_preferences_dialog_close_cb_gtk_dialog_close (GtkDialog* _sender, gpointer self);
static void _quadrapassel_preferences_dialog_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
gint game_get_height (Game* self);
static void quadrapassel_fill_height_spinner_value_changed_cb (Quadrapassel* self, GtkSpinButton* spin);
static void _quadrapassel_fill_height_spinner_value_changed_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self);
static void quadrapassel_fill_prob_spinner_value_changed_cb (Quadrapassel* self, GtkSpinButton* spin);
static void _quadrapassel_fill_prob_spinner_value_changed_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self);
static void quadrapassel_starting_level_value_changed_cb (Quadrapassel* self, GtkSpinButton* spin);
static void _quadrapassel_starting_level_value_changed_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self);
static void quadrapassel_sound_toggle_toggled_cb (Quadrapassel* self);
static void _quadrapassel_sound_toggle_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void quadrapassel_do_preview_toggle_toggled_cb (Quadrapassel* self);
static void _quadrapassel_do_preview_toggle_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void quadrapassel_difficult_blocks_toggled_cb (Quadrapassel* self);
static void _quadrapassel_difficult_blocks_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void quadrapassel_set_rotate_counter_clock_wise (Quadrapassel* self);
static void _quadrapassel_set_rotate_counter_clock_wise_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void quadrapassel_user_target_toggled_cb (Quadrapassel* self);
static void _quadrapassel_user_target_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void quadrapassel_theme_combo_changed_cb (Quadrapassel* self, GtkComboBox* widget);
static void _quadrapassel_theme_combo_changed_cb_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
void preview_set_game (Preview* self, Game* value);
static gboolean _variant_get2 (GVariant* value);
static GVariant* _variant_new3 (gboolean value);
static gboolean _variant_get4 (GVariant* value);
void game_set_paused (Game* self, gboolean value);
static GVariant* _variant_new5 (gboolean value);
static guint quadrapassel_upper_key (Quadrapassel* self, guint keyval);
gboolean game_get_paused (Game* self);
gboolean game_move_left (Game* self);
gboolean game_move_right (Game* self);
gboolean game_rotate_left (Game* self);
gboolean game_rotate_right (Game* self);
void game_set_fast_forward (Game* self, gboolean enable);
void game_drop (Game* self);
static void quadrapassel_new_game (Quadrapassel* self);
void game_stop (Game* self);
static void quadrapassel_shape_landed_cb (Quadrapassel* self, gint* lines, int lines_length1, GList* line_blocks);
static void _quadrapassel_shape_landed_cb_game_shape_landed (Game* _sender, gint* lines, int lines_length1, GList* line_blocks, gpointer self);
static void quadrapassel_complete_cb (Quadrapassel* self);
static void _quadrapassel_complete_cb_game_complete (Game* _sender, gpointer self);
void game_start (Game* self);
static void quadrapassel_update_score (Quadrapassel* self);
gint game_get_level (Game* self);
gint quadrapassel_main (gchar** args, int args_length1);
static void quadrapassel_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);

static const GActionEntry QUADRAPASSEL_action_entries[7] = {{"new-game", _quadrapassel_new_game_cb_gsimple_action_activate_callback}, {"pause", _quadrapassel_toggle_cb_gsimple_action_activate_callback, NULL, "false", _quadrapassel_pause_changed_gsimple_action_change_state_callback}, {"scores", _quadrapassel_scores_cb_gsimple_action_activate_callback}, {"preferences", _quadrapassel_preferences_cb_gsimple_action_activate_callback}, {"help", _quadrapassel_help_cb_gsimple_action_activate_callback}, {"about", _quadrapassel_about_cb_gsimple_action_activate_callback}, {"quit", _quadrapassel_quit_cb_gsimple_action_activate_callback}};
static const GtkActionEntry QUADRAPASSEL_actions[1] = {{"NewGame", GAMES_STOCK_NEW_GAME, NULL, NULL, NULL, (GCallback) _quadrapassel_new_game_cb_gtk_action_callback}};

static void _quadrapassel_new_game_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	quadrapassel_new_game_cb (self);
}


static void _quadrapassel_toggle_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	quadrapassel_toggle_cb (self, action, parameter);
}


static void _quadrapassel_pause_changed_gsimple_action_change_state_callback (GSimpleAction* action, GVariant* value, gpointer self) {
	quadrapassel_pause_changed (self, action, value);
}


static void _quadrapassel_scores_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	quadrapassel_scores_cb (self);
}


static void _quadrapassel_preferences_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	quadrapassel_preferences_cb (self);
}


static void _quadrapassel_help_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	quadrapassel_help_cb (self);
}


static void _quadrapassel_about_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	quadrapassel_about_cb (self);
}


static void _quadrapassel_quit_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	quadrapassel_quit_cb (self);
}


static void _quadrapassel_new_game_cb_gtk_action_callback (GtkAction* action, gpointer self) {
	quadrapassel_new_game_cb (self);
}


Quadrapassel* quadrapassel_construct (GType object_type) {
	Quadrapassel * self = NULL;
	self = (Quadrapassel*) g_object_new (object_type, "application-id", "org.gnome.quadrapassel", "flags", G_APPLICATION_FLAGS_NONE, NULL);
	return self;
}


Quadrapassel* quadrapassel_new (void) {
	return quadrapassel_construct (TYPE_QUADRAPASSEL);
}


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


static gboolean _quadrapassel_key_press_event_cb_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
	gboolean result;
	result = quadrapassel_key_press_event_cb (self, _sender, event);
	return result;
}


static gboolean _quadrapassel_key_release_event_cb_gtk_widget_key_release_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
	gboolean result;
	result = quadrapassel_key_release_event_cb (self, _sender, event);
	return result;
}


static void _quadrapassel_pause_cb_games_pause_action_state_changed (GamesPauseAction* _sender, gpointer self) {
	quadrapassel_pause_cb (self);
}


static void _vala_GamesScoresCategory_array_free (GamesScoresCategory* array, gint array_length) {
	if (array != NULL) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			 (&array[i]);
		}
	}
	g_free (array);
}


static GVariant* _variant_new1 (gboolean value) {
	return g_variant_ref_sink (g_variant_new_boolean (value));
}


static void quadrapassel_real_startup (GApplication* base) {
	Quadrapassel * self;
	GAction* _tmp0_ = NULL;
	GSimpleAction* _tmp1_;
	GMenu* _tmp2_;
	GMenu* menu;
	GMenu* _tmp3_;
	GMenu* section;
	GMenu* _tmp4_;
	GMenu* _tmp5_;
	const gchar* _tmp6_ = NULL;
	GMenu* _tmp7_;
	const gchar* _tmp8_ = NULL;
	GMenu* _tmp9_;
	const gchar* _tmp10_ = NULL;
	GMenu* _tmp11_;
	const gchar* _tmp12_ = NULL;
	GMenu* _tmp13_;
	GMenu* _tmp14_;
	GMenu* _tmp15_;
	const gchar* _tmp16_ = NULL;
	GMenu* _tmp17_;
	const gchar* _tmp18_ = NULL;
	GMenu* _tmp19_;
	GMenu* _tmp20_;
	GMenu* _tmp21_;
	const gchar* _tmp22_ = NULL;
	GSettings* _tmp23_;
	GtkApplicationWindow* _tmp24_;
	GtkWindow* _tmp25_;
	GtkWindow* _tmp26_;
	GtkWindow* _tmp27_;
	gint _tmp28_ = 0;
	GtkWindow* _tmp29_;
	const gchar* _tmp30_ = NULL;
	GtkWindow* _tmp31_;
	GtkWindow* _tmp32_;
	GtkWindow* _tmp33_;
	GtkBox* _tmp34_;
	GtkBox* _tmp35_;
	GtkBox* vbox;
	GtkWindow* _tmp36_;
	GameView* _tmp37_;
	GameView* _tmp38_;
	GameView* _tmp39_;
	GSettings* _tmp40_;
	gchar* _tmp41_ = NULL;
	gchar* _tmp42_;
	GameView* _tmp43_;
	GSettings* _tmp44_;
	gboolean _tmp45_ = FALSE;
	GameView* _tmp46_;
	GSettings* _tmp47_;
	gboolean _tmp48_ = FALSE;
	GameView* _tmp49_;
	Game* _tmp50_;
	Game* _tmp51_;
	GameView* _tmp52_;
	GtkActionGroup* _tmp53_;
	GtkActionGroup* action_group;
	GtkAction* _tmp54_ = NULL;
	GtkUIManager* _tmp55_;
	GtkUIManager* ui_manager;
	GtkWindow* _tmp59_;
	GtkAccelGroup* _tmp60_ = NULL;
	GamesPauseAction* _tmp61_;
	GamesPauseAction* _tmp62_;
	GamesPauseAction* _tmp63_;
	GtkWindow* _tmp64_;
	GamesFullscreenAction* _tmp65_;
	GamesFullscreenAction* _tmp66_;
	GtkWidget* _tmp67_ = NULL;
	GtkToolbar* _tmp68_;
	GtkToolbar* toolbar;
	GtkStyleContext* _tmp69_ = NULL;
	GtkBox* _tmp70_;
	GtkBox* _tmp71_;
	GtkBox* hb;
	GtkBox* _tmp72_;
	GtkBox* _tmp73_;
	GtkBox* vb1;
	GameView* _tmp74_;
	GtkBox* _tmp75_;
	GtkBox* _tmp76_;
	GtkBox* vb2;
	Preview* _tmp77_;
	Preview* _tmp78_;
	Preview* _tmp79_;
	GSettings* _tmp80_;
	gchar* _tmp81_ = NULL;
	gchar* _tmp82_;
	Preview* _tmp83_;
	GSettings* _tmp84_;
	gboolean _tmp85_ = FALSE;
	Preview* _tmp86_;
	Preview* _tmp87_;
	GtkGrid* _tmp88_;
	GtkGrid* _tmp89_;
	GtkGrid* score_grid;
	const gchar* _tmp90_ = NULL;
	GtkLabel* _tmp91_;
	GtkLabel* _tmp92_;
	GtkLabel* label;
	GtkLabel* _tmp93_;
	GtkLabel* _tmp94_;
	GtkLabel* _tmp95_;
	GtkLabel* _tmp96_;
	GtkLabel* _tmp97_;
	GtkLabel* _tmp98_;
	GtkLabel* _tmp99_;
	GtkLabel* _tmp100_;
	const gchar* _tmp101_ = NULL;
	GtkLabel* _tmp102_;
	GtkLabel* _tmp103_;
	GtkLabel* _tmp104_;
	GtkLabel* _tmp105_;
	GtkLabel* _tmp106_;
	GtkLabel* _tmp107_;
	GtkLabel* _tmp108_;
	GtkLabel* _tmp109_;
	GtkLabel* _tmp110_;
	GtkLabel* _tmp111_;
	const gchar* _tmp112_ = NULL;
	GtkLabel* _tmp113_;
	GtkLabel* _tmp114_;
	GtkLabel* _tmp115_;
	GtkLabel* _tmp116_;
	GtkLabel* _tmp117_;
	GtkLabel* _tmp118_;
	GtkLabel* _tmp119_;
	GtkLabel* _tmp120_;
	GtkLabel* _tmp121_;
	GtkLabel* _tmp122_;
	GamesScoresCategory* _tmp123_ = NULL;
	GamesScoresCategory* _tmp124_;
	gint _tmp124__length1;
	GamesScores* _tmp125_;
	GamesPauseAction* _tmp126_;
	GSimpleAction* _tmp127_;
	GVariant* _tmp128_;
	GError * _inner_error_ = NULL;
	self = (Quadrapassel*) base;
	G_APPLICATION_CLASS (quadrapassel_parent_class)->startup ((GApplication*) GTK_APPLICATION (self));
	g_action_map_add_action_entries ((GActionMap*) self, QUADRAPASSEL_action_entries, G_N_ELEMENTS (QUADRAPASSEL_action_entries), self);
	_tmp0_ = g_action_map_lookup_action ((GActionMap*) self, "pause");
	_tmp1_ = _g_object_ref0 (G_IS_SIMPLE_ACTION (_tmp0_) ? ((GSimpleAction*) _tmp0_) : NULL);
	_g_object_unref0 (self->priv->pause);
	self->priv->pause = _tmp1_;
	_tmp2_ = g_menu_new ();
	menu = _tmp2_;
	_tmp3_ = g_menu_new ();
	section = _tmp3_;
	_tmp4_ = section;
	g_menu_append_section (menu, NULL, (GMenuModel*) _tmp4_);
	_tmp5_ = section;
	_tmp6_ = _ ("_New Game");
	g_menu_append (_tmp5_, _tmp6_, "app.new-game");
	_tmp7_ = section;
	_tmp8_ = _ ("_Pause");
	g_menu_append (_tmp7_, _tmp8_, "app.pause");
	_tmp9_ = section;
	_tmp10_ = _ ("_Scores");
	g_menu_append (_tmp9_, _tmp10_, "app.scores");
	_tmp11_ = section;
	_tmp12_ = _ ("_Preferences");
	g_menu_append (_tmp11_, _tmp12_, "app.preferences");
	_tmp13_ = g_menu_new ();
	_g_object_unref0 (section);
	section = _tmp13_;
	_tmp14_ = section;
	g_menu_append_section (menu, NULL, (GMenuModel*) _tmp14_);
	_tmp15_ = section;
	_tmp16_ = _ ("_Help");
	g_menu_append (_tmp15_, _tmp16_, "app.help");
	_tmp17_ = section;
	_tmp18_ = _ ("_About");
	g_menu_append (_tmp17_, _tmp18_, "app.about");
	_tmp19_ = g_menu_new ();
	_g_object_unref0 (section);
	section = _tmp19_;
	_tmp20_ = section;
	g_menu_append_section (menu, NULL, (GMenuModel*) _tmp20_);
	_tmp21_ = section;
	_tmp22_ = _ ("_Quit");
	g_menu_append (_tmp21_, _tmp22_, "app.quit");
	gtk_application_set_app_menu ((GtkApplication*) self, (GMenuModel*) menu);
	_tmp23_ = g_settings_new ("org.gnome.quadrapassel");
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp23_;
	_tmp24_ = (GtkApplicationWindow*) gtk_application_window_new ((GtkApplication*) self);
	_tmp25_ = (GtkWindow*) g_object_ref_sink (_tmp24_);
	_g_object_unref0 (self->priv->main_window);
	self->priv->main_window = _tmp25_;
	_tmp26_ = self->priv->main_window;
	_tmp27_ = self->priv->main_window;
	_tmp28_ = gtk_widget_get_events ((GtkWidget*) _tmp27_);
	gtk_widget_set_events ((GtkWidget*) _tmp26_, (_tmp28_ | GDK_KEY_PRESS_MASK) | GDK_KEY_RELEASE_MASK);
	_tmp29_ = self->priv->main_window;
	_tmp30_ = _ ("Quadrapassel");
	gtk_window_set_title (_tmp29_, _tmp30_);
	_tmp31_ = self->priv->main_window;
	g_signal_connect_object ((GtkWidget*) _tmp31_, "key-press-event", (GCallback) _quadrapassel_key_press_event_cb_gtk_widget_key_press_event, self, 0);
	_tmp32_ = self->priv->main_window;
	g_signal_connect_object ((GtkWidget*) _tmp32_, "key-release-event", (GCallback) _quadrapassel_key_release_event_cb_gtk_widget_key_release_event, self, 0);
	_tmp33_ = self->priv->main_window;
	gtk_window_set_default_size (_tmp33_, 500, 550);
	_tmp34_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	_tmp35_ = g_object_ref_sink (_tmp34_);
	vbox = _tmp35_;
	gtk_widget_show ((GtkWidget*) vbox);
	_tmp36_ = self->priv->main_window;
	gtk_container_add ((GtkContainer*) _tmp36_, (GtkWidget*) vbox);
	_tmp37_ = game_view_new ();
	_tmp38_ = g_object_ref_sink (_tmp37_);
	_g_object_unref0 (self->priv->view);
	self->priv->view = _tmp38_;
	_tmp39_ = self->priv->view;
	_tmp40_ = self->priv->settings;
	_tmp41_ = g_settings_get_string (_tmp40_, "theme");
	_tmp42_ = _tmp41_;
	game_view_set_theme (_tmp39_, _tmp42_);
	_g_free0 (_tmp42_);
	_tmp43_ = self->priv->view;
	_tmp44_ = self->priv->settings;
	_tmp45_ = g_settings_get_boolean (_tmp44_, "sound");
	_tmp43_->mute = !_tmp45_;
	_tmp46_ = self->priv->view;
	_tmp47_ = self->priv->settings;
	_tmp48_ = g_settings_get_boolean (_tmp47_, "show-shadow");
	game_view_set_show_shadow (_tmp46_, _tmp48_);
	_tmp49_ = self->priv->view;
	_tmp50_ = game_new (20, 14, 1, 20, 10, FALSE);
	_tmp51_ = _tmp50_;
	game_view_set_game (_tmp49_, _tmp51_);
	_g_object_unref0 (_tmp51_);
	_tmp52_ = self->priv->view;
	gtk_widget_show ((GtkWidget*) _tmp52_);
	games_stock_init ();
	_tmp53_ = gtk_action_group_new ("group");
	action_group = _tmp53_;
	gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
	gtk_action_group_add_actions (action_group, QUADRAPASSEL_actions, G_N_ELEMENTS (QUADRAPASSEL_actions), self);
	_tmp54_ = gtk_action_group_get_action (action_group, "NewGame");
	gtk_action_set_is_important (_tmp54_, TRUE);
	_tmp55_ = gtk_ui_manager_new ();
	ui_manager = _tmp55_;
	gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
	{
		gchar* _tmp56_;
		gchar* ui_description;
		_tmp56_ = g_strdup ("<ui>" "    <toolbar name='Toolbar'>" "        <toolitem action='NewGame'/>" "        <toolitem action='_Pause'/>" "        <toolitem action='Fullscreen'/>" "    </toolbar>" "</ui>");
		ui_description = _tmp56_;
		gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, (gssize) (-1), &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_free0 (ui_description);
			goto __catch0_g_error;
		}
		_g_free0 (ui_description);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp57_;
		const gchar* _tmp58_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp57_ = e;
		_tmp58_ = _tmp57_->message;
		g_warning ("quadrapassel.vala:132: Failed to load UI: %s", _tmp58_);
		_g_error_free0 (e);
	}
	__finally0:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (ui_manager);
		_g_object_unref0 (action_group);
		_g_object_unref0 (vbox);
		_g_object_unref0 (section);
		_g_object_unref0 (menu);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp59_ = self->priv->main_window;
	_tmp60_ = gtk_ui_manager_get_accel_group (ui_manager);
	gtk_window_add_accel_group (_tmp59_, _tmp60_);
	_tmp61_ = games_pause_action_new ("_Pause");
	_g_object_unref0 (self->priv->pause_action);
	self->priv->pause_action = _tmp61_;
	_tmp62_ = self->priv->pause_action;
	g_signal_connect_object (_tmp62_, "state-changed", (GCallback) _quadrapassel_pause_cb_games_pause_action_state_changed, self, 0);
	_tmp63_ = self->priv->pause_action;
	gtk_action_group_add_action_with_accel (action_group, (GtkAction*) _tmp63_, NULL);
	_tmp64_ = self->priv->main_window;
	_tmp65_ = games_fullscreen_action_new ("Fullscreen", _tmp64_);
	_g_object_unref0 (self->priv->fullscreen_action);
	self->priv->fullscreen_action = _tmp65_;
	_tmp66_ = self->priv->fullscreen_action;
	gtk_action_group_add_action_with_accel (action_group, (GtkAction*) _tmp66_, NULL);
	_tmp67_ = gtk_ui_manager_get_widget (ui_manager, "/Toolbar");
	_tmp68_ = _g_object_ref0 (GTK_TOOLBAR (_tmp67_));
	toolbar = _tmp68_;
	gtk_toolbar_set_show_arrow (toolbar, FALSE);
	_tmp69_ = gtk_widget_get_style_context ((GtkWidget*) toolbar);
	gtk_style_context_add_class (_tmp69_, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
	gtk_widget_show ((GtkWidget*) toolbar);
	gtk_box_pack_start (vbox, (GtkWidget*) toolbar, FALSE, TRUE, (guint) 0);
	_tmp70_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	_tmp71_ = g_object_ref_sink (_tmp70_);
	hb = _tmp71_;
	gtk_widget_show ((GtkWidget*) hb);
	gtk_box_pack_start (vbox, (GtkWidget*) hb, TRUE, TRUE, (guint) 0);
	_tmp72_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	_tmp73_ = g_object_ref_sink (_tmp72_);
	vb1 = _tmp73_;
	gtk_container_set_border_width ((GtkContainer*) vb1, (guint) 10);
	_tmp74_ = self->priv->view;
	gtk_box_pack_start (vb1, (GtkWidget*) _tmp74_, TRUE, TRUE, (guint) 0);
	gtk_widget_show ((GtkWidget*) vb1);
	gtk_box_pack_start (hb, (GtkWidget*) vb1, TRUE, TRUE, (guint) 0);
	_tmp75_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	_tmp76_ = g_object_ref_sink (_tmp75_);
	vb2 = _tmp76_;
	gtk_container_set_border_width ((GtkContainer*) vb2, (guint) 10);
	gtk_widget_show ((GtkWidget*) vb2);
	gtk_box_pack_end (hb, (GtkWidget*) vb2, FALSE, FALSE, (guint) 0);
	_tmp77_ = preview_new ();
	_tmp78_ = g_object_ref_sink (_tmp77_);
	_g_object_unref0 (self->priv->preview);
	self->priv->preview = _tmp78_;
	_tmp79_ = self->priv->preview;
	_tmp80_ = self->priv->settings;
	_tmp81_ = g_settings_get_string (_tmp80_, "theme");
	_tmp82_ = _tmp81_;
	preview_set_theme (_tmp79_, _tmp82_);
	_g_free0 (_tmp82_);
	_tmp83_ = self->priv->preview;
	_tmp84_ = self->priv->settings;
	_tmp85_ = g_settings_get_boolean (_tmp84_, "do-preview");
	preview_set_enabled (_tmp83_, _tmp85_);
	_tmp86_ = self->priv->preview;
	gtk_widget_show ((GtkWidget*) _tmp86_);
	_tmp87_ = self->priv->preview;
	gtk_box_pack_start (vb2, (GtkWidget*) _tmp87_, FALSE, FALSE, (guint) 0);
	_tmp88_ = (GtkGrid*) gtk_grid_new ();
	_tmp89_ = g_object_ref_sink (_tmp88_);
	score_grid = _tmp89_;
	gtk_widget_show ((GtkWidget*) score_grid);
	gtk_box_pack_end (vb2, (GtkWidget*) score_grid, TRUE, FALSE, (guint) 0);
	_tmp90_ = _ ("Score:");
	_tmp91_ = (GtkLabel*) gtk_label_new (_tmp90_);
	_tmp92_ = g_object_ref_sink (_tmp91_);
	label = _tmp92_;
	_tmp93_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp93_, 0.0f, 0.5f);
	_tmp94_ = label;
	gtk_widget_show ((GtkWidget*) _tmp94_);
	_tmp95_ = label;
	gtk_grid_attach (score_grid, (GtkWidget*) _tmp95_, 0, 0, 1, 1);
	_tmp96_ = (GtkLabel*) gtk_label_new ("0");
	_tmp97_ = g_object_ref_sink (_tmp96_);
	_g_object_unref0 (self->priv->score_label);
	self->priv->score_label = _tmp97_;
	_tmp98_ = self->priv->score_label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp98_, 1.0f, 0.5f);
	_tmp99_ = self->priv->score_label;
	gtk_widget_show ((GtkWidget*) _tmp99_);
	_tmp100_ = self->priv->score_label;
	gtk_grid_attach (score_grid, (GtkWidget*) _tmp100_, 1, 0, 1, 1);
	_tmp101_ = _ ("Lines:");
	_tmp102_ = (GtkLabel*) gtk_label_new (_tmp101_);
	_tmp103_ = g_object_ref_sink (_tmp102_);
	_g_object_unref0 (label);
	label = _tmp103_;
	_tmp104_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp104_, 0.0f, 0.5f);
	_tmp105_ = label;
	gtk_widget_show ((GtkWidget*) _tmp105_);
	_tmp106_ = label;
	gtk_grid_attach (score_grid, (GtkWidget*) _tmp106_, 0, 1, 1, 1);
	_tmp107_ = (GtkLabel*) gtk_label_new ("0");
	_tmp108_ = g_object_ref_sink (_tmp107_);
	_g_object_unref0 (self->priv->n_destroyed_label);
	self->priv->n_destroyed_label = _tmp108_;
	_tmp109_ = self->priv->n_destroyed_label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp109_, 1.0f, 0.5f);
	_tmp110_ = self->priv->n_destroyed_label;
	gtk_widget_show ((GtkWidget*) _tmp110_);
	_tmp111_ = self->priv->n_destroyed_label;
	gtk_grid_attach (score_grid, (GtkWidget*) _tmp111_, 1, 1, 1, 1);
	_tmp112_ = _ ("Level:");
	_tmp113_ = (GtkLabel*) gtk_label_new (_tmp112_);
	_tmp114_ = g_object_ref_sink (_tmp113_);
	_g_object_unref0 (label);
	label = _tmp114_;
	_tmp115_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp115_, 0.0f, 0.5f);
	_tmp116_ = label;
	gtk_widget_show ((GtkWidget*) _tmp116_);
	_tmp117_ = label;
	gtk_grid_attach (score_grid, (GtkWidget*) _tmp117_, 0, 2, 1, 1);
	_tmp118_ = (GtkLabel*) gtk_label_new ("0");
	_tmp119_ = g_object_ref_sink (_tmp118_);
	_g_object_unref0 (self->priv->level_label);
	self->priv->level_label = _tmp119_;
	_tmp120_ = self->priv->level_label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp120_, 1.0f, 0.5f);
	_tmp121_ = self->priv->level_label;
	gtk_widget_show ((GtkWidget*) _tmp121_);
	_tmp122_ = self->priv->level_label;
	gtk_grid_attach (score_grid, (GtkWidget*) _tmp122_, 1, 2, 1, 1);
	_tmp123_ = g_new0 (GamesScoresCategory, 0);
	_tmp124_ = _tmp123_;
	_tmp124__length1 = 0;
	_tmp125_ = games_scores_new ("quadrapassel", _tmp124_, 0, NULL, NULL, 0, GAMES_SCORES_STYLE_PLAIN_DESCENDING);
	_g_object_unref0 (self->priv->high_scores);
	self->priv->high_scores = _tmp125_;
	_tmp124_ = (_vala_GamesScoresCategory_array_free (_tmp124_, _tmp124__length1), NULL);
	_tmp126_ = self->priv->pause_action;
	gtk_action_set_sensitive ((GtkAction*) _tmp126_, FALSE);
	_tmp127_ = self->priv->pause;
	_tmp128_ = _variant_new1 (FALSE);
	g_signal_emit_by_name (_tmp127_, "change-state", _tmp128_);
	_g_object_unref0 (label);
	_g_object_unref0 (score_grid);
	_g_object_unref0 (vb2);
	_g_object_unref0 (vb1);
	_g_object_unref0 (hb);
	_g_object_unref0 (toolbar);
	_g_object_unref0 (ui_manager);
	_g_object_unref0 (action_group);
	_g_object_unref0 (vbox);
	_g_object_unref0 (section);
	_g_object_unref0 (menu);
}


static void quadrapassel_real_shutdown (GApplication* base) {
	Quadrapassel * self;
	gboolean _tmp0_ = FALSE;
	Game* _tmp1_;
	gboolean _tmp4_;
	self = (Quadrapassel*) base;
	G_APPLICATION_CLASS (quadrapassel_parent_class)->shutdown ((GApplication*) GTK_APPLICATION (self));
	_tmp1_ = self->priv->game;
	if (_tmp1_ != NULL) {
		Game* _tmp2_;
		gint _tmp3_;
		_tmp2_ = self->priv->game;
		_tmp3_ = _tmp2_->score;
		_tmp0_ = _tmp3_ > 0;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp4_ = _tmp0_;
	if (_tmp4_) {
		GamesScores* _tmp5_;
		Game* _tmp6_;
		gint _tmp7_;
		_tmp5_ = self->priv->high_scores;
		_tmp6_ = self->priv->game;
		_tmp7_ = _tmp6_->score;
		games_scores_add_plain_score (_tmp5_, (guint32) _tmp7_);
	}
}


static void quadrapassel_real_activate (GApplication* base) {
	Quadrapassel * self;
	GtkWindow* _tmp0_;
	self = (Quadrapassel*) base;
	_tmp0_ = self->priv->main_window;
	gtk_window_present (_tmp0_);
}


static void quadrapassel_preferences_dialog_close_cb (Quadrapassel* self) {
	GtkDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->preferences_dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
	_g_object_unref0 (self->priv->preferences_dialog);
	self->priv->preferences_dialog = NULL;
}


static void quadrapassel_preferences_dialog_response_cb (Quadrapassel* self, gint response_id) {
	g_return_if_fail (self != NULL);
	quadrapassel_preferences_dialog_close_cb (self);
}


static void _quadrapassel_preferences_dialog_close_cb_gtk_dialog_close (GtkDialog* _sender, gpointer self) {
	quadrapassel_preferences_dialog_close_cb (self);
}


static void _quadrapassel_preferences_dialog_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
	quadrapassel_preferences_dialog_response_cb (self, response_id);
}


static void _quadrapassel_fill_height_spinner_value_changed_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self) {
	quadrapassel_fill_height_spinner_value_changed_cb (self, _sender);
}


static void _quadrapassel_fill_prob_spinner_value_changed_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self) {
	quadrapassel_fill_prob_spinner_value_changed_cb (self, _sender);
}


static void _quadrapassel_starting_level_value_changed_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self) {
	quadrapassel_starting_level_value_changed_cb (self, _sender);
}


static void _quadrapassel_sound_toggle_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	quadrapassel_sound_toggle_toggled_cb (self);
}


static void _quadrapassel_do_preview_toggle_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	quadrapassel_do_preview_toggle_toggled_cb (self);
}


static void _quadrapassel_difficult_blocks_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	quadrapassel_difficult_blocks_toggled_cb (self);
}


static void _quadrapassel_set_rotate_counter_clock_wise_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	quadrapassel_set_rotate_counter_clock_wise (self);
}


static void _quadrapassel_user_target_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	quadrapassel_user_target_toggled_cb (self);
}


static void _quadrapassel_theme_combo_changed_cb_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
	quadrapassel_theme_combo_changed_cb (self, _sender);
}


static void quadrapassel_preferences_cb (Quadrapassel* self) {
	GtkDialog* _tmp0_;
	const gchar* _tmp2_ = NULL;
	GtkWindow* _tmp3_;
	GtkDialog* _tmp4_;
	GtkDialog* _tmp5_;
	GtkDialog* _tmp6_;
	GtkDialog* _tmp7_;
	GtkBox* _tmp8_ = NULL;
	GtkBox* _tmp9_;
	GtkBox* vbox;
	GtkBox* _tmp10_;
	GtkDialog* _tmp11_;
	GtkDialog* _tmp12_;
	GtkNotebook* _tmp13_;
	GtkNotebook* _tmp14_;
	GtkNotebook* notebook;
	GtkNotebook* _tmp15_;
	GtkBox* _tmp16_;
	GtkNotebook* _tmp17_;
	GtkGrid* _tmp18_;
	GtkGrid* _tmp19_;
	GtkGrid* grid;
	GtkGrid* _tmp20_;
	GtkGrid* _tmp21_;
	GtkGrid* _tmp22_;
	const gchar* _tmp23_ = NULL;
	GtkLabel* _tmp24_;
	GtkLabel* _tmp25_;
	GtkLabel* label;
	GtkNotebook* _tmp26_;
	GtkGrid* _tmp27_;
	GtkLabel* _tmp28_;
	const gchar* _tmp29_ = NULL;
	GtkLabel* _tmp30_;
	GtkLabel* _tmp31_;
	GtkLabel* _tmp32_;
	GtkLabel* _tmp33_;
	GtkGrid* _tmp34_;
	GtkLabel* _tmp35_;
	GSettings* _tmp36_;
	gint _tmp37_ = 0;
	Game* _tmp38_;
	gint _tmp39_;
	gint _tmp40_;
	GtkAdjustment* _tmp41_;
	GtkAdjustment* _tmp42_;
	GtkAdjustment* adj;
	GtkAdjustment* _tmp43_;
	GtkSpinButton* _tmp44_;
	GtkSpinButton* _tmp45_;
	GtkSpinButton* _tmp46_;
	GtkSpinButton* _tmp47_;
	GtkSpinButton* _tmp48_;
	GtkGrid* _tmp49_;
	GtkSpinButton* _tmp50_;
	GtkLabel* _tmp51_;
	GtkSpinButton* _tmp52_;
	const gchar* _tmp53_ = NULL;
	GtkLabel* _tmp54_;
	GtkLabel* _tmp55_;
	GtkLabel* _tmp56_;
	GtkLabel* _tmp57_;
	GtkGrid* _tmp58_;
	GtkLabel* _tmp59_;
	GSettings* _tmp60_;
	gint _tmp61_ = 0;
	GtkAdjustment* _tmp62_;
	GtkAdjustment* _tmp63_;
	GtkAdjustment* _tmp64_;
	GtkSpinButton* _tmp65_;
	GtkSpinButton* _tmp66_;
	GtkSpinButton* _tmp67_;
	GtkSpinButton* _tmp68_;
	GtkSpinButton* _tmp69_;
	GtkGrid* _tmp70_;
	GtkSpinButton* _tmp71_;
	GtkLabel* _tmp72_;
	GtkSpinButton* _tmp73_;
	const gchar* _tmp74_ = NULL;
	GtkLabel* _tmp75_;
	GtkLabel* _tmp76_;
	GtkLabel* _tmp77_;
	GtkLabel* _tmp78_;
	GtkGrid* _tmp79_;
	GtkLabel* _tmp80_;
	GSettings* _tmp81_;
	gint _tmp82_ = 0;
	GtkAdjustment* _tmp83_;
	GtkAdjustment* _tmp84_;
	GtkAdjustment* _tmp85_;
	GtkSpinButton* _tmp86_;
	GtkSpinButton* _tmp87_;
	GtkSpinButton* _tmp88_;
	GtkSpinButton* _tmp89_;
	GtkSpinButton* _tmp90_;
	GtkGrid* _tmp91_;
	GtkSpinButton* _tmp92_;
	GtkLabel* _tmp93_;
	GtkSpinButton* _tmp94_;
	const gchar* _tmp95_ = NULL;
	GtkCheckButton* _tmp96_;
	GtkCheckButton* _tmp97_;
	GtkCheckButton* _tmp98_;
	GSettings* _tmp99_;
	gboolean _tmp100_ = FALSE;
	GtkCheckButton* _tmp101_;
	GtkGrid* _tmp102_;
	GtkCheckButton* _tmp103_;
	const gchar* _tmp104_ = NULL;
	GtkCheckButton* _tmp105_;
	GtkCheckButton* _tmp106_;
	GtkCheckButton* _tmp107_;
	GSettings* _tmp108_;
	gboolean _tmp109_ = FALSE;
	GtkCheckButton* _tmp110_;
	GtkGrid* _tmp111_;
	GtkCheckButton* _tmp112_;
	const gchar* _tmp113_ = NULL;
	GtkCheckButton* _tmp114_;
	GtkCheckButton* _tmp115_;
	GtkCheckButton* _tmp116_;
	GSettings* _tmp117_;
	gboolean _tmp118_ = FALSE;
	GtkCheckButton* _tmp119_;
	GtkGrid* _tmp120_;
	GtkCheckButton* _tmp121_;
	const gchar* _tmp122_ = NULL;
	GtkCheckButton* _tmp123_;
	GtkCheckButton* _tmp124_;
	GtkCheckButton* _tmp125_;
	GSettings* _tmp126_;
	gboolean _tmp127_ = FALSE;
	GtkCheckButton* _tmp128_;
	GtkGrid* _tmp129_;
	GtkCheckButton* _tmp130_;
	const gchar* _tmp131_ = NULL;
	GtkCheckButton* _tmp132_;
	GtkCheckButton* _tmp133_;
	GtkCheckButton* _tmp134_;
	GSettings* _tmp135_;
	gboolean _tmp136_ = FALSE;
	GtkCheckButton* _tmp137_;
	GtkGrid* _tmp138_;
	GtkCheckButton* _tmp139_;
	GSettings* _tmp140_;
	GamesControlsList* _tmp141_;
	GamesControlsList* _tmp142_;
	GamesControlsList* controls_list;
	GamesControlsList* _tmp143_;
	const gchar* _tmp144_ = NULL;
	const gchar* _tmp145_ = NULL;
	const gchar* _tmp146_ = NULL;
	const gchar* _tmp147_ = NULL;
	const gchar* _tmp148_ = NULL;
	const gchar* _tmp149_ = NULL;
	GamesControlsList* _tmp150_;
	const gchar* _tmp151_ = NULL;
	GtkLabel* _tmp152_;
	GtkLabel* _tmp153_;
	GtkNotebook* _tmp154_;
	GamesControlsList* _tmp155_;
	GtkLabel* _tmp156_;
	GtkBox* _tmp157_;
	GtkBox* _tmp158_;
	GtkBox* _tmp159_;
	const gchar* _tmp160_ = NULL;
	GtkLabel* _tmp161_;
	GtkLabel* _tmp162_;
	GtkNotebook* _tmp163_;
	GtkBox* _tmp164_;
	GtkLabel* _tmp165_;
	GtkComboBox* _tmp166_;
	GtkComboBox* _tmp167_;
	GtkComboBox* theme_combo;
	GtkBox* _tmp168_;
	GtkComboBox* _tmp169_;
	GtkListStore* _tmp170_;
	GtkListStore* theme_store;
	GtkComboBox* _tmp171_;
	GtkListStore* _tmp172_;
	GtkCellRendererText* _tmp173_;
	GtkCellRendererText* _tmp174_;
	GtkCellRendererText* renderer;
	GtkComboBox* _tmp175_;
	GtkCellRendererText* _tmp176_;
	GtkComboBox* _tmp177_;
	GtkCellRendererText* _tmp178_;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp179_;
	GtkTreeIter _tmp180_ = {0};
	GtkListStore* _tmp181_;
	GtkTreeIter _tmp182_;
	const gchar* _tmp183_ = NULL;
	GSettings* _tmp184_;
	gchar* _tmp185_ = NULL;
	gchar* _tmp186_;
	gboolean _tmp187_;
	GtkListStore* _tmp190_;
	GtkTreeIter _tmp191_ = {0};
	GtkListStore* _tmp192_;
	GtkTreeIter _tmp193_;
	const gchar* _tmp194_ = NULL;
	GSettings* _tmp195_;
	gchar* _tmp196_ = NULL;
	gchar* _tmp197_;
	gboolean _tmp198_;
	GtkListStore* _tmp201_;
	GtkTreeIter _tmp202_ = {0};
	GtkListStore* _tmp203_;
	GtkTreeIter _tmp204_;
	const gchar* _tmp205_ = NULL;
	GSettings* _tmp206_;
	gchar* _tmp207_ = NULL;
	gchar* _tmp208_;
	gboolean _tmp209_;
	GtkListStore* _tmp212_;
	GtkTreeIter _tmp213_ = {0};
	GtkListStore* _tmp214_;
	GtkTreeIter _tmp215_;
	const gchar* _tmp216_ = NULL;
	GSettings* _tmp217_;
	gchar* _tmp218_ = NULL;
	gchar* _tmp219_;
	gboolean _tmp220_;
	GtkComboBox* _tmp223_;
	Preview* _tmp224_;
	Preview* _tmp225_;
	Preview* _tmp226_;
	Game* _tmp227_;
	Game* _tmp228_;
	Preview* _tmp229_;
	GSettings* _tmp230_;
	gchar* _tmp231_ = NULL;
	gchar* _tmp232_;
	GtkBox* _tmp233_;
	Preview* _tmp234_;
	GtkDialog* _tmp235_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->preferences_dialog;
	if (_tmp0_ != NULL) {
		GtkDialog* _tmp1_;
		_tmp1_ = self->priv->preferences_dialog;
		gtk_window_present ((GtkWindow*) _tmp1_);
		return;
	}
	_tmp2_ = _ ("Quadrapassel Preferences");
	_tmp3_ = self->priv->main_window;
	_tmp4_ = (GtkDialog*) gtk_dialog_new_with_buttons (_tmp2_, _tmp3_, (GtkDialogFlags) 0, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL, NULL);
	_tmp5_ = g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->preferences_dialog);
	self->priv->preferences_dialog = _tmp5_;
	_tmp6_ = self->priv->preferences_dialog;
	gtk_container_set_border_width ((GtkContainer*) _tmp6_, (guint) 5);
	_tmp7_ = self->priv->preferences_dialog;
	_tmp8_ = gtk_dialog_get_content_area (_tmp7_);
	_tmp9_ = _g_object_ref0 (GTK_BOX (_tmp8_));
	vbox = _tmp9_;
	_tmp10_ = vbox;
	gtk_box_set_spacing (_tmp10_, 2);
	_tmp11_ = self->priv->preferences_dialog;
	g_signal_connect_object (_tmp11_, "close", (GCallback) _quadrapassel_preferences_dialog_close_cb_gtk_dialog_close, self, 0);
	_tmp12_ = self->priv->preferences_dialog;
	g_signal_connect_object (_tmp12_, "response", (GCallback) _quadrapassel_preferences_dialog_response_cb_gtk_dialog_response, self, 0);
	_tmp13_ = (GtkNotebook*) gtk_notebook_new ();
	_tmp14_ = g_object_ref_sink (_tmp13_);
	notebook = _tmp14_;
	_tmp15_ = notebook;
	gtk_container_set_border_width ((GtkContainer*) _tmp15_, (guint) 5);
	_tmp16_ = vbox;
	_tmp17_ = notebook;
	gtk_box_pack_start (_tmp16_, (GtkWidget*) _tmp17_, TRUE, TRUE, (guint) 0);
	_tmp18_ = (GtkGrid*) gtk_grid_new ();
	_tmp19_ = g_object_ref_sink (_tmp18_);
	grid = _tmp19_;
	_tmp20_ = grid;
	gtk_grid_set_row_spacing (_tmp20_, (guint) 6);
	_tmp21_ = grid;
	gtk_grid_set_column_spacing (_tmp21_, (guint) 12);
	_tmp22_ = grid;
	gtk_container_set_border_width ((GtkContainer*) _tmp22_, (guint) 12);
	_tmp23_ = _ ("Game");
	_tmp24_ = (GtkLabel*) gtk_label_new (_tmp23_);
	_tmp25_ = g_object_ref_sink (_tmp24_);
	label = _tmp25_;
	_tmp26_ = notebook;
	_tmp27_ = grid;
	_tmp28_ = label;
	gtk_notebook_append_page (_tmp26_, (GtkWidget*) _tmp27_, (GtkWidget*) _tmp28_);
	_tmp29_ = _ ("_Number of pre-filled rows:");
	_tmp30_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp29_);
	_tmp31_ = g_object_ref_sink (_tmp30_);
	_g_object_unref0 (label);
	label = _tmp31_;
	_tmp32_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp32_, (gfloat) 0, 0.5f);
	_tmp33_ = label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp33_, TRUE);
	_tmp34_ = grid;
	_tmp35_ = label;
	gtk_grid_attach (_tmp34_, (GtkWidget*) _tmp35_, 0, 0, 1, 1);
	_tmp36_ = self->priv->settings;
	_tmp37_ = g_settings_get_int (_tmp36_, "line-fill-height");
	_tmp38_ = self->priv->game;
	_tmp39_ = game_get_height (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = gtk_adjustment_new ((gdouble) _tmp37_, (gdouble) 0, (gdouble) (_tmp40_ - 1), (gdouble) 1, (gdouble) 5, (gdouble) 0);
	_tmp42_ = g_object_ref_sink (_tmp41_);
	adj = _tmp42_;
	_tmp43_ = adj;
	_tmp44_ = (GtkSpinButton*) gtk_spin_button_new (_tmp43_, (gdouble) 10, (guint) 0);
	_tmp45_ = g_object_ref_sink (_tmp44_);
	_g_object_unref0 (self->priv->fill_height_spinner);
	self->priv->fill_height_spinner = _tmp45_;
	_tmp46_ = self->priv->fill_height_spinner;
	gtk_spin_button_set_update_policy (_tmp46_, GTK_UPDATE_ALWAYS);
	_tmp47_ = self->priv->fill_height_spinner;
	gtk_spin_button_set_snap_to_ticks (_tmp47_, TRUE);
	_tmp48_ = self->priv->fill_height_spinner;
	g_signal_connect_object (_tmp48_, "value-changed", (GCallback) _quadrapassel_fill_height_spinner_value_changed_cb_gtk_spin_button_value_changed, self, 0);
	_tmp49_ = grid;
	_tmp50_ = self->priv->fill_height_spinner;
	gtk_grid_attach (_tmp49_, (GtkWidget*) _tmp50_, 1, 0, 1, 1);
	_tmp51_ = label;
	_tmp52_ = self->priv->fill_height_spinner;
	gtk_label_set_mnemonic_widget (_tmp51_, (GtkWidget*) _tmp52_);
	_tmp53_ = _ ("_Density of blocks in a pre-filled row:");
	_tmp54_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp53_);
	_tmp55_ = g_object_ref_sink (_tmp54_);
	_g_object_unref0 (label);
	label = _tmp55_;
	_tmp56_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp56_, (gfloat) 0, 0.5f);
	_tmp57_ = label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp57_, TRUE);
	_tmp58_ = grid;
	_tmp59_ = label;
	gtk_grid_attach (_tmp58_, (GtkWidget*) _tmp59_, 0, 1, 1, 1);
	_tmp60_ = self->priv->settings;
	_tmp61_ = g_settings_get_int (_tmp60_, "line-fill-probability");
	_tmp62_ = gtk_adjustment_new ((gdouble) _tmp61_, (gdouble) 0, (gdouble) 10, (gdouble) 1, (gdouble) 5, (gdouble) 0);
	_tmp63_ = g_object_ref_sink (_tmp62_);
	_g_object_unref0 (adj);
	adj = _tmp63_;
	_tmp64_ = adj;
	_tmp65_ = (GtkSpinButton*) gtk_spin_button_new (_tmp64_, (gdouble) 10, (guint) 0);
	_tmp66_ = g_object_ref_sink (_tmp65_);
	_g_object_unref0 (self->priv->fill_prob_spinner);
	self->priv->fill_prob_spinner = _tmp66_;
	_tmp67_ = self->priv->fill_prob_spinner;
	gtk_spin_button_set_update_policy (_tmp67_, GTK_UPDATE_ALWAYS);
	_tmp68_ = self->priv->fill_prob_spinner;
	gtk_spin_button_set_snap_to_ticks (_tmp68_, TRUE);
	_tmp69_ = self->priv->fill_prob_spinner;
	g_signal_connect_object (_tmp69_, "value-changed", (GCallback) _quadrapassel_fill_prob_spinner_value_changed_cb_gtk_spin_button_value_changed, self, 0);
	_tmp70_ = grid;
	_tmp71_ = self->priv->fill_prob_spinner;
	gtk_grid_attach (_tmp70_, (GtkWidget*) _tmp71_, 1, 1, 1, 1);
	_tmp72_ = label;
	_tmp73_ = self->priv->fill_prob_spinner;
	gtk_label_set_mnemonic_widget (_tmp72_, (GtkWidget*) _tmp73_);
	_tmp74_ = _ ("_Starting level:");
	_tmp75_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp74_);
	_tmp76_ = g_object_ref_sink (_tmp75_);
	_g_object_unref0 (label);
	label = _tmp76_;
	_tmp77_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp77_, (gfloat) 0, 0.5f);
	_tmp78_ = label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp78_, TRUE);
	_tmp79_ = grid;
	_tmp80_ = label;
	gtk_grid_attach (_tmp79_, (GtkWidget*) _tmp80_, 0, 2, 1, 1);
	_tmp81_ = self->priv->settings;
	_tmp82_ = g_settings_get_int (_tmp81_, "starting-level");
	_tmp83_ = gtk_adjustment_new ((gdouble) _tmp82_, (gdouble) 1, (gdouble) 20, (gdouble) 1, (gdouble) 5, (gdouble) 0);
	_tmp84_ = g_object_ref_sink (_tmp83_);
	_g_object_unref0 (adj);
	adj = _tmp84_;
	_tmp85_ = adj;
	_tmp86_ = (GtkSpinButton*) gtk_spin_button_new (_tmp85_, 10.0, (guint) 0);
	_tmp87_ = g_object_ref_sink (_tmp86_);
	_g_object_unref0 (self->priv->starting_level_spin);
	self->priv->starting_level_spin = _tmp87_;
	_tmp88_ = self->priv->starting_level_spin;
	gtk_spin_button_set_update_policy (_tmp88_, GTK_UPDATE_ALWAYS);
	_tmp89_ = self->priv->starting_level_spin;
	gtk_spin_button_set_snap_to_ticks (_tmp89_, TRUE);
	_tmp90_ = self->priv->starting_level_spin;
	g_signal_connect_object (_tmp90_, "value-changed", (GCallback) _quadrapassel_starting_level_value_changed_cb_gtk_spin_button_value_changed, self, 0);
	_tmp91_ = grid;
	_tmp92_ = self->priv->starting_level_spin;
	gtk_grid_attach (_tmp91_, (GtkWidget*) _tmp92_, 1, 2, 1, 1);
	_tmp93_ = label;
	_tmp94_ = self->priv->starting_level_spin;
	gtk_label_set_mnemonic_widget (_tmp93_, (GtkWidget*) _tmp94_);
	_tmp95_ = _ ("_Enable sounds");
	_tmp96_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp95_);
	_tmp97_ = g_object_ref_sink (_tmp96_);
	_g_object_unref0 (self->priv->sound_toggle);
	self->priv->sound_toggle = _tmp97_;
	_tmp98_ = self->priv->sound_toggle;
	_tmp99_ = self->priv->settings;
	_tmp100_ = g_settings_get_boolean (_tmp99_, "sound");
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp98_, _tmp100_);
	_tmp101_ = self->priv->sound_toggle;
	g_signal_connect_object ((GtkToggleButton*) _tmp101_, "toggled", (GCallback) _quadrapassel_sound_toggle_toggled_cb_gtk_toggle_button_toggled, self, 0);
	_tmp102_ = grid;
	_tmp103_ = self->priv->sound_toggle;
	gtk_grid_attach (_tmp102_, (GtkWidget*) _tmp103_, 0, 3, 2, 1);
	_tmp104_ = _ ("_Preview next block");
	_tmp105_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp104_);
	_tmp106_ = g_object_ref_sink (_tmp105_);
	_g_object_unref0 (self->priv->do_preview_toggle);
	self->priv->do_preview_toggle = _tmp106_;
	_tmp107_ = self->priv->do_preview_toggle;
	_tmp108_ = self->priv->settings;
	_tmp109_ = g_settings_get_boolean (_tmp108_, "do-preview");
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp107_, _tmp109_);
	_tmp110_ = self->priv->do_preview_toggle;
	g_signal_connect_object ((GtkToggleButton*) _tmp110_, "toggled", (GCallback) _quadrapassel_do_preview_toggle_toggled_cb_gtk_toggle_button_toggled, self, 0);
	_tmp111_ = grid;
	_tmp112_ = self->priv->do_preview_toggle;
	gtk_grid_attach (_tmp111_, (GtkWidget*) _tmp112_, 0, 4, 2, 1);
	_tmp113_ = _ ("Choose difficult _blocks");
	_tmp114_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp113_);
	_tmp115_ = g_object_ref_sink (_tmp114_);
	_g_object_unref0 (self->priv->difficult_blocks_toggle);
	self->priv->difficult_blocks_toggle = _tmp115_;
	_tmp116_ = self->priv->difficult_blocks_toggle;
	_tmp117_ = self->priv->settings;
	_tmp118_ = g_settings_get_boolean (_tmp117_, "pick-difficult-blocks");
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp116_, _tmp118_);
	_tmp119_ = self->priv->difficult_blocks_toggle;
	g_signal_connect_object ((GtkToggleButton*) _tmp119_, "toggled", (GCallback) _quadrapassel_difficult_blocks_toggled_cb_gtk_toggle_button_toggled, self, 0);
	_tmp120_ = grid;
	_tmp121_ = self->priv->difficult_blocks_toggle;
	gtk_grid_attach (_tmp120_, (GtkWidget*) _tmp121_, 0, 5, 2, 1);
	_tmp122_ = _ ("_Rotate blocks counterclockwise");
	_tmp123_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp122_);
	_tmp124_ = g_object_ref_sink (_tmp123_);
	_g_object_unref0 (self->priv->rotate_counter_clock_wise_toggle);
	self->priv->rotate_counter_clock_wise_toggle = _tmp124_;
	_tmp125_ = self->priv->rotate_counter_clock_wise_toggle;
	_tmp126_ = self->priv->settings;
	_tmp127_ = g_settings_get_boolean (_tmp126_, "rotate-counter-clock-wise");
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp125_, _tmp127_);
	_tmp128_ = self->priv->rotate_counter_clock_wise_toggle;
	g_signal_connect_object ((GtkToggleButton*) _tmp128_, "toggled", (GCallback) _quadrapassel_set_rotate_counter_clock_wise_gtk_toggle_button_toggled, self, 0);
	_tmp129_ = grid;
	_tmp130_ = self->priv->rotate_counter_clock_wise_toggle;
	gtk_grid_attach (_tmp129_, (GtkWidget*) _tmp130_, 0, 6, 2, 1);
	_tmp131_ = _ ("Show _where the block will land");
	_tmp132_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp131_);
	_tmp133_ = g_object_ref_sink (_tmp132_);
	_g_object_unref0 (self->priv->show_shadow_toggle);
	self->priv->show_shadow_toggle = _tmp133_;
	_tmp134_ = self->priv->show_shadow_toggle;
	_tmp135_ = self->priv->settings;
	_tmp136_ = g_settings_get_boolean (_tmp135_, "show-shadow");
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp134_, _tmp136_);
	_tmp137_ = self->priv->show_shadow_toggle;
	g_signal_connect_object ((GtkToggleButton*) _tmp137_, "toggled", (GCallback) _quadrapassel_user_target_toggled_cb_gtk_toggle_button_toggled, self, 0);
	_tmp138_ = grid;
	_tmp139_ = self->priv->show_shadow_toggle;
	gtk_grid_attach (_tmp138_, (GtkWidget*) _tmp139_, 0, 7, 2, 1);
	_tmp140_ = self->priv->settings;
	_tmp141_ = games_controls_list_new (_tmp140_);
	_tmp142_ = g_object_ref_sink (_tmp141_);
	controls_list = _tmp142_;
	_tmp143_ = controls_list;
	_tmp144_ = _ ("Move left");
	_tmp145_ = _ ("Move right");
	_tmp146_ = _ ("Move down");
	_tmp147_ = _ ("Drop");
	_tmp148_ = _ ("Rotate");
	_tmp149_ = _ ("Pause");
	games_controls_list_add_controls (_tmp143_, "key-left", _tmp144_, 0, "key-right", _tmp145_, 0, "key-down", _tmp146_, 0, "key-drop", _tmp147_, 0, "key-rotate", _tmp148_, 0, "key-pause", _tmp149_, 0, NULL, NULL);
	_tmp150_ = controls_list;
	gtk_container_set_border_width ((GtkContainer*) _tmp150_, (guint) 12);
	_tmp151_ = _ ("Controls");
	_tmp152_ = (GtkLabel*) gtk_label_new (_tmp151_);
	_tmp153_ = g_object_ref_sink (_tmp152_);
	_g_object_unref0 (label);
	label = _tmp153_;
	_tmp154_ = notebook;
	_tmp155_ = controls_list;
	_tmp156_ = label;
	gtk_notebook_append_page (_tmp154_, (GtkWidget*) _tmp155_, (GtkWidget*) _tmp156_);
	_tmp157_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	_tmp158_ = g_object_ref_sink (_tmp157_);
	_g_object_unref0 (vbox);
	vbox = _tmp158_;
	_tmp159_ = vbox;
	gtk_container_set_border_width ((GtkContainer*) _tmp159_, (guint) 12);
	_tmp160_ = _ ("Theme");
	_tmp161_ = (GtkLabel*) gtk_label_new (_tmp160_);
	_tmp162_ = g_object_ref_sink (_tmp161_);
	_g_object_unref0 (label);
	label = _tmp162_;
	_tmp163_ = notebook;
	_tmp164_ = vbox;
	_tmp165_ = label;
	gtk_notebook_append_page (_tmp163_, (GtkWidget*) _tmp164_, (GtkWidget*) _tmp165_);
	_tmp166_ = (GtkComboBox*) gtk_combo_box_new ();
	_tmp167_ = g_object_ref_sink (_tmp166_);
	theme_combo = _tmp167_;
	_tmp168_ = vbox;
	_tmp169_ = theme_combo;
	gtk_box_pack_start (_tmp168_, (GtkWidget*) _tmp169_, FALSE, TRUE, (guint) 0);
	_tmp170_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
	theme_store = _tmp170_;
	_tmp171_ = theme_combo;
	_tmp172_ = theme_store;
	gtk_combo_box_set_model (_tmp171_, (GtkTreeModel*) _tmp172_);
	_tmp173_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	_tmp174_ = g_object_ref_sink (_tmp173_);
	renderer = _tmp174_;
	_tmp175_ = theme_combo;
	_tmp176_ = renderer;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp175_, (GtkCellRenderer*) _tmp176_, TRUE);
	_tmp177_ = theme_combo;
	_tmp178_ = renderer;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp177_, (GtkCellRenderer*) _tmp178_, "text", 0);
	_tmp179_ = theme_store;
	gtk_list_store_append (_tmp179_, &_tmp180_);
	iter = _tmp180_;
	_tmp181_ = theme_store;
	_tmp182_ = iter;
	_tmp183_ = _ ("Plain");
	gtk_list_store_set (_tmp181_, &_tmp182_, 0, _tmp183_, 1, "plain", -1, -1);
	_tmp184_ = self->priv->settings;
	_tmp185_ = g_settings_get_string (_tmp184_, "theme");
	_tmp186_ = _tmp185_;
	_tmp187_ = g_strcmp0 (_tmp186_, "plain") == 0;
	_g_free0 (_tmp186_);
	if (_tmp187_) {
		GtkComboBox* _tmp188_;
		GtkTreeIter _tmp189_;
		_tmp188_ = theme_combo;
		_tmp189_ = iter;
		gtk_combo_box_set_active_iter (_tmp188_, &_tmp189_);
	}
	_tmp190_ = theme_store;
	gtk_list_store_append (_tmp190_, &_tmp191_);
	iter = _tmp191_;
	_tmp192_ = theme_store;
	_tmp193_ = iter;
	_tmp194_ = _ ("Tango Flat");
	gtk_list_store_set (_tmp192_, &_tmp193_, 0, _tmp194_, 1, "tangoflat", -1, -1);
	_tmp195_ = self->priv->settings;
	_tmp196_ = g_settings_get_string (_tmp195_, "theme");
	_tmp197_ = _tmp196_;
	_tmp198_ = g_strcmp0 (_tmp197_, "tangoflat") == 0;
	_g_free0 (_tmp197_);
	if (_tmp198_) {
		GtkComboBox* _tmp199_;
		GtkTreeIter _tmp200_;
		_tmp199_ = theme_combo;
		_tmp200_ = iter;
		gtk_combo_box_set_active_iter (_tmp199_, &_tmp200_);
	}
	_tmp201_ = theme_store;
	gtk_list_store_append (_tmp201_, &_tmp202_);
	iter = _tmp202_;
	_tmp203_ = theme_store;
	_tmp204_ = iter;
	_tmp205_ = _ ("Tango Shaded");
	gtk_list_store_set (_tmp203_, &_tmp204_, 0, _tmp205_, 1, "tangoshaded", -1, -1);
	_tmp206_ = self->priv->settings;
	_tmp207_ = g_settings_get_string (_tmp206_, "theme");
	_tmp208_ = _tmp207_;
	_tmp209_ = g_strcmp0 (_tmp208_, "tangoshaded") == 0;
	_g_free0 (_tmp208_);
	if (_tmp209_) {
		GtkComboBox* _tmp210_;
		GtkTreeIter _tmp211_;
		_tmp210_ = theme_combo;
		_tmp211_ = iter;
		gtk_combo_box_set_active_iter (_tmp210_, &_tmp211_);
	}
	_tmp212_ = theme_store;
	gtk_list_store_append (_tmp212_, &_tmp213_);
	iter = _tmp213_;
	_tmp214_ = theme_store;
	_tmp215_ = iter;
	_tmp216_ = _ ("Clean");
	gtk_list_store_set (_tmp214_, &_tmp215_, 0, _tmp216_, 1, "clean", -1, -1);
	_tmp217_ = self->priv->settings;
	_tmp218_ = g_settings_get_string (_tmp217_, "theme");
	_tmp219_ = _tmp218_;
	_tmp220_ = g_strcmp0 (_tmp219_, "clean") == 0;
	_g_free0 (_tmp219_);
	if (_tmp220_) {
		GtkComboBox* _tmp221_;
		GtkTreeIter _tmp222_;
		_tmp221_ = theme_combo;
		_tmp222_ = iter;
		gtk_combo_box_set_active_iter (_tmp221_, &_tmp222_);
	}
	_tmp223_ = theme_combo;
	g_signal_connect_object (_tmp223_, "changed", (GCallback) _quadrapassel_theme_combo_changed_cb_gtk_combo_box_changed, self, 0);
	_tmp224_ = preview_new ();
	_tmp225_ = g_object_ref_sink (_tmp224_);
	_g_object_unref0 (self->priv->theme_preview);
	self->priv->theme_preview = _tmp225_;
	_tmp226_ = self->priv->theme_preview;
	_tmp227_ = game_new (20, 14, 1, 0, 5, FALSE);
	_tmp228_ = _tmp227_;
	preview_set_game (_tmp226_, _tmp228_);
	_g_object_unref0 (_tmp228_);
	_tmp229_ = self->priv->theme_preview;
	_tmp230_ = self->priv->settings;
	_tmp231_ = g_settings_get_string (_tmp230_, "theme");
	_tmp232_ = _tmp231_;
	preview_set_theme (_tmp229_, _tmp232_);
	_g_free0 (_tmp232_);
	_tmp233_ = vbox;
	_tmp234_ = self->priv->theme_preview;
	gtk_box_pack_start (_tmp233_, (GtkWidget*) _tmp234_, TRUE, TRUE, (guint) 0);
	_tmp235_ = self->priv->preferences_dialog;
	gtk_widget_show_all ((GtkWidget*) _tmp235_);
	_g_object_unref0 (renderer);
	_g_object_unref0 (theme_store);
	_g_object_unref0 (theme_combo);
	_g_object_unref0 (controls_list);
	_g_object_unref0 (adj);
	_g_object_unref0 (label);
	_g_object_unref0 (grid);
	_g_object_unref0 (notebook);
	_g_object_unref0 (vbox);
}


static void quadrapassel_sound_toggle_toggled_cb (Quadrapassel* self) {
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean play_sound;
	GSettings* _tmp2_;
	GameView* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->sound_toggle;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
	play_sound = _tmp1_;
	_tmp2_ = self->priv->settings;
	g_settings_set_boolean (_tmp2_, "sound", play_sound);
	_tmp3_ = self->priv->view;
	_tmp3_->mute = !play_sound;
}


static void quadrapassel_do_preview_toggle_toggled_cb (Quadrapassel* self) {
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean do_preview;
	GSettings* _tmp2_;
	Preview* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->do_preview_toggle;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
	do_preview = _tmp1_;
	_tmp2_ = self->priv->settings;
	g_settings_set_boolean (_tmp2_, "do-preview", do_preview);
	_tmp3_ = self->priv->preview;
	preview_set_enabled (_tmp3_, do_preview);
}


static void quadrapassel_difficult_blocks_toggled_cb (Quadrapassel* self) {
	GSettings* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->settings;
	_tmp1_ = self->priv->difficult_blocks_toggle;
	_tmp2_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp1_);
	g_settings_set_boolean (_tmp0_, "pick-difficult-blocks", _tmp2_);
}


static void quadrapassel_set_rotate_counter_clock_wise (Quadrapassel* self) {
	GSettings* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->settings;
	_tmp1_ = self->priv->rotate_counter_clock_wise_toggle;
	_tmp2_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp1_);
	g_settings_set_boolean (_tmp0_, "rotate-counter-clock-wise", _tmp2_);
}


static void quadrapassel_user_target_toggled_cb (Quadrapassel* self) {
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean show_shadow;
	GSettings* _tmp2_;
	GameView* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->show_shadow_toggle;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
	show_shadow = _tmp1_;
	_tmp2_ = self->priv->settings;
	g_settings_set_boolean (_tmp2_, "show-shadow", show_shadow);
	_tmp3_ = self->priv->view;
	game_view_set_show_shadow (_tmp3_, show_shadow);
}


static void quadrapassel_theme_combo_changed_cb (Quadrapassel* self, GtkComboBox* widget) {
	GtkTreeIter iter = {0};
	GtkComboBox* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gchar* theme = NULL;
	GtkComboBox* _tmp2_;
	GtkTreeModel* _tmp3_;
	GtkTreeModel* _tmp4_;
	GtkTreeIter _tmp5_;
	GameView* _tmp6_;
	const gchar* _tmp7_;
	Preview* _tmp8_;
	const gchar* _tmp9_;
	Preview* _tmp10_;
	GSettings* _tmp13_;
	const gchar* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = widget;
	gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_);
	iter = _tmp1_;
	_tmp2_ = widget;
	_tmp3_ = gtk_combo_box_get_model (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = iter;
	gtk_tree_model_get (_tmp4_, &_tmp5_, 1, &theme, -1);
	_tmp6_ = self->priv->view;
	_tmp7_ = theme;
	game_view_set_theme (_tmp6_, _tmp7_);
	_tmp8_ = self->priv->preview;
	_tmp9_ = theme;
	preview_set_theme (_tmp8_, _tmp9_);
	_tmp10_ = self->priv->theme_preview;
	if (_tmp10_ != NULL) {
		Preview* _tmp11_;
		const gchar* _tmp12_;
		_tmp11_ = self->priv->theme_preview;
		_tmp12_ = theme;
		preview_set_theme (_tmp11_, _tmp12_);
	}
	_tmp13_ = self->priv->settings;
	_tmp14_ = theme;
	g_settings_set_string (_tmp13_, "theme", _tmp14_);
	_g_free0 (theme);
}


static void quadrapassel_fill_height_spinner_value_changed_cb (Quadrapassel* self, GtkSpinButton* spin) {
	GtkSpinButton* _tmp0_;
	gint _tmp1_ = 0;
	gint value;
	GSettings* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (spin != NULL);
	_tmp0_ = spin;
	_tmp1_ = gtk_spin_button_get_value_as_int (_tmp0_);
	value = _tmp1_;
	_tmp2_ = self->priv->settings;
	g_settings_set_int (_tmp2_, "line-fill-height", value);
}


static void quadrapassel_fill_prob_spinner_value_changed_cb (Quadrapassel* self, GtkSpinButton* spin) {
	GtkSpinButton* _tmp0_;
	gint _tmp1_ = 0;
	gint value;
	GSettings* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (spin != NULL);
	_tmp0_ = spin;
	_tmp1_ = gtk_spin_button_get_value_as_int (_tmp0_);
	value = _tmp1_;
	_tmp2_ = self->priv->settings;
	g_settings_set_int (_tmp2_, "line-fill-probability", value);
}


static void quadrapassel_starting_level_value_changed_cb (Quadrapassel* self, GtkSpinButton* spin) {
	GtkSpinButton* _tmp0_;
	gint _tmp1_ = 0;
	gint value;
	GSettings* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (spin != NULL);
	_tmp0_ = spin;
	_tmp1_ = gtk_spin_button_get_value_as_int (_tmp0_);
	value = _tmp1_;
	_tmp2_ = self->priv->settings;
	g_settings_set_int (_tmp2_, "starting-level", value);
}


static gboolean _variant_get2 (GVariant* value) {
	return g_variant_get_boolean (value);
}


static GVariant* _variant_new3 (gboolean value) {
	return g_variant_ref_sink (g_variant_new_boolean (value));
}


static void quadrapassel_toggle_cb (Quadrapassel* self, GSimpleAction* action, GVariant* parameter) {
	GSimpleAction* _tmp0_;
	GSimpleAction* _tmp1_;
	GVariant* _tmp2_ = NULL;
	GVariant* _tmp3_;
	gboolean _tmp4_;
	GVariant* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = action;
	_tmp1_ = action;
	_tmp2_ = g_action_get_state ((GAction*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _variant_get2 (_tmp3_);
	_tmp5_ = _variant_new3 (!_tmp4_);
	g_signal_emit_by_name (_tmp0_, "change-state", _tmp5_);
	_g_variant_unref0 (_tmp3_);
}


static gboolean _variant_get4 (GVariant* value) {
	return g_variant_get_boolean (value);
}


static void quadrapassel_pause_changed (Quadrapassel* self, GSimpleAction* action, GVariant* state) {
	GamesPauseAction* _tmp0_;
	GVariant* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	g_return_if_fail (state != NULL);
	_tmp0_ = self->priv->pause_action;
	_tmp1_ = state;
	_tmp2_ = _variant_get4 (_tmp1_);
	games_pause_action_set_is_paused (_tmp0_, _tmp2_);
}


static GVariant* _variant_new5 (gboolean value) {
	return g_variant_ref_sink (g_variant_new_boolean (value));
}


static void quadrapassel_pause_cb (Quadrapassel* self) {
	Game* _tmp0_;
	GSimpleAction* _tmp4_;
	GamesPauseAction* _tmp5_;
	gboolean _tmp6_ = FALSE;
	GVariant* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->game;
	if (_tmp0_ != NULL) {
		Game* _tmp1_;
		GamesPauseAction* _tmp2_;
		gboolean _tmp3_ = FALSE;
		_tmp1_ = self->priv->game;
		_tmp2_ = self->priv->pause_action;
		_tmp3_ = games_pause_action_get_is_paused (_tmp2_);
		game_set_paused (_tmp1_, _tmp3_);
	}
	_tmp4_ = self->priv->pause;
	_tmp5_ = self->priv->pause_action;
	_tmp6_ = games_pause_action_get_is_paused (_tmp5_);
	_tmp7_ = _variant_new5 (_tmp6_);
	g_simple_action_set_state (_tmp4_, _tmp7_);
}


static void quadrapassel_quit_cb (Quadrapassel* self) {
	GtkWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_window;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}


static gboolean quadrapassel_key_press_event_cb (Quadrapassel* self, GtkWidget* widget, GdkEventKey* event) {
	gboolean result = FALSE;
	GdkEventKey _tmp0_;
	guint _tmp1_;
	guint _tmp2_ = 0U;
	guint keyval;
	Game* _tmp3_;
	guint _tmp4_;
	GSettings* _tmp5_;
	gint _tmp6_ = 0;
	guint _tmp7_ = 0U;
	Game* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	guint _tmp14_;
	GSettings* _tmp15_;
	gint _tmp16_ = 0;
	guint _tmp17_ = 0U;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = *event;
	_tmp1_ = _tmp0_.keyval;
	_tmp2_ = quadrapassel_upper_key (self, _tmp1_);
	keyval = _tmp2_;
	_tmp3_ = self->priv->game;
	if (_tmp3_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp4_ = keyval;
	_tmp5_ = self->priv->settings;
	_tmp6_ = g_settings_get_int (_tmp5_, "key-pause");
	_tmp7_ = quadrapassel_upper_key (self, (guint) _tmp6_);
	if (_tmp4_ == _tmp7_) {
		GamesPauseAction* _tmp8_;
		GamesPauseAction* _tmp9_;
		gboolean _tmp10_ = FALSE;
		_tmp8_ = self->priv->pause_action;
		_tmp9_ = self->priv->pause_action;
		_tmp10_ = games_pause_action_get_is_paused (_tmp9_);
		games_pause_action_set_is_paused (_tmp8_, !_tmp10_);
		result = TRUE;
		return result;
	}
	_tmp11_ = self->priv->game;
	_tmp12_ = game_get_paused (_tmp11_);
	_tmp13_ = _tmp12_;
	if (_tmp13_) {
		result = FALSE;
		return result;
	}
	_tmp14_ = keyval;
	_tmp15_ = self->priv->settings;
	_tmp16_ = g_settings_get_int (_tmp15_, "key-left");
	_tmp17_ = quadrapassel_upper_key (self, (guint) _tmp16_);
	if (_tmp14_ == _tmp17_) {
		Game* _tmp18_;
		_tmp18_ = self->priv->game;
		game_move_left (_tmp18_);
		result = TRUE;
		return result;
	} else {
		guint _tmp19_;
		GSettings* _tmp20_;
		gint _tmp21_ = 0;
		guint _tmp22_ = 0U;
		_tmp19_ = keyval;
		_tmp20_ = self->priv->settings;
		_tmp21_ = g_settings_get_int (_tmp20_, "key-right");
		_tmp22_ = quadrapassel_upper_key (self, (guint) _tmp21_);
		if (_tmp19_ == _tmp22_) {
			Game* _tmp23_;
			_tmp23_ = self->priv->game;
			game_move_right (_tmp23_);
			result = TRUE;
			return result;
		} else {
			guint _tmp24_;
			GSettings* _tmp25_;
			gint _tmp26_ = 0;
			guint _tmp27_ = 0U;
			_tmp24_ = keyval;
			_tmp25_ = self->priv->settings;
			_tmp26_ = g_settings_get_int (_tmp25_, "key-rotate");
			_tmp27_ = quadrapassel_upper_key (self, (guint) _tmp26_);
			if (_tmp24_ == _tmp27_) {
				GSettings* _tmp28_;
				gboolean _tmp29_ = FALSE;
				_tmp28_ = self->priv->settings;
				_tmp29_ = g_settings_get_boolean (_tmp28_, "rotate-counter-clock-wise");
				if (_tmp29_) {
					Game* _tmp30_;
					_tmp30_ = self->priv->game;
					game_rotate_left (_tmp30_);
				} else {
					Game* _tmp31_;
					_tmp31_ = self->priv->game;
					game_rotate_right (_tmp31_);
				}
				result = TRUE;
				return result;
			} else {
				guint _tmp32_;
				GSettings* _tmp33_;
				gint _tmp34_ = 0;
				guint _tmp35_ = 0U;
				_tmp32_ = keyval;
				_tmp33_ = self->priv->settings;
				_tmp34_ = g_settings_get_int (_tmp33_, "key-down");
				_tmp35_ = quadrapassel_upper_key (self, (guint) _tmp34_);
				if (_tmp32_ == _tmp35_) {
					Game* _tmp36_;
					_tmp36_ = self->priv->game;
					game_set_fast_forward (_tmp36_, TRUE);
					result = TRUE;
					return result;
				} else {
					guint _tmp37_;
					GSettings* _tmp38_;
					gint _tmp39_ = 0;
					guint _tmp40_ = 0U;
					_tmp37_ = keyval;
					_tmp38_ = self->priv->settings;
					_tmp39_ = g_settings_get_int (_tmp38_, "key-drop");
					_tmp40_ = quadrapassel_upper_key (self, (guint) _tmp39_);
					if (_tmp37_ == _tmp40_) {
						Game* _tmp41_;
						_tmp41_ = self->priv->game;
						game_drop (_tmp41_);
						result = TRUE;
						return result;
					}
				}
			}
		}
	}
	result = FALSE;
	return result;
}


static gboolean quadrapassel_key_release_event_cb (Quadrapassel* self, GtkWidget* widget, GdkEventKey* event) {
	gboolean result = FALSE;
	GdkEventKey _tmp0_;
	guint _tmp1_;
	guint _tmp2_ = 0U;
	guint keyval;
	Game* _tmp3_;
	guint _tmp4_;
	GSettings* _tmp5_;
	gint _tmp6_ = 0;
	guint _tmp7_ = 0U;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = *event;
	_tmp1_ = _tmp0_.keyval;
	_tmp2_ = quadrapassel_upper_key (self, _tmp1_);
	keyval = _tmp2_;
	_tmp3_ = self->priv->game;
	if (_tmp3_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp4_ = keyval;
	_tmp5_ = self->priv->settings;
	_tmp6_ = g_settings_get_int (_tmp5_, "key-down");
	_tmp7_ = quadrapassel_upper_key (self, (guint) _tmp6_);
	if (_tmp4_ == _tmp7_) {
		Game* _tmp8_;
		_tmp8_ = self->priv->game;
		game_set_fast_forward (_tmp8_, FALSE);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}


static guint quadrapassel_upper_key (Quadrapassel* self, guint keyval) {
	guint result = 0U;
	guint _tmp0_;
	guint _tmp2_;
	gchar _tmp3_ = '\0';
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = keyval;
	if (_tmp0_ > ((guint) 255)) {
		guint _tmp1_;
		_tmp1_ = keyval;
		result = _tmp1_;
		return result;
	}
	_tmp2_ = keyval;
	_tmp3_ = g_ascii_toupper ((gchar) _tmp2_);
	result = (guint) _tmp3_;
	return result;
}


static void quadrapassel_new_game_cb (Quadrapassel* self) {
	g_return_if_fail (self != NULL);
	quadrapassel_new_game (self);
}


static void _quadrapassel_shape_landed_cb_game_shape_landed (Game* _sender, gint* lines, int lines_length1, GList* line_blocks, gpointer self) {
	quadrapassel_shape_landed_cb (self, lines, lines_length1, line_blocks);
}


static void _quadrapassel_complete_cb_game_complete (Game* _sender, gpointer self) {
	quadrapassel_complete_cb (self);
}


static void quadrapassel_new_game (Quadrapassel* self) {
	Game* _tmp0_;
	GSettings* _tmp3_;
	gint _tmp4_ = 0;
	GSettings* _tmp5_;
	gint _tmp6_ = 0;
	GSettings* _tmp7_;
	gint _tmp8_ = 0;
	GSettings* _tmp9_;
	gboolean _tmp10_ = FALSE;
	Game* _tmp11_;
	Game* _tmp12_;
	Game* _tmp13_;
	Preview* _tmp14_;
	Game* _tmp15_;
	GameView* _tmp16_;
	Game* _tmp17_;
	Game* _tmp18_;
	GamesPauseAction* _tmp19_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->game;
	if (_tmp0_ != NULL) {
		Game* _tmp1_;
		Game* _tmp2_;
		_tmp1_ = self->priv->game;
		game_stop (_tmp1_);
		_tmp2_ = self->priv->game;
		g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_DATA, (guint) 0, (GQuark) 0, NULL, NULL, self);
	}
	_tmp3_ = self->priv->settings;
	_tmp4_ = g_settings_get_int (_tmp3_, "starting-level");
	_tmp5_ = self->priv->settings;
	_tmp6_ = g_settings_get_int (_tmp5_, "line-fill-height");
	_tmp7_ = self->priv->settings;
	_tmp8_ = g_settings_get_int (_tmp7_, "line-fill-probability");
	_tmp9_ = self->priv->settings;
	_tmp10_ = g_settings_get_boolean (_tmp9_, "pick-difficult-blocks");
	_tmp11_ = game_new (20, 14, _tmp4_, _tmp6_, _tmp8_, _tmp10_);
	_g_object_unref0 (self->priv->game);
	self->priv->game = _tmp11_;
	_tmp12_ = self->priv->game;
	g_signal_connect_object (_tmp12_, "shape-landed", (GCallback) _quadrapassel_shape_landed_cb_game_shape_landed, self, 0);
	_tmp13_ = self->priv->game;
	g_signal_connect_object (_tmp13_, "complete", (GCallback) _quadrapassel_complete_cb_game_complete, self, 0);
	_tmp14_ = self->priv->preview;
	_tmp15_ = self->priv->game;
	preview_set_game (_tmp14_, _tmp15_);
	_tmp16_ = self->priv->view;
	_tmp17_ = self->priv->game;
	game_view_set_game (_tmp16_, _tmp17_);
	_tmp18_ = self->priv->game;
	game_start (_tmp18_);
	quadrapassel_update_score (self);
	_tmp19_ = self->priv->pause_action;
	gtk_action_set_sensitive ((GtkAction*) _tmp19_, TRUE);
}


static void quadrapassel_shape_landed_cb (Quadrapassel* self, gint* lines, int lines_length1, GList* line_blocks) {
	g_return_if_fail (self != NULL);
	quadrapassel_update_score (self);
}


static void quadrapassel_complete_cb (Quadrapassel* self) {
	GamesPauseAction* _tmp0_;
	Game* _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->pause_action;
	gtk_action_set_sensitive ((GtkAction*) _tmp0_, FALSE);
	_tmp1_ = self->priv->game;
	_tmp2_ = _tmp1_->score;
	if (_tmp2_ > 0) {
		GamesScores* _tmp3_;
		Game* _tmp4_;
		gint _tmp5_;
		gint _tmp6_ = 0;
		gint pos;
		GtkWindow* _tmp7_;
		GamesScores* _tmp8_;
		const gchar* _tmp9_ = NULL;
		GamesScoresDialog* _tmp10_;
		GamesScoresDialog* _tmp11_;
		GamesScoresDialog* dialog;
		const gchar* _tmp12_ = NULL;
		gchar* _tmp13_;
		gchar* title;
		const gchar* _tmp14_ = NULL;
		gchar* _tmp15_;
		gchar* message;
		gint _tmp16_;
		GamesScoresDialog* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		gchar* _tmp25_ = NULL;
		gchar* _tmp26_;
		GamesScoresDialog* _tmp27_;
		gint _tmp28_;
		GamesScoresDialog* _tmp31_;
		gint _tmp32_ = 0;
		GamesScoresDialog* _tmp34_;
		_tmp3_ = self->priv->high_scores;
		_tmp4_ = self->priv->game;
		_tmp5_ = _tmp4_->score;
		_tmp6_ = games_scores_add_plain_score (_tmp3_, (guint32) _tmp5_);
		pos = _tmp6_;
		_tmp7_ = self->priv->main_window;
		_tmp8_ = self->priv->high_scores;
		_tmp9_ = _ ("Quadrapassel Scores");
		_tmp10_ = games_scores_dialog_new (_tmp7_, _tmp8_, _tmp9_);
		_tmp11_ = g_object_ref_sink (_tmp10_);
		dialog = _tmp11_;
		_tmp12_ = _ ("Puzzle solved!");
		_tmp13_ = g_strdup (_tmp12_);
		title = _tmp13_;
		_tmp14_ = _ ("You didn't make the top ten, better luck next time.");
		_tmp15_ = g_strdup (_tmp14_);
		message = _tmp15_;
		_tmp16_ = pos;
		if (_tmp16_ == 1) {
			const gchar* _tmp17_ = NULL;
			gchar* _tmp18_;
			_tmp17_ = _ ("Your score is the best!");
			_tmp18_ = g_strdup (_tmp17_);
			_g_free0 (message);
			message = _tmp18_;
		} else {
			gint _tmp19_;
			_tmp19_ = pos;
			if (_tmp19_ > 1) {
				const gchar* _tmp20_ = NULL;
				gchar* _tmp21_;
				_tmp20_ = _ ("Your score has made the top ten.");
				_tmp21_ = g_strdup (_tmp20_);
				_g_free0 (message);
				message = _tmp21_;
			}
		}
		_tmp22_ = dialog;
		_tmp23_ = title;
		_tmp24_ = message;
		_tmp25_ = g_strdup_printf ("<b>%s</b>\n\n%s", _tmp23_, _tmp24_);
		_tmp26_ = _tmp25_;
		games_scores_dialog_set_message (_tmp22_, _tmp26_);
		_g_free0 (_tmp26_);
		_tmp27_ = dialog;
		games_scores_dialog_set_buttons (_tmp27_, (guint) (GAMES_SCORES_QUIT_BUTTON | GAMES_SCORES_NEW_GAME_BUTTON));
		_tmp28_ = pos;
		if (_tmp28_ > 0) {
			GamesScoresDialog* _tmp29_;
			gint _tmp30_;
			_tmp29_ = dialog;
			_tmp30_ = pos;
			games_scores_dialog_set_hilight (_tmp29_, (guint) _tmp30_);
		}
		_tmp31_ = dialog;
		_tmp32_ = gtk_dialog_run ((GtkDialog*) _tmp31_);
		switch (_tmp32_) {
			case GTK_RESPONSE_REJECT:
			{
				GtkWindow* _tmp33_;
				_tmp33_ = self->priv->main_window;
				gtk_widget_destroy ((GtkWidget*) _tmp33_);
				break;
			}
			default:
			{
				quadrapassel_new_game (self);
				break;
			}
		}
		_tmp34_ = dialog;
		gtk_widget_destroy ((GtkWidget*) _tmp34_);
		_g_free0 (message);
		_g_free0 (title);
		_g_object_unref0 (dialog);
	}
}


static void quadrapassel_update_score (Quadrapassel* self) {
	gint score;
	gint level;
	gint n_lines_destroyed;
	Game* _tmp0_;
	GtkLabel* _tmp8_;
	gint _tmp9_;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_;
	GtkLabel* _tmp12_;
	gint _tmp13_;
	gchar* _tmp14_ = NULL;
	gchar* _tmp15_;
	GtkLabel* _tmp16_;
	gint _tmp17_;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_;
	g_return_if_fail (self != NULL);
	score = 0;
	level = 0;
	n_lines_destroyed = 0;
	_tmp0_ = self->priv->game;
	if (_tmp0_ != NULL) {
		Game* _tmp1_;
		gint _tmp2_;
		Game* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		Game* _tmp6_;
		gint _tmp7_;
		_tmp1_ = self->priv->game;
		_tmp2_ = _tmp1_->score;
		score = _tmp2_;
		_tmp3_ = self->priv->game;
		_tmp4_ = game_get_level (_tmp3_);
		_tmp5_ = _tmp4_;
		level = _tmp5_;
		_tmp6_ = self->priv->game;
		_tmp7_ = _tmp6_->n_lines_destroyed;
		n_lines_destroyed = _tmp7_;
	}
	_tmp8_ = self->priv->score_label;
	_tmp9_ = score;
	_tmp10_ = g_strdup_printf ("%d", _tmp9_);
	_tmp11_ = _tmp10_;
	gtk_label_set_text (_tmp8_, _tmp11_);
	_g_free0 (_tmp11_);
	_tmp12_ = self->priv->level_label;
	_tmp13_ = level;
	_tmp14_ = g_strdup_printf ("%d", _tmp13_);
	_tmp15_ = _tmp14_;
	gtk_label_set_text (_tmp12_, _tmp15_);
	_g_free0 (_tmp15_);
	_tmp16_ = self->priv->n_destroyed_label;
	_tmp17_ = n_lines_destroyed;
	_tmp18_ = g_strdup_printf ("%d", _tmp17_);
	_tmp19_ = _tmp18_;
	gtk_label_set_text (_tmp16_, _tmp19_);
	_g_free0 (_tmp19_);
}


static void quadrapassel_help_cb (Quadrapassel* self) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	{
		GtkWindow* _tmp0_;
		GdkScreen* _tmp1_ = NULL;
		guint32 _tmp2_ = 0U;
		_tmp0_ = self->priv->main_window;
		_tmp1_ = gtk_window_get_screen (_tmp0_);
		_tmp2_ = gtk_get_current_event_time ();
		gtk_show_uri (_tmp1_, "help:quadrapassel", _tmp2_, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp3_ = e;
		_tmp4_ = _tmp3_->message;
		g_warning ("quadrapassel.vala:632: Failed to show help: %s", _tmp4_);
		_g_error_free0 (e);
	}
	__finally1:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void quadrapassel_about_cb (Quadrapassel* self) {
	gchar* _tmp0_;
	gchar** _tmp1_ = NULL;
	gchar** authors;
	gint authors_length1;
	gint _authors_size_;
	gchar* _tmp2_;
	gchar** _tmp3_ = NULL;
	gchar** documenters;
	gint documenters_length1;
	gint _documenters_size_;
	GtkWindow* _tmp4_;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup ("Gnome Games Team");
	_tmp1_ = g_new0 (gchar*, 2 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp1_[1] = NULL;
	authors = _tmp1_;
	authors_length1 = 2;
	_authors_size_ = authors_length1;
	_tmp2_ = g_strdup ("Angela Boyle");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp3_[1] = NULL;
	documenters = _tmp3_;
	documenters_length1 = 2;
	_documenters_size_ = documenters_length1;
	_tmp4_ = self->priv->main_window;
	_tmp5_ = _ ("Quadrapassel");
	_tmp6_ = _ ("A classic game of fitting falling blocks together.\n" \
"\n" \
"Quadrapassel is a part of GNOME Games.");
	_tmp7_ = _ ("Quadrapassel");
	_tmp8_ = games_get_license (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _ ("GNOME Games web site");
	_tmp11_ = _ ("translator-credits");
	gtk_show_about_dialog (_tmp4_, "program-name", _tmp5_, "version", VERSION, "comments", _tmp6_, "copyright", "Copyright \xc2\xa9 1999 J. Marcin Gorycki, 2000-2009 Others", "license", _tmp9_, "website-label", _tmp10_, "authors", authors, "documenters", documenters, "translator-credits", _tmp11_, "logo-icon-name", "quadrapassel", "website", "http://wwmain_window.gnome.org/projects/gnome-games/", "wrap-license", TRUE, NULL, NULL);
	_g_free0 (_tmp9_);
	documenters = (_vala_array_free (documenters, documenters_length1, (GDestroyNotify) g_free), NULL);
	authors = (_vala_array_free (authors, authors_length1, (GDestroyNotify) g_free), NULL);
}


static void quadrapassel_scores_cb (Quadrapassel* self) {
	GtkWindow* _tmp0_;
	GamesScores* _tmp1_;
	const gchar* _tmp2_ = NULL;
	GamesScoresDialog* _tmp3_;
	GamesScoresDialog* _tmp4_;
	GamesScoresDialog* dialog;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_window;
	_tmp1_ = self->priv->high_scores;
	_tmp2_ = _ ("Quadrapassel Scores");
	_tmp3_ = games_scores_dialog_new (_tmp0_, _tmp1_, _tmp2_);
	_tmp4_ = g_object_ref_sink (_tmp3_);
	dialog = _tmp4_;
	gtk_dialog_run ((GtkDialog*) dialog);
	gtk_widget_destroy ((GtkWidget*) dialog);
	_g_object_unref0 (dialog);
}


gint quadrapassel_main (gchar** args, int args_length1) {
	gint result = 0;
	GOptionContext* _tmp0_;
	GOptionContext* context;
	GOptionContext* _tmp1_;
	GOptionGroup* _tmp2_ = NULL;
	GOptionContext* _tmp3_;
	GOptionGroup* _tmp4_ = NULL;
	const gchar* _tmp9_ = NULL;
	Quadrapassel* _tmp20_;
	Quadrapassel* app;
	Quadrapassel* _tmp21_;
	gchar** _tmp22_;
	gint _tmp22__length1;
	gint _tmp23_ = 0;
	GError * _inner_error_ = NULL;
	setlocale (LC_ALL, "");
	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
	games_scores_startup ();
	_tmp0_ = g_option_context_new ("");
	context = _tmp0_;
	_tmp1_ = context;
	_tmp2_ = gtk_get_option_group (TRUE);
	g_option_context_add_group (_tmp1_, _tmp2_);
	_tmp3_ = context;
	_tmp4_ = clutter_get_option_group_without_init ();
	g_option_context_add_group (_tmp3_, _tmp4_);
	{
		GOptionContext* _tmp5_;
		_tmp5_ = context;
		g_option_context_parse (_tmp5_, &args_length1, &args, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch2_g_error;
		}
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
		FILE* _tmp6_;
		GError* _tmp7_;
		const gchar* _tmp8_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp6_ = stderr;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		fprintf (_tmp6_, "%s\n", _tmp8_);
		result = EXIT_FAILURE;
		_g_error_free0 (e);
		_g_option_context_free0 (context);
		return result;
	}
	__finally2:
	if (_inner_error_ != NULL) {
		_g_option_context_free0 (context);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp9_ = _ ("Quadrapassel");
	g_set_application_name (_tmp9_);
	gtk_window_set_default_icon_name ("quadrapassel");
	{
		GOptionEntry* _tmp10_ = NULL;
		GOptionEntry* _tmp11_;
		gint _tmp11__length1;
		_tmp10_ = g_new0 (GOptionEntry, 0);
		_tmp11_ = _tmp10_;
		_tmp11__length1 = 0;
		gtk_clutter_init_with_args (&args_length1, &args, "", _tmp11_, NULL, &_inner_error_);
		_tmp11_ = (g_free (_tmp11_), NULL);
		if (_inner_error_ != NULL) {
			goto __catch3_g_error;
		}
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
		GError* _tmp12_;
		const gchar* _tmp13_;
		GtkMessageDialog* _tmp14_;
		GtkMessageDialog* _tmp15_;
		GtkMessageDialog* dialog;
		GtkMessageDialog* _tmp16_;
		const gchar* _tmp17_ = NULL;
		GtkMessageDialog* _tmp18_;
		GtkMessageDialog* _tmp19_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp12_ = e;
		_tmp13_ = _tmp12_->message;
		_tmp14_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, "Unable to initialize Clutter:\n%s", _tmp13_);
		_tmp15_ = g_object_ref_sink (_tmp14_);
		dialog = _tmp15_;
		_tmp16_ = dialog;
		_tmp17_ = g_get_application_name ();
		gtk_window_set_title ((GtkWindow*) _tmp16_, _tmp17_);
		_tmp18_ = dialog;
		gtk_dialog_run ((GtkDialog*) _tmp18_);
		_tmp19_ = dialog;
		gtk_widget_destroy ((GtkWidget*) _tmp19_);
		result = EXIT_FAILURE;
		_g_object_unref0 (dialog);
		_g_error_free0 (e);
		_g_option_context_free0 (context);
		return result;
	}
	__finally3:
	if (_inner_error_ != NULL) {
		_g_option_context_free0 (context);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp20_ = quadrapassel_new ();
	app = _tmp20_;
	_tmp21_ = app;
	_tmp22_ = args;
	_tmp22__length1 = args_length1;
	_tmp23_ = g_application_run ((GApplication*) _tmp21_, _tmp22__length1, _tmp22_);
	result = _tmp23_;
	_g_object_unref0 (app);
	_g_option_context_free0 (context);
	return result;
}


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


static void quadrapassel_class_init (QuadrapasselClass * klass) {
	quadrapassel_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (QuadrapasselPrivate));
	G_APPLICATION_CLASS (klass)->startup = quadrapassel_real_startup;
	G_APPLICATION_CLASS (klass)->shutdown = quadrapassel_real_shutdown;
	G_APPLICATION_CLASS (klass)->activate = quadrapassel_real_activate;
	G_OBJECT_CLASS (klass)->finalize = quadrapassel_finalize;
}


static void quadrapassel_instance_init (Quadrapassel * self) {
	self->priv = QUADRAPASSEL_GET_PRIVATE (self);
	self->priv->game = NULL;
}


static void quadrapassel_finalize (GObject* obj) {
	Quadrapassel * self;
	self = QUADRAPASSEL (obj);
	_g_object_unref0 (self->priv->settings);
	_g_object_unref0 (self->priv->main_window);
	_g_object_unref0 (self->priv->game);
	_g_object_unref0 (self->priv->view);
	_g_object_unref0 (self->priv->preview);
	_g_object_unref0 (self->priv->score_label);
	_g_object_unref0 (self->priv->n_destroyed_label);
	_g_object_unref0 (self->priv->level_label);
	_g_object_unref0 (self->priv->high_scores);
	_g_object_unref0 (self->priv->pause);
	_g_object_unref0 (self->priv->pause_action);
	_g_object_unref0 (self->priv->fullscreen_action);
	_g_object_unref0 (self->priv->preferences_dialog);
	_g_object_unref0 (self->priv->starting_level_spin);
	_g_object_unref0 (self->priv->theme_preview);
	_g_object_unref0 (self->priv->fill_height_spinner);
	_g_object_unref0 (self->priv->fill_prob_spinner);
	_g_object_unref0 (self->priv->do_preview_toggle);
	_g_object_unref0 (self->priv->difficult_blocks_toggle);
	_g_object_unref0 (self->priv->rotate_counter_clock_wise_toggle);
	_g_object_unref0 (self->priv->show_shadow_toggle);
	_g_object_unref0 (self->priv->sound_toggle);
	G_OBJECT_CLASS (quadrapassel_parent_class)->finalize (obj);
}


GType quadrapassel_get_type (void) {
	static volatile gsize quadrapassel_type_id__volatile = 0;
	if (g_once_init_enter (&quadrapassel_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (QuadrapasselClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) quadrapassel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Quadrapassel), 0, (GInstanceInitFunc) quadrapassel_instance_init, NULL };
		GType quadrapassel_type_id;
		quadrapassel_type_id = g_type_register_static (GTK_TYPE_APPLICATION, "Quadrapassel", &g_define_type_info, 0);
		g_once_init_leave (&quadrapassel_type_id__volatile, quadrapassel_type_id);
	}
	return quadrapassel_type_id__volatile;
}


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


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



