/* gnome-klotski.c generated by valac 0.26.0.30-a52f5a, the Vala compiler
 * generated from gnome-klotski.vala, do not modify */

/*
 * Copyright (C) 2010-2013 Robert Ancell
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 2 of the License, or (at your option) any later
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 * license.
 */
/* Puzzle Info */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
#include <stdio.h>
#include <glib/gstdio.h>
#include <locale.h>
#include <cairo.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <float.h>
#include <math.h>


#define TYPE_LEVEL_INFO (level_info_get_type ())
typedef struct _LevelInfo LevelInfo;
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_KLOTSKI (klotski_get_type ())
#define KLOTSKI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KLOTSKI, Klotski))
#define KLOTSKI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KLOTSKI, KlotskiClass))
#define IS_KLOTSKI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KLOTSKI))
#define IS_KLOTSKI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KLOTSKI))
#define KLOTSKI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KLOTSKI, KlotskiClass))

typedef struct _Klotski Klotski;
typedef struct _KlotskiClass KlotskiClass;
typedef struct _KlotskiPrivate KlotskiPrivate;

#define TYPE_PUZZLE_VIEW (puzzle_view_get_type ())
#define PUZZLE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PUZZLE_VIEW, PuzzleView))
#define PUZZLE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PUZZLE_VIEW, PuzzleViewClass))
#define IS_PUZZLE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PUZZLE_VIEW))
#define IS_PUZZLE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PUZZLE_VIEW))
#define PUZZLE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PUZZLE_VIEW, PuzzleViewClass))

typedef struct _PuzzleView PuzzleView;
typedef struct _PuzzleViewClass PuzzleViewClass;

#define TYPE_PUZZLE (puzzle_get_type ())
#define PUZZLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PUZZLE, Puzzle))
#define PUZZLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PUZZLE, PuzzleClass))
#define IS_PUZZLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PUZZLE))
#define IS_PUZZLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PUZZLE))
#define PUZZLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PUZZLE, PuzzleClass))

typedef struct _Puzzle Puzzle;
typedef struct _PuzzleClass PuzzleClass;

#define TYPE_HISTORY (history_get_type ())
#define HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HISTORY, History))
#define HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HISTORY, HistoryClass))
#define IS_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HISTORY))
#define IS_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HISTORY))
#define HISTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HISTORY, HistoryClass))

typedef struct _History History;
typedef struct _HistoryClass HistoryClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define TYPE_CELL_RENDERER_LEVEL (cell_renderer_level_get_type ())
#define CELL_RENDERER_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CELL_RENDERER_LEVEL, CellRendererLevel))
#define CELL_RENDERER_LEVEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CELL_RENDERER_LEVEL, CellRendererLevelClass))
#define IS_CELL_RENDERER_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CELL_RENDERER_LEVEL))
#define IS_CELL_RENDERER_LEVEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CELL_RENDERER_LEVEL))
#define CELL_RENDERER_LEVEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CELL_RENDERER_LEVEL, CellRendererLevelClass))

typedef struct _CellRendererLevel CellRendererLevel;
typedef struct _CellRendererLevelClass CellRendererLevelClass;

#define TYPE_HISTORY_ENTRY (history_entry_get_type ())
#define HISTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HISTORY_ENTRY, HistoryEntry))
#define HISTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HISTORY_ENTRY, HistoryEntryClass))
#define IS_HISTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HISTORY_ENTRY))
#define IS_HISTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HISTORY_ENTRY))
#define HISTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HISTORY_ENTRY, HistoryEntryClass))

typedef struct _HistoryEntry HistoryEntry;
typedef struct _HistoryEntryClass HistoryEntryClass;
#define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL)))
typedef struct _PuzzlePrivate PuzzlePrivate;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define TYPE_SCORE_DIALOG (score_dialog_get_type ())
#define SCORE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCORE_DIALOG, ScoreDialog))
#define SCORE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCORE_DIALOG, ScoreDialogClass))
#define IS_SCORE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCORE_DIALOG))
#define IS_SCORE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCORE_DIALOG))
#define SCORE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCORE_DIALOG, ScoreDialogClass))

typedef struct _ScoreDialog ScoreDialog;
typedef struct _ScoreDialogClass ScoreDialogClass;
typedef struct _CellRendererLevelPrivate CellRendererLevelPrivate;

struct _LevelInfo {
	gchar* name;
	gint group;
	gint width;
	gint height;
	gchar* data;
};

struct _Klotski {
	GtkApplication parent_instance;
	KlotskiPrivate * priv;
};

struct _KlotskiClass {
	GtkApplicationClass parent_class;
};

struct _KlotskiPrivate {
	GSettings* settings;
	GtkWindow* window;
	gint window_width;
	gint window_height;
	gboolean is_maximized;
	GtkBox* puzzles_panel;
	GtkButton* next_button;
	GtkButton* prev_button;
	GSimpleAction* next_level_action;
	GSimpleAction* prev_level_action;
	GSimpleAction* new_game_action;
	PuzzleView* view;
	GtkHeaderBar* headerbar;
	Puzzle* puzzle;
	gint current_level;
	History* history;
	GtkTreeStore* puzzles;
	GtkTreeIter* puzzles_items;
	gint puzzles_items_length1;
	gint _puzzles_items_size_;
};

struct _Puzzle {
	GObject parent_instance;
	PuzzlePrivate * priv;
	gint width;
	gint height;
	gchar* map;
	gint map_length1;
	gchar* move_map;
	gint move_map_length1;
	gchar* orig_map;
	gint orig_map_length1;
	gchar* lastmove_map;
	gint lastmove_map_length1;
	gchar* undomove_map;
	gint undomove_map_length1;
	gint moves;
};

struct _PuzzleClass {
	GObjectClass parent_class;
};

struct _CellRendererLevel {
	GtkCellRenderer parent_instance;
	CellRendererLevelPrivate * priv;
};

struct _CellRendererLevelClass {
	GtkCellRendererClass parent_class;
};


static gpointer klotski_parent_class = NULL;
static gpointer cell_renderer_level_parent_class = NULL;

GType level_info_get_type (void) G_GNUC_CONST;
LevelInfo* level_info_dup (const LevelInfo* self);
void level_info_free (LevelInfo* self);
void level_info_copy (const LevelInfo* self, LevelInfo* dest);
void level_info_destroy (LevelInfo* self);
GType klotski_get_type (void) G_GNUC_CONST;
GType puzzle_view_get_type (void) G_GNUC_CONST;
GType puzzle_get_type (void) G_GNUC_CONST;
GType history_get_type (void) G_GNUC_CONST;
#define KLOTSKI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_KLOTSKI, KlotskiPrivate))
enum  {
	KLOTSKI_DUMMY_PROPERTY
};
#define KLOTSKI_MINWIDTH 250
#define KLOTSKI_MINHEIGHT 250
#define KLOTSKI_SPACE_PADDING 5
#define KLOTSKI_KEY_LEVEL "level"
static void klotski_restart_level_cb (Klotski* self);
static void _klotski_restart_level_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_toggle_puzzles_cb (Klotski* self);
static void _klotski_toggle_puzzles_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_next_level_cb (Klotski* self);
static void _klotski_next_level_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_prev_level_cb (Klotski* self);
static void _klotski_prev_level_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_scores_cb (Klotski* self);
static void _klotski_scores_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_help_cb (Klotski* self);
static void _klotski_help_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_about_cb (Klotski* self);
static void _klotski_about_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_quit_cb (Klotski* self);
static void _klotski_quit_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
Klotski* klotski_new (void);
Klotski* klotski_construct (GType object_type);
static void klotski_real_startup (GApplication* base);
History* history_new (const gchar* filename);
History* history_construct (GType object_type, const gchar* filename);
void history_load (History* self);
static gboolean klotski_window_configure_event_cb (Klotski* self, GdkEventConfigure* event);
static gboolean _klotski_window_configure_event_cb_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self);
static gboolean klotski_window_state_event_cb (Klotski* self, GdkEventWindowState* event);
static gboolean _klotski_window_state_event_cb_gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self);
static void klotski_render_puzzle_name (GtkCellLayout* cell_layout, GtkCellRendererText* cell, GtkTreeModel* tree_model, GtkTreeIter* iter);
CellRendererLevel* cell_renderer_level_new (void);
CellRendererLevel* cell_renderer_level_construct (GType object_type);
GType cell_renderer_level_get_type (void) G_GNUC_CONST;
static void klotski_level_cb (Klotski* self, GtkTreePath* path, GtkTreeViewColumn* column);
static void _klotski_level_cb_gtk_tree_view_row_activated (GtkTreeView* _sender, GtkTreePath* path, GtkTreeViewColumn* column, gpointer self);
static void _klotski_prev_level_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void _klotski_next_level_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
PuzzleView* puzzle_view_new (void);
PuzzleView* puzzle_view_construct (GType object_type);
static void klotski_load_solved_state (Klotski* self);
static void klotski_new_game (Klotski* self, gint requested_level);
GType history_entry_get_type (void) G_GNUC_CONST;
static gint klotski_show_scores (Klotski* self, HistoryEntry* selected_entry, gboolean show_close);
static void klotski_game_score (Klotski* self);
static gchar* klotski_get_level_key (Klotski* self, gint level_number);
HistoryEntry* history_entry_new (GDateTime* date, guint level, guint moves);
HistoryEntry* history_entry_construct (GType object_type, GDateTime* date, guint level, guint moves);
void history_add (History* self, HistoryEntry* entry);
void history_save (History* self);
GType score_dialog_get_type (void) G_GNUC_CONST;
ScoreDialog* score_dialog_new (History* history, HistoryEntry* selected_entry, gboolean show_close);
ScoreDialog* score_dialog_construct (GType object_type, History* history, HistoryEntry* selected_entry, gboolean show_close);
static void klotski_update_menu_state (Klotski* self);
static void klotski_update_moves_label (Klotski* self);
Puzzle* puzzle_new (gint width, gint height, const gchar* data);
Puzzle* puzzle_construct (GType object_type, gint width, gint height, const gchar* data);
static void klotski_puzzle_moved_cb (Klotski* self);
static void _klotski_puzzle_moved_cb_puzzle_moved (Puzzle* _sender, gpointer self);
void puzzle_view_set_puzzle (PuzzleView* self, Puzzle* value);
gboolean puzzle_game_over (Puzzle* self);
static void klotski_real_shutdown (GApplication* base);
static gint klotski_real_handle_local_options (GApplication* base, GVariantDict* options);
static void klotski_real_activate (GApplication* base);
gint klotski_main (gchar** args, int args_length1);
static void klotski_finalize (GObject* obj);
enum  {
	CELL_RENDERER_LEVEL_DUMMY_PROPERTY
};
#define CELL_RENDERER_LEVEL_icon_size 10
static void cell_renderer_level_real_get_size (GtkCellRenderer* base, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height);
static void cell_renderer_level_real_render (GtkCellRenderer* base, cairo_t* ctx, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags);

const LevelInfo KLOTSKI_level[28] = {{"Only 18 Steps", 0, 6, 9, "######" "#a**b#" "#m**n#" "#cdef#" "#ghij#" "#k  l#" "##--##" "    .." "    .."}, {"Daisy", 0, 6, 9, "######" "#a**b#" "#a**b#" "#cdef#" "#zghi#" "#j  k#" "##--##" "    .." "    .."}, {"Violet", 0, 6, 9, "######" "#a**b#" "#a**b#" "#cdef#" "#cghi#" "#j  k#" "##--##" "    .." "    .."}, {"Poppy", 0, 6, 9, "######" "#a**b#" "#a**b#" "#cdde#" "#fghi#" "#j  k#" "##--##" "    .." "    .."}, {"Pansy", 0, 6, 9, "######" "#a**b#" "#a**b#" "#cdef#" "#cghf#" "#i  j#" "##--##" "    .." "    .."}, {"Snowdrop", 0, 6, 9, "######" "#a**b#" "#a**b#" "#cdde#" "#cfgh#" "#i  j#" "##--##" "    .." "    .."}, {"Red Donkey", 0, 6, 9, "######" "#a**b#" "#a**b#" "#cdde#" "#cfge#" "#h  i#" "##--##" "    .." "    .."}, {"Trail", 0, 6, 9, "######" "#a**c#" "#a**c#" "#eddg#" "#hffj#" "# ii #" "##--##" "    .." "    .."}, {"Ambush", 0, 6, 9, "######" "#a**c#" "#d**e#" "#dffe#" "#ghhi#" "# jj #" "##--##" "    .." "    .."}, {"Agatka", 1, 7, 7, "..     " ".      " "#####--" "#**aab-" "#*ccde#" "#fgh  #" "#######"}, {"Success", 1, 9, 6, "#######  " "#**bbc#  " "#defgh#  " "#ijkgh-  " "#llk  #  " "#######.."}, {"Bone", 1, 6, 9, "######" "#abc*#" "# dd*#" "# ee*#" "# fgh#" "##-###" "     ." "     ." "     ."}, {"Fortune", 1, 7, 10, "     .." "     . " "####-. " "#ab  - " "#ccd # " "#ccd # " "#**ee# " "#*fgh# " "#*iih# " "###### "}, {"Fool", 1, 10, 6, "  ########" "  -aabc  #" "  #aabdef#" "  #ijggef#" "  #klhh**#" "..########"}, {"Solomon", 1, 7, 9, " .     " "..     " "#--####" "#  aab#" "# cdfb#" "#hcefg#" "#hijk*#" "#hll**#" "#######"}, {"Cleopatra", 1, 6, 8, "######" "#abcd#" "#**ee#" "#f*g #" "#fh i-" "####--" "    .." "     ."}, {"Shark", 1, 11, 8, "########   " "#nrr s #   " "#n*op q#   " "#***jml#   " "#hhijkl#   " "#ffcddg-   " "#abcdde- . " "########..."}, {"Rome", 1, 8, 8, "########" "#abcc**#" "#ddeef*#" "#ddghfi#" "#   jki#" "#--#####" " ..     " "  .     "}, {"Pennant Puzzle", 1, 6, 9, "######" "#**aa#" "#**bb#" "#de  #" "#fghh#" "#fgii#" "#--###" "    .." "    .."}, {"Ithaca", 2, 19, 19, ".aaaaaaaaaaaaaaaaab" "..  cddeffffffffffb" " .. cddeffffffffffb" "  . cddeffffffffffb" "ggg-############hhb" "ggg-  ABCDEFFGH#hhb" "ggg-       FFIJ#hhb" "ggg#       KLMJ#hhb" "ggg#NNNNOOOPQMJ#hhb" "ggg#NNNNOOOP*RS#hhb" "ggg#TTTTTUVW**X#hhb" "ggg#YZ12222W3**#hhb" "ggg#YZ12222W34*#iib" "jjj#YZ155555367#klb" "jjj#############mmb" "jjjnooooooooooppppb" "jjjqooooooooooppppb" "       rrrssssppppb" "ttttttuvvvvvvvwwwwx"}, {"Pelopones", 2, 9, 8, "#########" "#abbb***#" "#abbb*c*#" "#adeefgg#" "#  eefhh#" "#... ihh#" "#. . ihh#" "#########"}, {"Transeuropa", 2, 15, 8, "    ###########" "    -AAAAABBCC#" "    -   DEFGHI#" "    #   DEFGJI#" "    #   KEFGLI#" "    #   KEFG*I#" "  . #   MM****#" "....###########"}, {"Lodzianka", 2, 9, 7, "#########" "#**abbcc#" "#**abbdd#" "#eefgh  #" "#iiijk..#" "#iiijk..#" "#########"}, {"Polonaise", 2, 7, 7, "#######" "#aab**#" "#aabc*#" "#defgg#" "#..fhh#" "# .ihh#" "#######"}, {"Baltic Sea", 2, 6, 8, "######" "#.abc#" "#.dec#" "#fggc#" "#fhhi#" "#fjk*#" "#flk*#" "######"}, {"American Pie", 2, 10, 12, "##########" "#a*bcdefg#" "#**bhhhhg#" "#*iijjkkg#" "#liimnoop#" "#qiirrr  #" "#qstuvv  #" "#qwwxvv  #" "######--##" "         ." "        .." "        . "}, {"Traffic Jam", 2, 10, 7, "########  " "#** ffi#  " "#** fgh#  " "#aacehh#  " "#bbdjlm-  " "#bddklm-.." "########.."}, {"Sunshine", 2, 17, 22, "       ...       " "      .. ..      " "      .   .      " "      .. ..      " "       ...       " "######-----######" "#hh0iilltmmpp;qq#" "#hh,iill mmpp:qq#" "#2y{45v s w89x/z#" "#jj6kkaa nnoo<rr#" "#jj7kkaaunnoo>rr#" "#33333TTJWW11111#" "#33333TTJWW11111#" "#33333GG HH11111#" "#33333YYIgg11111#" "#33333YYIgg11111#" "#ddFeeA***BffOZZ#" "#ddFee** **ffOZZ#" "#MMKQQ*   *PPS^^#" "#VVLXX** **bbRcc#" "#VVLXXD***EbbRcc#" "#################"}};
static const GOptionEntry KLOTSKI_option_entries[2] = {{"version", 'v', 0, G_OPTION_ARG_NONE, NULL, "Print release version and exit", NULL}, {NULL}};
static const GActionEntry KLOTSKI_action_entries[8] = {{"new-game", _klotski_restart_level_cb_gsimple_action_activate_callback}, {"show-puzzles", _klotski_toggle_puzzles_cb_gsimple_action_activate_callback}, {"next-level", _klotski_next_level_cb_gsimple_action_activate_callback}, {"prev-level", _klotski_prev_level_cb_gsimple_action_activate_callback}, {"scores", _klotski_scores_cb_gsimple_action_activate_callback}, {"help", _klotski_help_cb_gsimple_action_activate_callback}, {"about", _klotski_about_cb_gsimple_action_activate_callback}, {"quit", _klotski_quit_cb_gsimple_action_activate_callback}};

void level_info_copy (const LevelInfo* self, LevelInfo* dest) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = (*self).name;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 ((*dest).name);
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).name = _tmp1_;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = (*self).group;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).group = _tmp2_;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = (*self).width;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).width = _tmp3_;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = (*self).height;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).height = _tmp4_;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = (*self).data;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 ((*dest).data);
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).data = _tmp6_;
#line 315 "gnome-klotski.c"
}


void level_info_destroy (LevelInfo* self) {
#line 14 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 ((*self).name);
#line 18 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 ((*self).data);
#line 324 "gnome-klotski.c"
}


LevelInfo* level_info_dup (const LevelInfo* self) {
	LevelInfo* dup;
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	dup = g_new0 (LevelInfo, 1);
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	level_info_copy (self, dup);
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return dup;
#line 336 "gnome-klotski.c"
}


void level_info_free (LevelInfo* self) {
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	level_info_destroy (self);
#line 12 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_free (self);
#line 345 "gnome-klotski.c"
}


GType level_info_get_type (void) {
	static volatile gsize level_info_type_id__volatile = 0;
	if (g_once_init_enter (&level_info_type_id__volatile)) {
		GType level_info_type_id;
		level_info_type_id = g_boxed_type_register_static ("LevelInfo", (GBoxedCopyFunc) level_info_dup, (GBoxedFreeFunc) level_info_free);
		g_once_init_leave (&level_info_type_id__volatile, level_info_type_id);
	}
	return level_info_type_id__volatile;
}


static void _klotski_restart_level_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 438 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_restart_level_cb ((Klotski*) self);
#line 363 "gnome-klotski.c"
}


static void _klotski_toggle_puzzles_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 438 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_toggle_puzzles_cb ((Klotski*) self);
#line 370 "gnome-klotski.c"
}


static void _klotski_next_level_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 438 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_next_level_cb ((Klotski*) self);
#line 377 "gnome-klotski.c"
}


static void _klotski_prev_level_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 438 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_prev_level_cb ((Klotski*) self);
#line 384 "gnome-klotski.c"
}


static void _klotski_scores_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 438 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_scores_cb ((Klotski*) self);
#line 391 "gnome-klotski.c"
}


static void _klotski_help_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 438 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_help_cb ((Klotski*) self);
#line 398 "gnome-klotski.c"
}


static void _klotski_about_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 438 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_about_cb ((Klotski*) self);
#line 405 "gnome-klotski.c"
}


static void _klotski_quit_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 438 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_quit_cb ((Klotski*) self);
#line 412 "gnome-klotski.c"
}


Klotski* klotski_construct (GType object_type) {
	Klotski * self = NULL;
#line 452 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (Klotski*) g_object_new (object_type, "application-id", "org.gnome.klotski", "flags", G_APPLICATION_FLAGS_NONE, NULL);
#line 454 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_application_add_main_option_entries ((GApplication*) self, KLOTSKI_option_entries);
#line 450 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return self;
#line 424 "gnome-klotski.c"
}


Klotski* klotski_new (void) {
#line 450 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return klotski_construct (TYPE_KLOTSKI);
#line 431 "gnome-klotski.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 481 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return self ? g_object_ref (self) : NULL;
#line 438 "gnome-klotski.c"
}


static gboolean _klotski_window_configure_event_cb_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self) {
	gboolean result;
	result = klotski_window_configure_event_cb ((Klotski*) self, event);
#line 505 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 447 "gnome-klotski.c"
}


static gboolean _klotski_window_state_event_cb_gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self) {
	gboolean result;
	result = klotski_window_state_event_cb ((Klotski*) self, event);
#line 506 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 456 "gnome-klotski.c"
}


static void _klotski_level_cb_gtk_tree_view_row_activated (GtkTreeView* _sender, GtkTreePath* path, GtkTreeViewColumn* column, gpointer self) {
#line 616 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_level_cb ((Klotski*) self, path, column);
#line 463 "gnome-klotski.c"
}


static void _klotski_prev_level_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 633 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_prev_level_cb ((Klotski*) self);
#line 470 "gnome-klotski.c"
}


static void _klotski_next_level_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 639 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_next_level_cb ((Klotski*) self);
#line 477 "gnome-klotski.c"
}


static void klotski_real_startup (GApplication* base) {
	Klotski * self;
	const gchar* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	GtkCssProvider* css_provider = NULL;
	GtkCssProvider* _tmp2_ = NULL;
	GdkScreen* _tmp8_ = NULL;
	GAction* _tmp9_ = NULL;
	GSimpleAction* _tmp10_ = NULL;
	GSimpleAction* _tmp11_ = NULL;
	GAction* _tmp12_ = NULL;
	GSimpleAction* _tmp13_ = NULL;
	GSimpleAction* _tmp14_ = NULL;
	gint _tmp15_ = 0;
	GAction* _tmp16_ = NULL;
	GSimpleAction* _tmp17_ = NULL;
	GSimpleAction* _tmp18_ = NULL;
	gint _tmp19_ = 0;
	gchar* histfile = NULL;
	const gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	const gchar* _tmp22_ = NULL;
	History* _tmp23_ = NULL;
	History* _tmp24_ = NULL;
	GtkHeaderBar* _tmp25_ = NULL;
	GtkHeaderBar* _tmp26_ = NULL;
	GtkHeaderBar* _tmp27_ = NULL;
	GtkApplicationWindow* _tmp28_ = NULL;
	GtkWindow* _tmp29_ = NULL;
	GtkHeaderBar* _tmp30_ = NULL;
	GtkWindow* _tmp31_ = NULL;
	GtkWindow* _tmp32_ = NULL;
	gint ww = 0;
	GSettings* _tmp33_ = NULL;
	gint _tmp34_ = 0;
	gint _tmp35_ = 0;
	gint wh = 0;
	GSettings* _tmp36_ = NULL;
	gint _tmp37_ = 0;
	gint _tmp38_ = 0;
	GtkWindow* _tmp39_ = NULL;
	gint _tmp40_ = 0;
	gint _tmp41_ = 0;
	GtkWindow* _tmp42_ = NULL;
	GSettings* _tmp43_ = NULL;
	gboolean _tmp44_ = FALSE;
	GtkBox* hbox = NULL;
	GtkBox* _tmp46_ = NULL;
	GtkWindow* _tmp47_ = NULL;
	gchar* builder_str = NULL;
	gchar* _tmp48_ = NULL;
	GtkBuilder* builder = NULL;
	GtkBuilder* _tmp49_ = NULL;
	GObject* _tmp52_ = NULL;
	GtkTreeStore* _tmp53_ = NULL;
	GtkTreeIter huarong_item = {0};
	GtkTreeStore* _tmp54_ = NULL;
	GtkTreeIter _tmp55_ = {0};
	GtkTreeStore* _tmp56_ = NULL;
	GtkTreeIter _tmp57_ = {0};
	GtkTreeIter challenge_item = {0};
	GtkTreeStore* _tmp58_ = NULL;
	GtkTreeIter _tmp59_ = {0};
	GtkTreeStore* _tmp60_ = NULL;
	GtkTreeIter _tmp61_ = {0};
	GtkTreeIter skill_item = {0};
	GtkTreeStore* _tmp62_ = NULL;
	GtkTreeIter _tmp63_ = {0};
	GtkTreeStore* _tmp64_ = NULL;
	GtkTreeIter _tmp65_ = {0};
	GtkTreeIter* _tmp66_ = NULL;
	GtkBox* _tmp115_ = NULL;
	GtkBox* _tmp116_ = NULL;
	GtkTreeView* puzzles_view = NULL;
	GtkTreeStore* _tmp117_ = NULL;
	GtkTreeView* _tmp118_ = NULL;
	GtkCellRendererText* cell = NULL;
	GtkCellRendererText* _tmp119_ = NULL;
	GtkTreeViewColumn* col = NULL;
	GtkTreeViewColumn* _tmp120_ = NULL;
	Klotski* _tmp121_ = NULL;
	CellRendererLevel* _tmp122_ = NULL;
	CellRendererLevel* _tmp123_ = NULL;
	GtkScrolledWindow* scroll = NULL;
	GtkScrolledWindow* _tmp124_ = NULL;
	GtkBox* _tmp125_ = NULL;
	GtkBox* bbox = NULL;
	GtkBox* _tmp126_ = NULL;
	GtkStyleContext* context = NULL;
	GtkBox* _tmp127_ = NULL;
	GtkStyleContext* _tmp128_ = NULL;
	GtkStyleContext* _tmp129_ = NULL;
	GtkBox* _tmp130_ = NULL;
	GtkBox* _tmp131_ = NULL;
	const gchar* _tmp132_ = NULL;
	GtkButton* _tmp133_ = NULL;
	GtkButton* _tmp134_ = NULL;
	GtkButton* _tmp135_ = NULL;
	gint _tmp136_ = 0;
	GtkButton* _tmp137_ = NULL;
	GtkBox* _tmp138_ = NULL;
	GtkButton* _tmp139_ = NULL;
	const gchar* _tmp140_ = NULL;
	GtkButton* _tmp141_ = NULL;
	GtkButton* _tmp142_ = NULL;
	GtkButton* _tmp143_ = NULL;
	gint _tmp144_ = 0;
	GtkButton* _tmp145_ = NULL;
	GtkBox* _tmp146_ = NULL;
	GtkButton* _tmp147_ = NULL;
	GtkBox* _tmp148_ = NULL;
	GtkBox* _tmp149_ = NULL;
	GtkBox* _tmp150_ = NULL;
	PuzzleView* _tmp151_ = NULL;
	PuzzleView* _tmp152_ = NULL;
	PuzzleView* _tmp153_ = NULL;
	PuzzleView* _tmp154_ = NULL;
	GtkButtonBox* _tmp155_ = NULL;
	GtkBox* _tmp156_ = NULL;
	GtkBox* _tmp157_ = NULL;
	GtkBox* _tmp158_ = NULL;
	GtkBox* _tmp159_ = NULL;
	GtkBox* _tmp160_ = NULL;
	GtkButton* button = NULL;
	GtkButton* _tmp161_ = NULL;
	const gchar* _tmp162_ = NULL;
	GtkBox* _tmp163_ = NULL;
	GtkToggleButton* togglebutton = NULL;
	GtkToggleButton* _tmp164_ = NULL;
	const gchar* _tmp165_ = NULL;
	GtkBox* _tmp166_ = NULL;
	gint startup_level = 0;
	GSettings* _tmp167_ = NULL;
	gint _tmp168_ = 0;
	GError * _inner_error_ = NULL;
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (Klotski*) base;
#line 459 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_APPLICATION_CLASS (klotski_parent_class)->startup ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_get_type (), GtkApplication));
#line 461 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = _ ("Klotski");
#line 461 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_set_application_name (_tmp0_);
#line 463 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = g_settings_new ("org.gnome.klotski");
#line 463 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->settings);
#line 463 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->settings = _tmp1_;
#line 465 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_set_default_icon_name ("gnome-klotski");
#line 467 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = gtk_css_provider_new ();
#line 467 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	css_provider = _tmp2_;
#line 636 "gnome-klotski.c"
	{
		gchar* data = NULL;
		gchar* _tmp3_ = NULL;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
#line 471 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp3_ = g_strdup ("GtkButtonBox { -GtkButtonBox-child-internal-pad-x:0; }");
#line 471 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		data = _tmp3_;
#line 472 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp4_ = strlen (data);
#line 472 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp5_ = _tmp4_;
#line 472 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_css_provider_load_from_data (css_provider, data, (gssize) _tmp5_, &_inner_error_);
#line 472 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 472 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_g_free0 (data);
#line 656 "gnome-klotski.c"
			goto __catch0_g_error;
		}
#line 468 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (data);
#line 661 "gnome-klotski.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
#line 468 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 468 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 476 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp6_ = e;
#line 476 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp7_ = _tmp6_->message;
#line 476 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_warning ("gnome-klotski.vala:476: Error loading css styles: %s", _tmp7_);
#line 468 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 681 "gnome-klotski.c"
	}
	__finally0:
#line 468 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 468 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_object_unref0 (css_provider);
#line 468 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		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);
#line 468 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 468 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 694 "gnome-klotski.c"
	}
#line 478 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = gdk_screen_get_default ();
#line 478 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_style_context_add_provider_for_screen (_tmp8_, (GtkStyleProvider*) css_provider, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
#line 480 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_action_map_add_action_entries ((GActionMap*) self, KLOTSKI_action_entries, G_N_ELEMENTS (KLOTSKI_action_entries), self);
#line 481 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = g_action_map_lookup_action ((GActionMap*) self, "new-game");
#line 481 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp9_) : NULL);
#line 481 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->new_game_action);
#line 481 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->new_game_action = _tmp10_;
#line 482 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp11_ = self->priv->new_game_action;
#line 482 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp11_, FALSE);
#line 483 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp12_ = g_action_map_lookup_action ((GActionMap*) self, "next-level");
#line 483 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp12_) : NULL);
#line 483 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->next_level_action);
#line 483 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->next_level_action = _tmp13_;
#line 484 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp14_ = self->priv->next_level_action;
#line 484 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp15_ = self->priv->current_level;
#line 484 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp14_, _tmp15_ < (G_N_ELEMENTS (KLOTSKI_level) - 1));
#line 485 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp16_ = g_action_map_lookup_action ((GActionMap*) self, "prev-level");
#line 485 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp16_) : NULL);
#line 485 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->prev_level_action);
#line 485 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->prev_level_action = _tmp17_;
#line 486 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp18_ = self->priv->prev_level_action;
#line 486 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp19_ = self->priv->current_level;
#line 486 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp18_, _tmp19_ > 0);
#line 488 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_add_accelerator ((GtkApplication*) self, "<Primary>n", "app.new-game", NULL);
#line 489 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_add_accelerator ((GtkApplication*) self, "<Primary>q", "app.quit", NULL);
#line 490 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_add_accelerator ((GtkApplication*) self, "F1", "app.help", NULL);
#line 491 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_add_accelerator ((GtkApplication*) self, "Page_Up", "app.next-level", NULL);
#line 492 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_add_accelerator ((GtkApplication*) self, "Page_Down", "app.prev-level", NULL);
#line 494 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp20_ = g_get_user_data_dir ();
#line 494 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp21_ = g_build_filename (_tmp20_, "gnome-klotski", "history", NULL);
#line 494 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	histfile = _tmp21_;
#line 496 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp22_ = histfile;
#line 496 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp23_ = history_new (_tmp22_);
#line 496 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->history);
#line 496 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->history = _tmp23_;
#line 497 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp24_ = self->priv->history;
#line 497 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	history_load (_tmp24_);
#line 499 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp25_ = (GtkHeaderBar*) gtk_header_bar_new ();
#line 499 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp25_);
#line 499 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->headerbar);
#line 499 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->headerbar = _tmp25_;
#line 500 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp26_ = self->priv->headerbar;
#line 500 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_header_bar_set_show_close_button (_tmp26_, TRUE);
#line 501 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp27_ = self->priv->headerbar;
#line 501 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) _tmp27_);
#line 503 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp28_ = (GtkApplicationWindow*) gtk_application_window_new ((GtkApplication*) self);
#line 503 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp28_);
#line 503 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->window);
#line 503 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->window = (GtkWindow*) _tmp28_;
#line 504 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp29_ = self->priv->window;
#line 504 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp30_ = self->priv->headerbar;
#line 504 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_set_titlebar (_tmp29_, (GtkWidget*) _tmp30_);
#line 505 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp31_ = self->priv->window;
#line 505 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object ((GtkWidget*) _tmp31_, "configure-event", (GCallback) _klotski_window_configure_event_cb_gtk_widget_configure_event, self, 0);
#line 506 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp32_ = self->priv->window;
#line 506 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object ((GtkWidget*) _tmp32_, "window-state-event", (GCallback) _klotski_window_state_event_cb_gtk_widget_window_state_event, self, 0);
#line 508 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp33_ = self->priv->settings;
#line 508 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp34_ = g_settings_get_int (_tmp33_, "window-width");
#line 508 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp35_ = MAX (_tmp34_, KLOTSKI_MINWIDTH);
#line 508 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	ww = _tmp35_;
#line 509 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp36_ = self->priv->settings;
#line 509 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp37_ = g_settings_get_int (_tmp36_, "window-height");
#line 509 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp38_ = MAX (_tmp37_, KLOTSKI_MINHEIGHT);
#line 509 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	wh = _tmp38_;
#line 510 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp39_ = self->priv->window;
#line 510 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp40_ = ww;
#line 510 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp41_ = wh;
#line 510 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_set_default_size (_tmp39_, _tmp40_, _tmp41_);
#line 511 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp42_ = self->priv->window;
#line 511 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_container_set_border_width ((GtkContainer*) _tmp42_, (guint) 25);
#line 513 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp43_ = self->priv->settings;
#line 513 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp44_ = g_settings_get_boolean (_tmp43_, "window-is-maximized");
#line 513 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp44_) {
#line 842 "gnome-klotski.c"
		GtkWindow* _tmp45_ = NULL;
#line 514 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp45_ = self->priv->window;
#line 514 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_window_maximize (_tmp45_);
#line 848 "gnome-klotski.c"
	}
#line 516 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp46_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 25);
#line 516 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp46_);
#line 516 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	hbox = _tmp46_;
#line 517 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp47_ = self->priv->window;
#line 517 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_container_add ((GtkContainer*) _tmp47_, (GtkWidget*) hbox);
#line 521 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp48_ = g_strdup ("<interface>" "\n" \
"               <menu id='app-menu'>\n" \
"                  <section>\n" \
"                   <item>\n" \
"                      <attribute name='label' translatable='yes'>_New " \
"Game</attribute>\n" \
"                      <attribute name='action'>app.new-game</attribute" \
">\n" \
"                   </item>\n" \
"                   <item>\n" \
"                      <attribute name='label' translatable='yes'>_Scor" \
"es</attribute>\n" \
"                      <attribute name='action'>app.scores</attribute>\n" \
"                   </item>\n" \
"                  </section>\n" \
"                  <section>\n" \
"                   <item>\n" \
"                      <attribute name='label' translatable='yes'>_Help" \
"</attribute>\n" \
"                      <attribute name='action'>app.help</attribute>\n" \
"                   </item>\n" \
"                   <item>\n" \
"                      <attribute name='label' translatable='yes'>_Abou" \
"t</attribute>\n" \
"                      <attribute name='action'>app.about</attribute>\n" \
"                   </item>\n" \
"                   <item>\n" \
"                      <attribute name='label' translatable='yes'>_Quit" \
"</attribute>\n" \
"                      <attribute name='action'>app.quit</attribute>\n" \
"                   </item>\n" \
"                  </section>\n" \
"                </menu>\n" \
"               </interface>\n" \
"               ");
#line 521 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	builder_str = _tmp48_;
#line 554 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp49_ = gtk_builder_new ();
#line 554 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	builder = _tmp49_;
#line 868 "gnome-klotski.c"
	{
#line 558 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_builder_add_from_string (builder, builder_str, (gsize) (-1), &_inner_error_);
#line 558 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 874 "gnome-klotski.c"
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		FILE* _tmp50_ = NULL;
		const gchar* _tmp51_ = NULL;
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 562 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp50_ = stderr;
#line 562 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		fprintf (_tmp50_, "%s\n", "Error in gnome-klotski.vala function startup() - builder.add_from_stri" \
"ng failed");
#line 563 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp51_ = e->message;
#line 563 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_error ("gnome-klotski.vala:563: %s", _tmp51_);
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 898 "gnome-klotski.c"
	}
	__finally1:
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_object_unref0 (builder);
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (builder_str);
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_object_unref0 (hbox);
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (histfile);
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_object_unref0 (css_provider);
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		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);
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 556 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 919 "gnome-klotski.c"
	}
#line 566 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp52_ = gtk_builder_get_object (builder, "app-menu");
#line 566 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_set_app_menu ((GtkApplication*) self, G_TYPE_CHECK_INSTANCE_TYPE (_tmp52_, g_menu_model_get_type ()) ? ((GMenuModel*) _tmp52_) : NULL);
#line 568 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp53_ = gtk_tree_store_new (3, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT);
#line 568 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzles);
#line 568 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles = _tmp53_;
#line 571 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp54_ = self->priv->puzzles;
#line 571 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_store_append (_tmp54_, &_tmp55_, NULL);
#line 571 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	huarong_item = _tmp55_;
#line 572 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp56_ = self->priv->puzzles;
#line 572 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp57_ = huarong_item;
#line 572 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_store_set (_tmp56_, &_tmp57_, 0, "HuaRong Trail", 2, -1, -1, -1);
#line 575 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp58_ = self->priv->puzzles;
#line 575 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_store_append (_tmp58_, &_tmp59_, NULL);
#line 575 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	challenge_item = _tmp59_;
#line 576 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp60_ = self->priv->puzzles;
#line 576 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp61_ = challenge_item;
#line 576 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_store_set (_tmp60_, &_tmp61_, 0, "Challenge Pack", 2, -1, -1, -1);
#line 579 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp62_ = self->priv->puzzles;
#line 579 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_store_append (_tmp62_, &_tmp63_, NULL);
#line 579 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	skill_item = _tmp63_;
#line 580 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp64_ = self->priv->puzzles;
#line 580 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp65_ = skill_item;
#line 580 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_store_set (_tmp64_, &_tmp65_, 0, "Skill Pack", 2, -1, -1, -1);
#line 582 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp66_ = g_new0 (GtkTreeIter, G_N_ELEMENTS (KLOTSKI_level));
#line 582 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_items = (g_free (self->priv->puzzles_items), NULL);
#line 582 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_items = _tmp66_;
#line 582 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_items_length1 = G_N_ELEMENTS (KLOTSKI_level);
#line 582 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->_puzzles_items_size_ = self->priv->puzzles_items_length1;
#line 977 "gnome-klotski.c"
	{
		gint i = 0;
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		i = 0;
#line 982 "gnome-klotski.c"
		{
			gboolean _tmp67_ = FALSE;
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp67_ = TRUE;
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			while (TRUE) {
#line 989 "gnome-klotski.c"
				gint _tmp69_ = 0;
				gint _tmp70_ = 0;
				LevelInfo _tmp71_ = {0};
				gint _tmp72_ = 0;
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!_tmp67_) {
#line 996 "gnome-klotski.c"
					gint _tmp68_ = 0;
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp68_ = i;
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					i = _tmp68_ + 1;
#line 1002 "gnome-klotski.c"
				}
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp67_ = FALSE;
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp69_ = i;
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!(_tmp69_ < G_N_ELEMENTS (KLOTSKI_level))) {
#line 584 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					break;
#line 1012 "gnome-klotski.c"
				}
#line 586 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp70_ = i;
#line 586 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp71_ = KLOTSKI_level[_tmp70_];
#line 586 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp72_ = _tmp71_.group;
#line 586 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				switch (_tmp72_) {
#line 586 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					case 0:
#line 1024 "gnome-klotski.c"
					{
						GtkTreeStore* _tmp73_ = NULL;
						GtkTreeIter* _tmp74_ = NULL;
						gint _tmp74__length1 = 0;
						gint _tmp75_ = 0;
						GtkTreeIter _tmp76_ = {0};
						GtkTreeIter _tmp77_ = {0};
						GtkTreeStore* _tmp78_ = NULL;
						GtkTreeIter* _tmp79_ = NULL;
						gint _tmp79__length1 = 0;
						gint _tmp80_ = 0;
						GtkTreeIter _tmp81_ = {0};
						gint _tmp82_ = 0;
						LevelInfo _tmp83_ = {0};
						const gchar* _tmp84_ = NULL;
						const gchar* _tmp85_ = NULL;
						gint _tmp86_ = 0;
#line 589 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp73_ = self->priv->puzzles;
#line 589 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp74_ = self->priv->puzzles_items;
#line 589 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp74__length1 = self->priv->puzzles_items_length1;
#line 589 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp75_ = i;
#line 589 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp76_ = huarong_item;
#line 589 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_tree_store_append (_tmp73_, &_tmp77_, &_tmp76_);
#line 589 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp74_[_tmp75_] = _tmp77_;
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp78_ = self->priv->puzzles;
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp79_ = self->priv->puzzles_items;
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp79__length1 = self->priv->puzzles_items_length1;
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp80_ = i;
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp81_ = _tmp79_[_tmp80_];
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp82_ = i;
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp83_ = KLOTSKI_level[_tmp82_];
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp84_ = _tmp83_.name;
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp85_ = _ (_tmp84_);
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp86_ = i;
#line 590 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_tree_store_set (_tmp78_, &_tmp81_, 0, _tmp85_, 1, FALSE, 2, _tmp86_, -1, -1);
#line 591 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						break;
#line 1080 "gnome-klotski.c"
					}
#line 586 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					case 1:
#line 1084 "gnome-klotski.c"
					{
						GtkTreeStore* _tmp87_ = NULL;
						GtkTreeIter* _tmp88_ = NULL;
						gint _tmp88__length1 = 0;
						gint _tmp89_ = 0;
						GtkTreeIter _tmp90_ = {0};
						GtkTreeIter _tmp91_ = {0};
						GtkTreeStore* _tmp92_ = NULL;
						GtkTreeIter* _tmp93_ = NULL;
						gint _tmp93__length1 = 0;
						gint _tmp94_ = 0;
						GtkTreeIter _tmp95_ = {0};
						gint _tmp96_ = 0;
						LevelInfo _tmp97_ = {0};
						const gchar* _tmp98_ = NULL;
						const gchar* _tmp99_ = NULL;
						gint _tmp100_ = 0;
#line 593 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp87_ = self->priv->puzzles;
#line 593 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp88_ = self->priv->puzzles_items;
#line 593 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp88__length1 = self->priv->puzzles_items_length1;
#line 593 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp89_ = i;
#line 593 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp90_ = challenge_item;
#line 593 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_tree_store_append (_tmp87_, &_tmp91_, &_tmp90_);
#line 593 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp88_[_tmp89_] = _tmp91_;
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp92_ = self->priv->puzzles;
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp93_ = self->priv->puzzles_items;
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp93__length1 = self->priv->puzzles_items_length1;
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp94_ = i;
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp95_ = _tmp93_[_tmp94_];
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp96_ = i;
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp97_ = KLOTSKI_level[_tmp96_];
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp98_ = _tmp97_.name;
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp99_ = _ (_tmp98_);
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp100_ = i;
#line 594 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_tree_store_set (_tmp92_, &_tmp95_, 0, _tmp99_, 1, FALSE, 2, _tmp100_, -1, -1);
#line 595 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						break;
#line 1140 "gnome-klotski.c"
					}
#line 586 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					case 2:
#line 1144 "gnome-klotski.c"
					{
						GtkTreeStore* _tmp101_ = NULL;
						GtkTreeIter* _tmp102_ = NULL;
						gint _tmp102__length1 = 0;
						gint _tmp103_ = 0;
						GtkTreeIter _tmp104_ = {0};
						GtkTreeIter _tmp105_ = {0};
						GtkTreeStore* _tmp106_ = NULL;
						GtkTreeIter* _tmp107_ = NULL;
						gint _tmp107__length1 = 0;
						gint _tmp108_ = 0;
						GtkTreeIter _tmp109_ = {0};
						gint _tmp110_ = 0;
						LevelInfo _tmp111_ = {0};
						const gchar* _tmp112_ = NULL;
						const gchar* _tmp113_ = NULL;
						gint _tmp114_ = 0;
#line 597 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp101_ = self->priv->puzzles;
#line 597 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp102_ = self->priv->puzzles_items;
#line 597 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp102__length1 = self->priv->puzzles_items_length1;
#line 597 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp103_ = i;
#line 597 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp104_ = skill_item;
#line 597 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_tree_store_append (_tmp101_, &_tmp105_, &_tmp104_);
#line 597 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp102_[_tmp103_] = _tmp105_;
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp106_ = self->priv->puzzles;
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp107_ = self->priv->puzzles_items;
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp107__length1 = self->priv->puzzles_items_length1;
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp108_ = i;
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp109_ = _tmp107_[_tmp108_];
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp110_ = i;
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp111_ = KLOTSKI_level[_tmp110_];
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp112_ = _tmp111_.name;
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp113_ = _ (_tmp112_);
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp114_ = i;
#line 598 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_tree_store_set (_tmp106_, &_tmp109_, 0, _tmp113_, 1, FALSE, 2, _tmp114_, -1, -1);
#line 599 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						break;
#line 1200 "gnome-klotski.c"
					}
					default:
#line 586 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					break;
#line 1205 "gnome-klotski.c"
				}
			}
		}
	}
#line 603 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp115_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
#line 603 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp115_);
#line 603 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzles_panel);
#line 603 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_panel = _tmp115_;
#line 604 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp116_ = self->priv->puzzles_panel;
#line 604 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_visible ((GtkWidget*) _tmp116_, FALSE);
#line 606 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp117_ = self->priv->puzzles;
#line 606 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp118_ = (GtkTreeView*) gtk_tree_view_new_with_model ((GtkTreeModel*) _tmp117_);
#line 606 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp118_);
#line 606 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	puzzles_view = _tmp118_;
#line 607 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_view_set_headers_visible (puzzles_view, FALSE);
#line 609 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp119_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
#line 609 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp119_);
#line 609 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	cell = _tmp119_;
#line 610 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp120_ = gtk_tree_view_column_new_with_attributes ("Puzzle", (GtkCellRenderer*) cell, "text", 0, NULL, NULL);
#line 610 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp120_);
#line 610 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	col = _tmp120_;
#line 611 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp121_ = _g_object_ref0 (self);
#line 611 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_set_data_full ((GObject*) col, "app", _tmp121_, g_object_unref);
#line 612 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) col, (GtkCellRenderer*) cell, (GtkCellLayoutDataFunc) klotski_render_puzzle_name, NULL, NULL);
#line 613 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_view_append_column (puzzles_view, col);
#line 615 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp122_ = cell_renderer_level_new ();
#line 615 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp122_);
#line 615 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp123_ = _tmp122_;
#line 615 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_view_insert_column_with_attributes (puzzles_view, -1, "Complete", (GtkCellRenderer*) _tmp123_, "visible", 1, NULL, NULL);
#line 615 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (_tmp123_);
#line 616 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object (puzzles_view, "row-activated", (GCallback) _klotski_level_cb_gtk_tree_view_row_activated, self, 0);
#line 617 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show_all ((GtkWidget*) puzzles_view);
#line 619 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp124_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
#line 619 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp124_);
#line 619 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	scroll = _tmp124_;
#line 620 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_name ((GtkWidget*) scroll, "puzzles");
#line 621 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_scrolled_window_set_policy (scroll, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
#line 622 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_container_add ((GtkContainer*) scroll, (GtkWidget*) puzzles_view);
#line 623 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) scroll);
#line 624 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp125_ = self->priv->puzzles_panel;
#line 624 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_box_pack_start (_tmp125_, (GtkWidget*) scroll, TRUE, TRUE, (guint) 0);
#line 626 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp126_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
#line 626 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp126_);
#line 626 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	bbox = _tmp126_;
#line 627 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp127_ = bbox;
#line 627 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp128_ = gtk_widget_get_style_context ((GtkWidget*) _tmp127_);
#line 627 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp129_ = _g_object_ref0 (_tmp128_);
#line 627 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	context = _tmp129_;
#line 628 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_style_context_add_class (context, "linked");
#line 629 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp130_ = bbox;
#line 629 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_margin_top ((GtkWidget*) _tmp130_, 12);
#line 630 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp131_ = bbox;
#line 630 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) _tmp131_);
#line 632 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp132_ = _ ("Previous Puzzle");
#line 632 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp133_ = (GtkButton*) gtk_button_new_with_label (_tmp132_);
#line 632 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp133_);
#line 632 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->prev_button);
#line 632 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->prev_button = _tmp133_;
#line 633 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp134_ = self->priv->prev_button;
#line 633 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object (_tmp134_, "clicked", (GCallback) _klotski_prev_level_cb_gtk_button_clicked, self, 0);
#line 634 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp135_ = self->priv->prev_button;
#line 634 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp136_ = self->priv->current_level;
#line 634 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_sensitive ((GtkWidget*) _tmp135_, _tmp136_ > 0);
#line 635 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp137_ = self->priv->prev_button;
#line 635 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) _tmp137_);
#line 636 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp138_ = bbox;
#line 636 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp139_ = self->priv->prev_button;
#line 636 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_container_add ((GtkContainer*) _tmp138_, (GtkWidget*) _tmp139_);
#line 638 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp140_ = _ ("Next Puzzle");
#line 638 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp141_ = (GtkButton*) gtk_button_new_with_label (_tmp140_);
#line 638 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp141_);
#line 638 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->next_button);
#line 638 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->next_button = _tmp141_;
#line 639 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp142_ = self->priv->next_button;
#line 639 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object (_tmp142_, "clicked", (GCallback) _klotski_next_level_cb_gtk_button_clicked, self, 0);
#line 640 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp143_ = self->priv->next_button;
#line 640 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp144_ = self->priv->current_level;
#line 640 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_sensitive ((GtkWidget*) _tmp143_, _tmp144_ < (G_N_ELEMENTS (KLOTSKI_level) - 1));
#line 641 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp145_ = self->priv->next_button;
#line 641 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) _tmp145_);
#line 642 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp146_ = bbox;
#line 642 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp147_ = self->priv->next_button;
#line 642 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_container_add ((GtkContainer*) _tmp146_, (GtkWidget*) _tmp147_);
#line 644 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp148_ = self->priv->puzzles_panel;
#line 644 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp149_ = bbox;
#line 644 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_box_pack_start (_tmp148_, (GtkWidget*) _tmp149_, FALSE, TRUE, (guint) 0);
#line 645 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp150_ = self->priv->puzzles_panel;
#line 645 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_box_pack_start (hbox, (GtkWidget*) _tmp150_, FALSE, TRUE, (guint) 0);
#line 647 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp151_ = puzzle_view_new ();
#line 647 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp151_);
#line 647 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->view);
#line 647 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->view = _tmp151_;
#line 648 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp152_ = self->priv->view;
#line 648 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_size_request ((GtkWidget*) _tmp152_, KLOTSKI_MINWIDTH, KLOTSKI_MINHEIGHT);
#line 649 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp153_ = self->priv->view;
#line 649 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) _tmp153_);
#line 650 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp154_ = self->priv->view;
#line 650 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_box_pack_start (hbox, (GtkWidget*) _tmp154_, TRUE, TRUE, (guint) 0);
#line 652 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp155_ = (GtkButtonBox*) gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
#line 652 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp155_);
#line 652 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (bbox);
#line 652 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	bbox = (GtkBox*) _tmp155_;
#line 653 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp156_ = bbox;
#line 653 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_halign ((GtkWidget*) _tmp156_, GTK_ALIGN_END);
#line 654 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp157_ = bbox;
#line 654 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_valign ((GtkWidget*) _tmp157_, GTK_ALIGN_END);
#line 655 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp158_ = bbox;
#line 655 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_box_set_spacing (_tmp158_, 6);
#line 656 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp159_ = bbox;
#line 656 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) _tmp159_);
#line 657 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp160_ = bbox;
#line 657 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_box_pack_start (hbox, (GtkWidget*) _tmp160_, FALSE, TRUE, (guint) 0);
#line 659 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp161_ = (GtkButton*) gtk_button_new ();
#line 659 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp161_);
#line 659 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	button = _tmp161_;
#line 660 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp162_ = _ ("_Start Over");
#line 660 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_button_set_label (button, _tmp162_);
#line 661 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_button_set_use_underline (button, TRUE);
#line 662 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_set ((GtkWidget*) button, "width-request", 120, NULL);
#line 663 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_set ((GtkWidget*) button, "height-request", 60, NULL);
#line 664 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_actionable_set_action_name ((GtkActionable*) button, "app.new-game");
#line 665 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) button);
#line 666 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp163_ = bbox;
#line 666 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_box_pack_end (_tmp163_, (GtkWidget*) button, FALSE, TRUE, (guint) 0);
#line 668 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp164_ = (GtkToggleButton*) gtk_toggle_button_new ();
#line 668 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp164_);
#line 668 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	togglebutton = _tmp164_;
#line 669 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp165_ = _ ("_View Puzzles");
#line 669 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_button_set_label ((GtkButton*) togglebutton, _tmp165_);
#line 670 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_button_set_use_underline ((GtkButton*) togglebutton, TRUE);
#line 671 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_set ((GtkWidget*) togglebutton, "width-request", 120, NULL);
#line 672 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_set ((GtkWidget*) togglebutton, "height-request", 60, NULL);
#line 673 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_actionable_set_action_name ((GtkActionable*) togglebutton, "app.show-puzzles");
#line 674 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) togglebutton);
#line 675 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp166_ = bbox;
#line 675 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_box_pack_end (_tmp166_, (GtkWidget*) togglebutton, FALSE, TRUE, (guint) 0);
#line 677 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) hbox);
#line 679 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_load_solved_state (self);
#line 681 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp167_ = self->priv->settings;
#line 681 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp168_ = g_settings_get_int (_tmp167_, KLOTSKI_KEY_LEVEL);
#line 681 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	startup_level = _tmp168_;
#line 682 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_new_game (self, startup_level);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (togglebutton);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (button);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (context);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (bbox);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (scroll);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (col);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (cell);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (puzzles_view);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (builder);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (builder_str);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (hbox);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (histfile);
#line 457 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (css_provider);
#line 1512 "gnome-klotski.c"
}


static void klotski_render_puzzle_name (GtkCellLayout* cell_layout, GtkCellRendererText* cell, GtkTreeModel* tree_model, GtkTreeIter* iter) {
	GValue val = {0};
	GtkTreeModel* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GValue _tmp2_ = {0};
	gint selected_level = 0;
	GValue _tmp3_ = {0};
	Klotski* app = NULL;
	GtkCellLayout* _tmp4_ = NULL;
	gconstpointer _tmp5_ = NULL;
	Klotski* _tmp6_ = NULL;
	Klotski* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
#line 685 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (cell_layout != NULL);
#line 685 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (cell != NULL);
#line 685 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (tree_model != NULL);
#line 685 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (iter != NULL);
#line 689 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = tree_model;
#line 689 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = *iter;
#line 689 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_model_get_value (_tmp0_, &_tmp1_, 2, &_tmp2_);
#line 689 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
#line 689 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	val = _tmp2_;
#line 690 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = val;
#line 690 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	selected_level = g_value_get_int (&_tmp3_);
#line 691 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = cell_layout;
#line 691 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = g_object_get_data ((GObject*) _tmp4_, "app");
#line 691 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = _g_object_ref0 ((Klotski*) _tmp5_);
#line 691 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	app = _tmp6_;
#line 692 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = app;
#line 692 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = _tmp7_->priv->current_level;
#line 692 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = selected_level;
#line 692 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp8_ == _tmp9_) {
#line 1568 "gnome-klotski.c"
		GtkCellRendererText* _tmp10_ = NULL;
#line 693 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp10_ = cell;
#line 693 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_object_set (_tmp10_, "weight", 700, NULL);
#line 1574 "gnome-klotski.c"
	} else {
		GtkCellRendererText* _tmp11_ = NULL;
#line 695 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp11_ = cell;
#line 695 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_object_set (_tmp11_, "weight", 400, NULL);
#line 1581 "gnome-klotski.c"
	}
#line 685 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (app);
#line 685 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
#line 1587 "gnome-klotski.c"
}


static gboolean klotski_window_configure_event_cb (Klotski* self, GdkEventConfigure* event) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 698 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 698 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 700 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->is_maximized;
#line 700 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (!_tmp0_) {
#line 1602 "gnome-klotski.c"
		GdkEventConfigure* _tmp1_ = NULL;
		gint _tmp2_ = 0;
		GdkEventConfigure* _tmp3_ = NULL;
		gint _tmp4_ = 0;
#line 702 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp1_ = event;
#line 702 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp2_ = _tmp1_->width;
#line 702 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		self->priv->window_width = _tmp2_;
#line 703 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp3_ = event;
#line 703 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp4_ = _tmp3_->height;
#line 703 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		self->priv->window_height = _tmp4_;
#line 1619 "gnome-klotski.c"
	}
#line 706 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = FALSE;
#line 706 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 1625 "gnome-klotski.c"
}


static gboolean klotski_window_state_event_cb (Klotski* self, GdkEventWindowState* event) {
	gboolean result = FALSE;
	GdkEventWindowState* _tmp0_ = NULL;
	GdkWindowState _tmp1_ = 0;
#line 709 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 709 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 711 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = event;
#line 711 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = _tmp0_->changed_mask;
#line 711 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if ((_tmp1_ & GDK_WINDOW_STATE_MAXIMIZED) != 0) {
#line 1643 "gnome-klotski.c"
		GdkEventWindowState* _tmp2_ = NULL;
		GdkWindowState _tmp3_ = 0;
#line 712 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp2_ = event;
#line 712 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp3_ = _tmp2_->new_window_state;
#line 712 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		self->priv->is_maximized = (_tmp3_ & GDK_WINDOW_STATE_MAXIMIZED) != 0;
#line 1652 "gnome-klotski.c"
	}
#line 713 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = FALSE;
#line 713 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 1658 "gnome-klotski.c"
}


static void klotski_scores_cb (Klotski* self) {
#line 716 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 718 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_show_scores (self, NULL, FALSE);
#line 1667 "gnome-klotski.c"
}


static void klotski_game_score (Klotski* self) {
	gchar* key = NULL;
	gint _tmp0_ = 0;
	gchar* _tmp1_ = NULL;
	GKeyFile* keyfile = NULL;
	GKeyFile* _tmp2_ = NULL;
	gchar* filename = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GtkTreeStore* _tmp7_ = NULL;
	GtkTreeIter* _tmp8_ = NULL;
	gint _tmp8__length1 = 0;
	gint _tmp9_ = 0;
	GtkTreeIter _tmp10_ = {0};
	GDateTime* date = NULL;
	GDateTime* _tmp11_ = NULL;
	HistoryEntry* entry = NULL;
	GDateTime* _tmp12_ = NULL;
	gint _tmp13_ = 0;
	Puzzle* _tmp14_ = NULL;
	gint _tmp15_ = 0;
	HistoryEntry* _tmp16_ = NULL;
	History* _tmp17_ = NULL;
	HistoryEntry* _tmp18_ = NULL;
	History* _tmp19_ = NULL;
	HistoryEntry* _tmp20_ = NULL;
	gint _tmp21_ = 0;
	GError * _inner_error_ = NULL;
#line 721 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 724 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->current_level;
#line 724 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = klotski_get_level_key (self, _tmp0_);
#line 724 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	key = _tmp1_;
#line 725 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = g_key_file_new ();
#line 725 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	keyfile = _tmp2_;
#line 726 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = g_get_user_data_dir ();
#line 726 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = g_build_filename (_tmp3_, "gnome-klotski", "levels", NULL);
#line 726 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	filename = _tmp4_;
#line 1717 "gnome-klotski.c"
	{
#line 730 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, &_inner_error_);
#line 730 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1723 "gnome-klotski.c"
			goto __catch2_g_error;
		}
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 1737 "gnome-klotski.c"
	}
	__finally2:
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (filename);
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_key_file_free0 (keyfile);
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (key);
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		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);
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 728 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 1754 "gnome-klotski.c"
	}
#line 736 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_key_file_set_boolean (keyfile, key, "solved", TRUE);
#line 1758 "gnome-klotski.c"
	{
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 740 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp5_ = g_key_file_to_data (keyfile, NULL, NULL);
#line 740 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp6_ = _tmp5_;
#line 740 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_file_set_contents (filename, _tmp6_, (gssize) (-1), &_inner_error_);
#line 740 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (_tmp6_);
#line 740 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1772 "gnome-klotski.c"
			goto __catch3_g_error;
		}
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 1786 "gnome-klotski.c"
	}
	__finally3:
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (filename);
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_key_file_free0 (keyfile);
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (key);
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		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);
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 738 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 1803 "gnome-klotski.c"
	}
#line 746 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = self->priv->puzzles;
#line 746 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = self->priv->puzzles_items;
#line 746 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8__length1 = self->priv->puzzles_items_length1;
#line 746 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = self->priv->current_level;
#line 746 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp10_ = _tmp8_[_tmp9_];
#line 746 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_store_set (_tmp7_, &_tmp10_, 1, TRUE, -1, -1);
#line 748 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp11_ = g_date_time_new_now_local ();
#line 748 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	date = _tmp11_;
#line 749 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp12_ = date;
#line 749 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp13_ = self->priv->current_level;
#line 749 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp14_ = self->priv->puzzle;
#line 749 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp15_ = _tmp14_->moves;
#line 749 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp16_ = history_entry_new (_tmp12_, (guint) _tmp13_, (guint) _tmp15_);
#line 749 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	entry = _tmp16_;
#line 750 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp17_ = self->priv->history;
#line 750 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp18_ = entry;
#line 750 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	history_add (_tmp17_, _tmp18_);
#line 751 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp19_ = self->priv->history;
#line 751 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	history_save (_tmp19_);
#line 753 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp20_ = entry;
#line 753 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp21_ = klotski_show_scores (self, _tmp20_, TRUE);
#line 753 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp21_ == ((gint) GTK_RESPONSE_OK)) {
#line 1849 "gnome-klotski.c"
		gint _tmp22_ = 0;
#line 754 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp22_ = self->priv->current_level;
#line 754 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		klotski_new_game (self, _tmp22_);
#line 1855 "gnome-klotski.c"
	}
#line 721 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (entry);
#line 721 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_date_time_unref0 (date);
#line 721 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (filename);
#line 721 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_key_file_free0 (keyfile);
#line 721 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (key);
#line 1867 "gnome-klotski.c"
}


static gint klotski_show_scores (Klotski* self, HistoryEntry* selected_entry, gboolean show_close) {
	gint result = 0;
	ScoreDialog* dialog = NULL;
	History* _tmp0_ = NULL;
	HistoryEntry* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	ScoreDialog* _tmp3_ = NULL;
	GtkWindow* _tmp4_ = NULL;
	gint _result_ = 0;
	gint _tmp5_ = 0;
#line 757 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 759 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->history;
#line 759 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = selected_entry;
#line 759 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = show_close;
#line 759 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = score_dialog_new (_tmp0_, _tmp1_, _tmp2_);
#line 759 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp3_);
#line 759 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	dialog = _tmp3_;
#line 760 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_set_modal ((GtkWindow*) dialog, TRUE);
#line 761 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = self->priv->window;
#line 761 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_set_transient_for ((GtkWindow*) dialog, _tmp4_);
#line 763 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = gtk_dialog_run ((GtkDialog*) dialog);
#line 763 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_result_ = _tmp5_;
#line 764 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_destroy ((GtkWidget*) dialog);
#line 766 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = _result_;
#line 766 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (dialog);
#line 766 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 1913 "gnome-klotski.c"
}


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_ = 0L;
	gchar _tmp1_ = '\0';
#line 996 "/home/mcatanzaro/jhbuild/install/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, '\0');
#line 997 "/home/mcatanzaro/jhbuild/install/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp0_ = index;
#line 997 "/home/mcatanzaro/jhbuild/install/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp1_ = ((gchar*) self)[_tmp0_];
#line 997 "/home/mcatanzaro/jhbuild/install/share/vala-0.28/vapi/glib-2.0.vapi"
	result = _tmp1_;
#line 997 "/home/mcatanzaro/jhbuild/install/share/vala-0.28/vapi/glib-2.0.vapi"
	return result;
#line 1931 "gnome-klotski.c"
}


static gchar* klotski_get_level_key (Klotski* self, gint level_number) {
	gchar* result = NULL;
	guint32 _result_ = 0U;
	gchar* data = NULL;
	gint _tmp0_ = 0;
	LevelInfo _tmp1_ = {0};
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	guint32 _tmp21_ = 0U;
	gchar* _tmp22_ = NULL;
#line 769 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 772 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_result_ = (guint32) 0xFFFFFFFFU;
#line 773 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = level_number;
#line 773 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = KLOTSKI_level[_tmp0_];
#line 773 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _tmp1_.data;
#line 773 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 773 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	data = _tmp3_;
#line 1959 "gnome-klotski.c"
	{
		gint i = 0;
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		i = 0;
#line 1964 "gnome-klotski.c"
		{
			gboolean _tmp4_ = FALSE;
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp4_ = TRUE;
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			while (TRUE) {
#line 1971 "gnome-klotski.c"
				const gchar* _tmp6_ = NULL;
				gint _tmp7_ = 0;
				gchar _tmp8_ = '\0';
				gchar octet = '\0';
				const gchar* _tmp9_ = NULL;
				gint _tmp10_ = 0;
				gchar _tmp11_ = '\0';
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!_tmp4_) {
#line 1981 "gnome-klotski.c"
					gint _tmp5_ = 0;
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp5_ = i;
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					i = _tmp5_ + 1;
#line 1987 "gnome-klotski.c"
				}
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp4_ = FALSE;
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp6_ = data;
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp7_ = i;
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp8_ = string_get (_tmp6_, (glong) _tmp7_);
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!(_tmp8_ != '\0')) {
#line 774 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					break;
#line 2001 "gnome-klotski.c"
				}
#line 776 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp9_ = data;
#line 776 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp10_ = i;
#line 776 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp11_ = string_get (_tmp9_, (glong) _tmp10_);
#line 776 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				octet = _tmp11_;
#line 2011 "gnome-klotski.c"
				{
					gint j = 0;
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					j = 0;
#line 2016 "gnome-klotski.c"
					{
						gboolean _tmp12_ = FALSE;
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp12_ = TRUE;
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						while (TRUE) {
#line 2023 "gnome-klotski.c"
							gint _tmp14_ = 0;
							gchar _tmp15_ = '\0';
							guint32 _tmp16_ = 0U;
							guint32 _tmp19_ = 0U;
							gchar _tmp20_ = '\0';
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							if (!_tmp12_) {
#line 2031 "gnome-klotski.c"
								gint _tmp13_ = 0;
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_tmp13_ = j;
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								j = _tmp13_ + 1;
#line 2037 "gnome-klotski.c"
							}
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp12_ = FALSE;
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp14_ = j;
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							if (!(_tmp14_ < 8)) {
#line 777 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								break;
#line 2047 "gnome-klotski.c"
							}
#line 779 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp15_ = octet;
#line 779 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp16_ = _result_;
#line 779 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							if (((_tmp15_ >> 7) ^ (_tmp16_ >> 31)) != ((guint32) 0)) {
#line 2055 "gnome-klotski.c"
								guint32 _tmp17_ = 0U;
#line 780 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_tmp17_ = _result_;
#line 780 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_result_ = (_tmp17_ << 1) ^ 0x04c11db7;
#line 2061 "gnome-klotski.c"
							} else {
								guint32 _tmp18_ = 0U;
#line 782 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_tmp18_ = _result_;
#line 782 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_result_ = _tmp18_ << 1;
#line 2068 "gnome-klotski.c"
							}
#line 783 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp19_ = _result_;
#line 783 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_result_ = _tmp19_ & 0xFFFFFFFFLL;
#line 784 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp20_ = octet;
#line 784 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							octet = (gchar) (_tmp20_ << 1);
#line 2078 "gnome-klotski.c"
						}
					}
				}
			}
		}
	}
#line 788 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp21_ = _result_;
#line 788 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp22_ = g_strdup_printf ("%08X", (guint) (~_tmp21_));
#line 788 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = _tmp22_;
#line 788 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (data);
#line 788 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 2095 "gnome-klotski.c"
}


static void klotski_load_solved_state (Klotski* self) {
	GKeyFile* keyfile = NULL;
	GKeyFile* _tmp0_ = NULL;
	gchar* filename = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
#line 791 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 793 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = g_key_file_new ();
#line 793 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	keyfile = _tmp0_;
#line 794 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = g_get_user_data_dir ();
#line 794 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = g_build_filename (_tmp1_, "gnome-klotski", "levels", NULL);
#line 794 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	filename = _tmp2_;
#line 2118 "gnome-klotski.c"
	{
#line 797 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, &_inner_error_);
#line 797 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2124 "gnome-klotski.c"
			goto __catch4_g_error;
		}
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* e = NULL;
#line 795 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 795 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 795 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 2138 "gnome-klotski.c"
	}
	__finally4:
#line 795 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 795 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (filename);
#line 795 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_key_file_free0 (keyfile);
#line 795 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		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);
#line 795 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 795 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 2153 "gnome-klotski.c"
	}
	{
		gint i = 0;
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		i = 0;
#line 2159 "gnome-klotski.c"
		{
			gboolean _tmp3_ = FALSE;
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp3_ = TRUE;
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			while (TRUE) {
#line 2166 "gnome-klotski.c"
				gint _tmp5_ = 0;
				gchar* key = NULL;
				gint _tmp6_ = 0;
				gchar* _tmp7_ = NULL;
				gboolean value = FALSE;
				GtkTreeStore* _tmp11_ = NULL;
				GtkTreeIter* _tmp12_ = NULL;
				gint _tmp12__length1 = 0;
				gint _tmp13_ = 0;
				GtkTreeIter _tmp14_ = {0};
				gboolean _tmp15_ = FALSE;
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!_tmp3_) {
#line 2180 "gnome-klotski.c"
					gint _tmp4_ = 0;
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp4_ = i;
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					i = _tmp4_ + 1;
#line 2186 "gnome-klotski.c"
				}
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp3_ = FALSE;
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp5_ = i;
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!(_tmp5_ < G_N_ELEMENTS (KLOTSKI_level))) {
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					break;
#line 2196 "gnome-klotski.c"
				}
#line 805 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp6_ = i;
#line 805 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp7_ = klotski_get_level_key (self, _tmp6_);
#line 805 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				key = _tmp7_;
#line 806 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				value = FALSE;
#line 2206 "gnome-klotski.c"
				{
					gboolean _tmp8_ = FALSE;
					const gchar* _tmp9_ = NULL;
					gboolean _tmp10_ = FALSE;
#line 809 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp9_ = key;
#line 809 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp10_ = g_key_file_get_boolean (keyfile, _tmp9_, "solved", &_inner_error_);
#line 809 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp8_ = _tmp10_;
#line 809 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2219 "gnome-klotski.c"
						goto __catch5_g_error;
					}
#line 809 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					value = _tmp8_;
#line 2224 "gnome-klotski.c"
				}
				goto __finally5;
				__catch5_g_error:
				{
					GError* e = NULL;
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					e = _inner_error_;
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_inner_error_ = NULL;
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_g_error_free0 (e);
#line 2236 "gnome-klotski.c"
				}
				__finally5:
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_g_free0 (key);
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_g_free0 (filename);
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_g_key_file_free0 (keyfile);
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					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);
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					g_clear_error (&_inner_error_);
#line 807 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					return;
#line 2253 "gnome-klotski.c"
				}
#line 814 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp11_ = self->priv->puzzles;
#line 814 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp12_ = self->priv->puzzles_items;
#line 814 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp12__length1 = self->priv->puzzles_items_length1;
#line 814 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp13_ = i;
#line 814 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp14_ = _tmp12_[_tmp13_];
#line 814 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp15_ = value;
#line 814 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				gtk_tree_store_set (_tmp11_, &_tmp14_, 1, _tmp15_, -1, -1);
#line 803 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_g_free0 (key);
#line 2271 "gnome-klotski.c"
			}
		}
	}
#line 791 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (filename);
#line 791 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_key_file_free0 (keyfile);
#line 2279 "gnome-klotski.c"
}


static void klotski_update_menu_state (Klotski* self) {
	GtkBox* _tmp0_ = NULL;
	GtkButton* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	GtkButton* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	GSimpleAction* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	GSimpleAction* _tmp7_ = NULL;
	gint _tmp8_ = 0;
#line 818 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 820 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->puzzles_panel;
#line 820 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_queue_draw ((GtkWidget*) _tmp0_);
#line 822 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = self->priv->next_button;
#line 822 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = self->priv->current_level;
#line 822 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, _tmp2_ < (G_N_ELEMENTS (KLOTSKI_level) - 1));
#line 823 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->prev_button;
#line 823 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = self->priv->current_level;
#line 823 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, _tmp4_ > 0);
#line 825 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = self->priv->next_level_action;
#line 825 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = self->priv->current_level;
#line 825 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp5_, _tmp6_ < (G_N_ELEMENTS (KLOTSKI_level) - 1));
#line 826 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = self->priv->prev_level_action;
#line 826 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = self->priv->current_level;
#line 826 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp7_, _tmp8_ > 0);
#line 828 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_moves_label (self);
#line 2325 "gnome-klotski.c"
}


static void _klotski_puzzle_moved_cb_puzzle_moved (Puzzle* _sender, gpointer self) {
#line 839 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_puzzle_moved_cb ((Klotski*) self);
#line 2332 "gnome-klotski.c"
}


static void klotski_new_game (Klotski* self, gint requested_level) {
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	GSettings* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GtkHeaderBar* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	LevelInfo _tmp6_ = {0};
	const gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	LevelInfo _tmp10_ = {0};
	gint _tmp11_ = 0;
	gint _tmp12_ = 0;
	LevelInfo _tmp13_ = {0};
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	LevelInfo _tmp16_ = {0};
	const gchar* _tmp17_ = NULL;
	Puzzle* _tmp18_ = NULL;
	Puzzle* _tmp19_ = NULL;
	PuzzleView* _tmp20_ = NULL;
	Puzzle* _tmp21_ = NULL;
	GSimpleAction* _tmp22_ = NULL;
#line 831 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 833 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = requested_level;
#line 833 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = CLAMP (_tmp0_, 0, G_N_ELEMENTS (KLOTSKI_level) - 1);
#line 833 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->current_level = _tmp1_;
#line 835 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = self->priv->settings;
#line 835 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->current_level;
#line 835 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_settings_set_int (_tmp2_, KLOTSKI_KEY_LEVEL, _tmp3_);
#line 837 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = self->priv->headerbar;
#line 837 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = self->priv->current_level;
#line 837 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = KLOTSKI_level[_tmp5_];
#line 837 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = _tmp6_.name;
#line 837 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = _ (_tmp7_);
#line 837 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_header_bar_set_title (_tmp4_, _tmp8_);
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = self->priv->current_level;
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp10_ = KLOTSKI_level[_tmp9_];
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp11_ = _tmp10_.width;
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp12_ = self->priv->current_level;
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp13_ = KLOTSKI_level[_tmp12_];
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp14_ = _tmp13_.height;
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp15_ = self->priv->current_level;
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp16_ = KLOTSKI_level[_tmp15_];
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp17_ = _tmp16_.data;
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp18_ = puzzle_new (_tmp11_, _tmp14_, _tmp17_);
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzle);
#line 838 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzle = _tmp18_;
#line 839 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp19_ = self->priv->puzzle;
#line 839 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object (_tmp19_, "moved", (GCallback) _klotski_puzzle_moved_cb_puzzle_moved, self, 0);
#line 840 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp20_ = self->priv->view;
#line 840 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp21_ = self->priv->puzzle;
#line 840 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	puzzle_view_set_puzzle (_tmp20_, _tmp21_);
#line 841 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp22_ = self->priv->new_game_action;
#line 841 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp22_, FALSE);
#line 842 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_menu_state (self);
#line 2426 "gnome-klotski.c"
}


static void klotski_puzzle_moved_cb (Klotski* self) {
	GSimpleAction* _tmp0_ = NULL;
#line 845 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 847 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_moves_label (self);
#line 848 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->new_game_action;
#line 848 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp0_, TRUE);
#line 2440 "gnome-klotski.c"
}


static void klotski_update_moves_label (Klotski* self) {
	GtkHeaderBar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	Puzzle* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	Puzzle* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
#line 851 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 853 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->headerbar;
#line 853 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = _ ("Moves: %d");
#line 853 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = self->priv->puzzle;
#line 853 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = _tmp2_->moves;
#line 853 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = g_strdup_printf (_tmp1_, _tmp3_);
#line 853 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = _tmp4_;
#line 853 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_header_bar_set_subtitle (_tmp0_, _tmp5_);
#line 853 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (_tmp5_);
#line 854 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = self->priv->puzzle;
#line 854 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = puzzle_game_over (_tmp6_);
#line 854 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp7_) {
#line 2477 "gnome-klotski.c"
		GtkHeaderBar* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
#line 856 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp8_ = self->priv->headerbar;
#line 856 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp9_ = _ ("Level completed.");
#line 856 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_header_bar_set_title (_tmp8_, _tmp9_);
#line 857 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		klotski_game_score (self);
#line 2488 "gnome-klotski.c"
	}
}


static void klotski_quit_cb (Klotski* self) {
	GtkWindow* _tmp0_ = NULL;
#line 861 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 863 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->window;
#line 863 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
#line 2501 "gnome-klotski.c"
}


static void klotski_level_cb (Klotski* self, GtkTreePath* path, GtkTreeViewColumn* column) {
	GtkTreeIter iter = {0};
	GValue val = {0};
	GtkTreeStore* _tmp0_ = NULL;
	GtkTreePath* _tmp1_ = NULL;
	GtkTreeIter _tmp2_ = {0};
	GtkTreeStore* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
	GValue _tmp5_ = {0};
	gint requested_level = 0;
	GValue _tmp6_ = {0};
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
#line 866 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 866 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (path != NULL);
#line 866 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (column != NULL);
#line 871 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->puzzles;
#line 871 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = path;
#line 871 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_model_get_iter ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
#line 871 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	iter = _tmp2_;
#line 872 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->puzzles;
#line 872 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = iter;
#line 872 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp3_, &_tmp4_, 2, &_tmp5_);
#line 872 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
#line 872 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	val = _tmp5_;
#line 874 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = val;
#line 874 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	requested_level = g_value_get_int (&_tmp6_);
#line 875 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = requested_level;
#line 875 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp7_ < 0) {
#line 876 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
#line 876 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 2555 "gnome-klotski.c"
	}
#line 878 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = self->priv->current_level;
#line 878 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = requested_level;
#line 878 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp8_ != _tmp9_) {
#line 2563 "gnome-klotski.c"
		gint _tmp10_ = 0;
#line 879 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp10_ = requested_level;
#line 879 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		klotski_new_game (self, _tmp10_);
#line 2569 "gnome-klotski.c"
	}
#line 866 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
#line 2573 "gnome-klotski.c"
}


static void klotski_restart_level_cb (Klotski* self) {
	gint _tmp0_ = 0;
#line 882 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 884 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->current_level;
#line 884 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_new_game (self, _tmp0_);
#line 2585 "gnome-klotski.c"
}


static void klotski_toggle_puzzles_cb (Klotski* self) {
	GtkBox* _tmp0_ = NULL;
	GtkBox* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
#line 887 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 889 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->puzzles_panel;
#line 889 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = self->priv->puzzles_panel;
#line 889 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = gtk_widget_get_visible ((GtkWidget*) _tmp1_);
#line 889 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = _tmp2_;
#line 889 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, !_tmp3_);
#line 2606 "gnome-klotski.c"
}


static void klotski_next_level_cb (Klotski* self) {
	gint _tmp0_ = 0;
#line 892 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 894 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->current_level;
#line 894 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_new_game (self, _tmp0_ + 1);
#line 2618 "gnome-klotski.c"
}


static void klotski_prev_level_cb (Klotski* self) {
	gint _tmp0_ = 0;
#line 897 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 899 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->current_level;
#line 899 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_new_game (self, _tmp0_ - 1);
#line 2630 "gnome-klotski.c"
}


static void klotski_help_cb (Klotski* self) {
	GError * _inner_error_ = NULL;
#line 902 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 2638 "gnome-klotski.c"
	{
		GtkWindow* _tmp0_ = NULL;
		GdkScreen* _tmp1_ = NULL;
		guint32 _tmp2_ = 0U;
#line 906 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp0_ = self->priv->window;
#line 906 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp1_ = gtk_window_get_screen (_tmp0_);
#line 906 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp2_ = gtk_get_current_event_time ();
#line 906 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_show_uri (_tmp1_, "help:gnome-klotski", _tmp2_, &_inner_error_);
#line 906 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2653 "gnome-klotski.c"
			goto __catch6_g_error;
		}
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
#line 904 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 904 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 910 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp3_ = e;
#line 910 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp4_ = _tmp3_->message;
#line 910 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_warning ("gnome-klotski.vala:910: Failed to show help: %s", _tmp4_);
#line 904 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 2675 "gnome-klotski.c"
	}
	__finally6:
#line 904 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 904 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		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);
#line 904 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 904 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 2686 "gnome-klotski.c"
	}
}


static void klotski_real_shutdown (GApplication* base) {
	Klotski * self;
	GSettings* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	GSettings* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GSettings* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
#line 914 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (Klotski*) base;
#line 916 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_APPLICATION_CLASS (klotski_parent_class)->shutdown ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_get_type (), GtkApplication));
#line 919 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->settings;
#line 919 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = self->priv->window_width;
#line 919 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_settings_set_int (_tmp0_, "window-width", _tmp1_);
#line 920 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = self->priv->settings;
#line 920 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->window_height;
#line 920 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_settings_set_int (_tmp2_, "window-height", _tmp3_);
#line 921 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = self->priv->settings;
#line 921 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = self->priv->is_maximized;
#line 921 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_settings_set_boolean (_tmp4_, "window-is-maximized", _tmp5_);
#line 2721 "gnome-klotski.c"
}


static gint klotski_real_handle_local_options (GApplication* base, GVariantDict* options) {
	Klotski * self;
	gint result = 0;
	GVariantDict* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 924 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (Klotski*) base;
#line 924 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (options != NULL, 0);
#line 926 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = options;
#line 926 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = g_variant_dict_contains (_tmp0_, "version");
#line 926 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp1_) {
#line 2740 "gnome-klotski.c"
		FILE* _tmp2_ = NULL;
#line 929 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp2_ = stderr;
#line 929 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		fprintf (_tmp2_, "%1$s %2$s\n", "gnome-klotski", VERSION);
#line 930 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		result = EXIT_SUCCESS;
#line 930 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return result;
#line 2750 "gnome-klotski.c"
	}
#line 934 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = -1;
#line 934 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 2756 "gnome-klotski.c"
}


static void klotski_real_activate (GApplication* base) {
	Klotski * self;
	GtkWindow* _tmp0_ = NULL;
#line 937 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (Klotski*) base;
#line 939 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->window;
#line 939 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_present (_tmp0_);
#line 2769 "gnome-klotski.c"
}


static void klotski_about_cb (Klotski* self) {
#line 944 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	static const gchar* authors[] = {"Lars Rydlinge (original author)", "Robert Ancell (port to vala)", "John Cheetham (port to vala)", NULL};
#line 945 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	static const gchar* documenters[] = {"Andrew Sobala", NULL};
#line 2778 "gnome-klotski.c"
	GtkWindow* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
#line 942 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 947 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->window;
#line 947 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = _ ("Klotski");
#line 947 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _ ("Sliding block puzzles\n\nKlotski is a part of GNOME Games.");
#line 947 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = _ ("translator-credits");
#line 947 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_show_about_dialog (_tmp0_, "program-name", _tmp1_, "version", VERSION, "comments", _tmp2_, "copyright", "Copyright © 1999–2008 Lars Rydlinge", "license-type", GTK_LICENSE_GPL_2_0, "authors", authors, "documenters", documenters, "translator-credits", _tmp3_, "logo-icon-name", "gnome-klotski", "website", "https://wiki.gnome.org/Apps/Klotski", NULL, NULL);
#line 2795 "gnome-klotski.c"
}


gint klotski_main (gchar** args, int args_length1) {
	gint result = 0;
	Klotski* app = NULL;
	Klotski* _tmp0_ = NULL;
	gchar** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gint _tmp2_ = 0;
#line 965 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	setlocale (LC_ALL, "");
#line 966 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
#line 967 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#line 968 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	textdomain (GETTEXT_PACKAGE);
#line 970 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = klotski_new ();
#line 970 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	app = _tmp0_;
#line 971 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = args;
#line 971 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1__length1 = args_length1;
#line 971 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = g_application_run ((GApplication*) app, _tmp1__length1, _tmp1_);
#line 971 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = _tmp2_;
#line 971 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (app);
#line 971 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 2830 "gnome-klotski.c"
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
#line 963 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return klotski_main (argv, argc);
#line 2840 "gnome-klotski.c"
}


static void klotski_class_init (KlotskiClass * klass) {
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_parent_class = g_type_class_peek_parent (klass);
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_type_class_add_private (klass, sizeof (KlotskiPrivate));
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	((GApplicationClass *) klass)->startup = klotski_real_startup;
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	((GApplicationClass *) klass)->shutdown = klotski_real_shutdown;
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	((GApplicationClass *) klass)->handle_local_options = klotski_real_handle_local_options;
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	((GApplicationClass *) klass)->activate = klotski_real_activate;
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_OBJECT_CLASS (klass)->finalize = klotski_finalize;
#line 2859 "gnome-klotski.c"
}


static void klotski_instance_init (Klotski * self) {
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv = KLOTSKI_GET_PRIVATE (self);
#line 51 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->current_level = -1;
#line 2868 "gnome-klotski.c"
}


static void klotski_finalize (GObject* obj) {
	Klotski * self;
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KLOTSKI, Klotski);
#line 23 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->settings);
#line 31 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->window);
#line 36 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzles_panel);
#line 38 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->next_button);
#line 39 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->prev_button);
#line 40 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->next_level_action);
#line 41 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->prev_level_action);
#line 43 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->new_game_action);
#line 45 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->view);
#line 47 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->headerbar);
#line 49 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzle);
#line 53 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->history);
#line 56 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzles);
#line 57 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_items = (g_free (self->priv->puzzles_items), NULL);
#line 21 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_OBJECT_CLASS (klotski_parent_class)->finalize (obj);
#line 2906 "gnome-klotski.c"
}


GType klotski_get_type (void) {
	static volatile gsize klotski_type_id__volatile = 0;
	if (g_once_init_enter (&klotski_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (KlotskiClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) klotski_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Klotski), 0, (GInstanceInitFunc) klotski_instance_init, NULL };
		GType klotski_type_id;
		klotski_type_id = g_type_register_static (gtk_application_get_type (), "Klotski", &g_define_type_info, 0);
		g_once_init_leave (&klotski_type_id__volatile, klotski_type_id);
	}
	return klotski_type_id__volatile;
}


CellRendererLevel* cell_renderer_level_construct (GType object_type) {
	CellRendererLevel * self = NULL;
#line 981 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (CellRendererLevel*) g_object_new (object_type, NULL);
#line 979 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return self;
#line 2928 "gnome-klotski.c"
}


CellRendererLevel* cell_renderer_level_new (void) {
#line 979 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return cell_renderer_level_construct (TYPE_CELL_RENDERER_LEVEL);
#line 2935 "gnome-klotski.c"
}


static void cell_renderer_level_real_get_size (GtkCellRenderer* base, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height) {
	CellRendererLevel * self;
	gint _vala_x_offset = 0;
	gint _vala_y_offset = 0;
	gint _vala_width = 0;
	gint _vala_height = 0;
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (CellRendererLevel*) base;
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (widget != NULL);
#line 988 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_vala_x_offset = 0;
#line 989 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_vala_y_offset = 0;
#line 990 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_vala_height = CELL_RENDERER_LEVEL_icon_size;
#line 990 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_vala_width = _vala_height;
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (x_offset) {
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		*x_offset = _vala_x_offset;
#line 2961 "gnome-klotski.c"
	}
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (y_offset) {
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		*y_offset = _vala_y_offset;
#line 2967 "gnome-klotski.c"
	}
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (width) {
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		*width = _vala_width;
#line 2973 "gnome-klotski.c"
	}
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (height) {
#line 984 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		*height = _vala_height;
#line 2979 "gnome-klotski.c"
	}
}


static void cell_renderer_level_real_render (GtkCellRenderer* base, cairo_t* ctx, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags) {
	CellRendererLevel * self;
	cairo_t* _tmp0_ = NULL;
	GdkRectangle _tmp1_ = {0};
	cairo_t* _tmp18_ = NULL;
	GError * _inner_error_ = NULL;
#line 993 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (CellRendererLevel*) base;
#line 993 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (ctx != NULL);
#line 993 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (widget != NULL);
#line 993 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (background_area != NULL);
#line 993 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (cell_area != NULL);
#line 998 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = ctx;
#line 998 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = *background_area;
#line 998 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gdk_cairo_rectangle (_tmp0_, &_tmp1_);
#line 3006 "gnome-klotski.c"
	{
		GtkIconTheme* icon_theme = NULL;
		GtkIconTheme* _tmp2_ = NULL;
		GtkIconTheme* _tmp3_ = NULL;
		GdkPixbuf* icon = NULL;
		GdkPixbuf* _tmp4_ = NULL;
		gint x = 0;
		GdkRectangle _tmp5_ = {0};
		gint _tmp6_ = 0;
		GdkRectangle _tmp7_ = {0};
		gint _tmp8_ = 0;
		gint y = 0;
		GdkRectangle _tmp9_ = {0};
		gint _tmp10_ = 0;
		GdkRectangle _tmp11_ = {0};
		gint _tmp12_ = 0;
		cairo_t* _tmp13_ = NULL;
		gint _tmp14_ = 0;
		gint _tmp15_ = 0;
#line 1002 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp2_ = gtk_icon_theme_get_default ();
#line 1002 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp3_ = _g_object_ref0 (_tmp2_);
#line 1002 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		icon_theme = _tmp3_;
#line 1003 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp4_ = gtk_icon_theme_load_icon (icon_theme, "gtk-yes", CELL_RENDERER_LEVEL_icon_size, 0, &_inner_error_);
#line 1003 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		icon = _tmp4_;
#line 1003 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1003 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_g_object_unref0 (icon_theme);
#line 3040 "gnome-klotski.c"
			goto __catch7_g_error;
		}
#line 1005 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp5_ = *background_area;
#line 1005 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp6_ = _tmp5_.x;
#line 1005 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp7_ = *background_area;
#line 1005 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp8_ = _tmp7_.width;
#line 1005 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		x = _tmp6_ + ((_tmp8_ - CELL_RENDERER_LEVEL_icon_size) / 2);
#line 1006 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp9_ = *background_area;
#line 1006 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp10_ = _tmp9_.y;
#line 1006 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp11_ = *background_area;
#line 1006 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp12_ = _tmp11_.height;
#line 1006 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		y = _tmp10_ + ((_tmp12_ - CELL_RENDERER_LEVEL_icon_size) / 2);
#line 1007 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp13_ = ctx;
#line 1007 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp14_ = x;
#line 1007 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp15_ = y;
#line 1007 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gdk_cairo_set_source_pixbuf (_tmp13_, icon, (gdouble) _tmp14_, (gdouble) _tmp15_);
#line 1000 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_object_unref0 (icon);
#line 1000 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_object_unref0 (icon_theme);
#line 3075 "gnome-klotski.c"
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* e = NULL;
		GError* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
#line 1000 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 1000 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 1011 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp16_ = e;
#line 1011 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp17_ = _tmp16_->message;
#line 1011 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_warning ("gnome-klotski.vala:1011: %s", _tmp17_);
#line 1000 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 3095 "gnome-klotski.c"
	}
	__finally7:
#line 1000 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1000 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		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);
#line 1000 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 1000 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 3106 "gnome-klotski.c"
	}
#line 1014 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp18_ = ctx;
#line 1014 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	cairo_fill (_tmp18_);
#line 3112 "gnome-klotski.c"
}


static void cell_renderer_level_class_init (CellRendererLevelClass * klass) {
#line 975 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	cell_renderer_level_parent_class = g_type_class_peek_parent (klass);
#line 975 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	((GtkCellRendererClass *) klass)->get_size = cell_renderer_level_real_get_size;
#line 975 "/home/mcatanzaro/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	((GtkCellRendererClass *) klass)->render = cell_renderer_level_real_render;
#line 3123 "gnome-klotski.c"
}


static void cell_renderer_level_instance_init (CellRendererLevel * self) {
}


GType cell_renderer_level_get_type (void) {
	static volatile gsize cell_renderer_level_type_id__volatile = 0;
	if (g_once_init_enter (&cell_renderer_level_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (CellRendererLevelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) cell_renderer_level_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CellRendererLevel), 0, (GInstanceInitFunc) cell_renderer_level_instance_init, NULL };
		GType cell_renderer_level_type_id;
		cell_renderer_level_type_id = g_type_register_static (gtk_cell_renderer_get_type (), "CellRendererLevel", &g_define_type_info, 0);
		g_once_init_leave (&cell_renderer_level_type_id__volatile, cell_renderer_level_type_id);
	}
	return cell_renderer_level_type_id__volatile;
}



