/* gnome-klotski.c generated by valac 0.30.0.15-6463e, 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.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <locale.h>
#include <glib/gi18n-lib.h>
#include <stdio.h>
#include <gdk/gdk.h>
#include <cairo.h>
#include <glib/gstdio.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 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_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _PuzzlePrivate PuzzlePrivate;
#define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL)))
#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;

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;
	gboolean is_tiled;
	gboolean is_maximized;
	gint window_width;
	gint window_height;
	GtkApplicationWindow* window;
	GtkHeaderBar* headerbar;
	GtkStack* stack_packs;
	GtkStack* stack_puzzles;
	GtkPopover* puzzles_popover;
	PuzzleView* view;
	GSimpleAction* prev_pack;
	GSimpleAction* next_pack;
	GSimpleAction* prev_puzzle;
	GSimpleAction* next_puzzle;
	GSimpleAction* start_game;
	Puzzle* puzzle;
	gint current_pack;
	gint current_level;
	History* history;
	GtkListStore* liststore_huarong;
	GtkListStore* liststore_challenge;
	GtkListStore* liststore_skill;
	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;
};


static gpointer klotski_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_KEY_LEVEL "level"
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 _g_application_quit_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_prev_pack_cb (Klotski* self);
static void _klotski_prev_pack_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_next_pack_cb (Klotski* self);
static void _klotski_next_pack_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_prev_puzzle_cb (Klotski* self);
static void _klotski_prev_puzzle_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_next_puzzle_cb (Klotski* self);
static void _klotski_next_puzzle_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void klotski_start_puzzle_cb (Klotski* self);
static void _klotski_start_puzzle_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
gint klotski_main (gchar** args, int args_length1);
Klotski* klotski_new (void);
Klotski* klotski_construct (GType object_type);
static gint klotski_real_handle_local_options (GApplication* base, GVariantDict* options);
static void klotski_real_startup (GApplication* base);
static void klotski_size_allocate_cb (Klotski* self, GtkAllocation* allocation);
static void _klotski_size_allocate_cb_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, 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);
History* history_new (const gchar* filename);
History* history_construct (GType object_type, const gchar* filename);
void history_load (History* self);
static void klotski_level_huarong_cb (Klotski* self, GtkTreePath* path, GtkTreeViewColumn* column);
static void _klotski_level_huarong_cb_gtk_tree_view_row_activated (GtkTreeView* _sender, GtkTreePath* path, GtkTreeViewColumn* column, gpointer self);
static void klotski_level_challenge_cb (Klotski* self, GtkTreePath* path, GtkTreeViewColumn* column);
static void _klotski_level_challenge_cb_gtk_tree_view_row_activated (GtkTreeView* _sender, GtkTreePath* path, GtkTreeViewColumn* column, gpointer self);
static void klotski_level_skill_cb (Klotski* self, GtkTreePath* path, GtkTreeViewColumn* column);
static void _klotski_level_skill_cb_gtk_tree_view_row_activated (GtkTreeView* _sender, GtkTreePath* path, GtkTreeViewColumn* column, gpointer self);
PuzzleView* puzzle_view_new (void);
PuzzleView* puzzle_view_construct (GType object_type);
static void klotski_load_solved_state (Klotski* self);
static void __lambda4_ (Klotski* self);
static void klotski_update_popover (Klotski* self, gboolean make_current);
static void ___lambda4__gtk_widget_show (GtkWidget* _sender, gpointer self);
static void klotski_start_puzzle (Klotski* self);
static void klotski_real_activate (GApplication* base);
static void klotski_real_shutdown (GApplication* base);
GType history_entry_get_type (void) G_GNUC_CONST;
static void klotski_show_scores (Klotski* self, HistoryEntry* selected_entry);
static void klotski_start_puzzle_from_iter (Klotski* self, GtkListStore* model, GtkTreeIter* iter);
static void klotski_update_buttons_state (Klotski* self);
static void klotski_level_cb (Klotski* self, GtkListStore* liststore, GtkTreePath* path, GtkTreeViewColumn* column);
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);
static void klotski_update_moves_label (Klotski* self);
gboolean puzzle_game_over (Puzzle* self);
static void klotski_game_score (Klotski* self);
static gchar* klotski_get_level_key (Klotski* self, gint level_number);
static void klotski_puzzle_solved (Klotski* self, GtkTreeIter* iter, gboolean solved);
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);
ScoreDialog* score_dialog_construct (GType object_type, History* history, HistoryEntry* selected_entry);
static void klotski_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);

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_app_actions[4] = {{"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", _g_application_quit_gsimple_action_activate_callback}};
static const GActionEntry KLOTSKI_win_actions[5] = {{"prev-pack", _klotski_prev_pack_cb_gsimple_action_activate_callback}, {"next-pack", _klotski_next_pack_cb_gsimple_action_activate_callback}, {"prev-puzzle", _klotski_prev_puzzle_cb_gsimple_action_activate_callback}, {"next-puzzle", _klotski_next_puzzle_cb_gsimple_action_activate_callback}, {"start-game", _klotski_start_puzzle_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 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = (*self).name;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 ((*dest).name);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).name = _tmp1_;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = (*self).group;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).group = _tmp2_;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = (*self).width;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).width = _tmp3_;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = (*self).height;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).height = _tmp4_;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = (*self).data;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 ((*dest).data);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	(*dest).data = _tmp6_;
#line 296 "gnome-klotski.c"
}


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


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


void level_info_free (LevelInfo* self) {
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	level_info_destroy (self);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_free (self);
#line 326 "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_scores_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 442 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_scores_cb ((Klotski*) self);
#line 344 "gnome-klotski.c"
}


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


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


static void _g_application_quit_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 442 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_application_quit ((GApplication*) self);
#line 365 "gnome-klotski.c"
}


static void _klotski_prev_pack_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 449 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_prev_pack_cb ((Klotski*) self);
#line 372 "gnome-klotski.c"
}


static void _klotski_next_pack_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 449 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_next_pack_cb ((Klotski*) self);
#line 379 "gnome-klotski.c"
}


static void _klotski_prev_puzzle_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 449 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_prev_puzzle_cb ((Klotski*) self);
#line 386 "gnome-klotski.c"
}


static void _klotski_next_puzzle_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 449 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_next_puzzle_cb ((Klotski*) self);
#line 393 "gnome-klotski.c"
}


static void _klotski_start_puzzle_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 449 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_start_puzzle_cb ((Klotski*) self);
#line 400 "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 460 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	setlocale (LC_ALL, "");
#line 461 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
#line 462 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#line 463 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	textdomain (GETTEXT_PACKAGE);
#line 465 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = klotski_new ();
#line 465 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	app = _tmp0_;
#line 466 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = args;
#line 466 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1__length1 = args_length1;
#line 466 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = g_application_run ((GApplication*) app, _tmp1__length1, _tmp1_);
#line 466 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = _tmp2_;
#line 466 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (app);
#line 466 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 435 "gnome-klotski.c"
}


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


Klotski* klotski_construct (GType object_type) {
	Klotski * self = NULL;
#line 471 "/home/mcatanzaro/src/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 473 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_application_add_main_option_entries ((GApplication*) self, KLOTSKI_option_entries);
#line 469 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return self;
#line 457 "gnome-klotski.c"
}


Klotski* klotski_new (void) {
#line 469 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return klotski_construct (TYPE_KLOTSKI);
#line 464 "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 476 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (Klotski*) base;
#line 476 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (options != NULL, 0);
#line 478 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = options;
#line 478 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = g_variant_dict_contains (_tmp0_, "version");
#line 478 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp1_) {
#line 483 "gnome-klotski.c"
		FILE* _tmp2_ = NULL;
#line 481 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp2_ = stdout;
#line 481 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		fprintf (_tmp2_, "%1$s %2$s\n", "gnome-klotski", VERSION);
#line 482 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		result = EXIT_SUCCESS;
#line 482 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return result;
#line 493 "gnome-klotski.c"
	}
#line 486 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = -1;
#line 486 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 499 "gnome-klotski.c"
}


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


static void _klotski_size_allocate_cb_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self) {
#line 504 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_size_allocate_cb ((Klotski*) self, allocation);
#line 513 "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 505 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 522 "gnome-klotski.c"
}


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


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


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


static void __lambda4_ (Klotski* self) {
#line 591 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_popover (self, TRUE);
#line 550 "gnome-klotski.c"
}


static void ___lambda4__gtk_widget_show (GtkWidget* _sender, gpointer self) {
#line 591 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	__lambda4_ ((Klotski*) self);
#line 557 "gnome-klotski.c"
}


static void klotski_real_startup (GApplication* base) {
	Klotski * self;
	const gchar* _tmp0_ = NULL;
	GtkCssProvider* css_provider = NULL;
	GtkCssProvider* _tmp1_ = NULL;
	GtkCssProvider* _tmp2_ = NULL;
	GdkScreen* _tmp3_ = NULL;
	GtkCssProvider* _tmp4_ = NULL;
	GSettings* _tmp5_ = NULL;
	GtkBuilder* builder = NULL;
	GtkBuilder* _tmp6_ = NULL;
	GtkBuilder* _tmp7_ = NULL;
	GObject* _tmp8_ = NULL;
	GtkApplicationWindow* _tmp9_ = NULL;
	GtkApplicationWindow* _tmp10_ = NULL;
	GtkApplicationWindow* _tmp11_ = NULL;
	GtkApplicationWindow* _tmp12_ = NULL;
	GSettings* _tmp13_ = NULL;
	gint _tmp14_ = 0;
	GSettings* _tmp15_ = NULL;
	gint _tmp16_ = 0;
	GSettings* _tmp17_ = NULL;
	gboolean _tmp18_ = FALSE;
	GtkApplicationWindow* _tmp20_ = NULL;
	GtkApplicationWindow* _tmp21_ = NULL;
	GAction* _tmp22_ = NULL;
	GSimpleAction* _tmp23_ = NULL;
	GtkApplicationWindow* _tmp24_ = NULL;
	GAction* _tmp25_ = NULL;
	GSimpleAction* _tmp26_ = NULL;
	GtkApplicationWindow* _tmp27_ = NULL;
	GAction* _tmp28_ = NULL;
	GSimpleAction* _tmp29_ = NULL;
	GtkApplicationWindow* _tmp30_ = NULL;
	GAction* _tmp31_ = NULL;
	GSimpleAction* _tmp32_ = NULL;
	GtkApplicationWindow* _tmp33_ = NULL;
	GAction* _tmp34_ = NULL;
	GSimpleAction* _tmp35_ = NULL;
	gchar* _tmp36_ = NULL;
	gchar** _tmp37_ = NULL;
	gchar** _tmp38_ = NULL;
	gint _tmp38__length1 = 0;
	gchar* _tmp39_ = NULL;
	gchar** _tmp40_ = NULL;
	gchar** _tmp41_ = NULL;
	gint _tmp41__length1 = 0;
	gchar* _tmp42_ = NULL;
	gchar** _tmp43_ = NULL;
	gchar** _tmp44_ = NULL;
	gint _tmp44__length1 = 0;
	gchar* _tmp45_ = NULL;
	gchar** _tmp46_ = NULL;
	gchar** _tmp47_ = NULL;
	gint _tmp47__length1 = 0;
	gchar* histfile = NULL;
	const gchar* _tmp48_ = NULL;
	gchar* _tmp49_ = NULL;
	const gchar* _tmp50_ = NULL;
	History* _tmp51_ = NULL;
	History* _tmp52_ = NULL;
	GtkBuilder* _tmp53_ = NULL;
	GObject* _tmp54_ = NULL;
	GtkHeaderBar* _tmp55_ = NULL;
	GtkBuilder* _tmp56_ = NULL;
	GObject* _tmp57_ = NULL;
	GtkStack* _tmp58_ = NULL;
	GtkBuilder* _tmp59_ = NULL;
	GObject* _tmp60_ = NULL;
	GtkStack* _tmp61_ = NULL;
	GtkBuilder* _tmp62_ = NULL;
	GObject* _tmp63_ = NULL;
	GtkPopover* _tmp64_ = NULL;
	GtkListStore* _tmp65_ = NULL;
	GtkListStore* _tmp66_ = NULL;
	GtkListStore* _tmp67_ = NULL;
	GtkTreeIter* _tmp68_ = NULL;
	GtkTreeView* treeview_huarong = NULL;
	GtkBuilder* _tmp114_ = NULL;
	GObject* _tmp115_ = NULL;
	GtkTreeView* _tmp116_ = NULL;
	GtkTreeView* treeview_challenge = NULL;
	GtkBuilder* _tmp117_ = NULL;
	GObject* _tmp118_ = NULL;
	GtkTreeView* _tmp119_ = NULL;
	GtkTreeView* treeview_skill = NULL;
	GtkBuilder* _tmp120_ = NULL;
	GObject* _tmp121_ = NULL;
	GtkTreeView* _tmp122_ = NULL;
	GtkListStore* _tmp123_ = NULL;
	GtkListStore* _tmp124_ = NULL;
	GtkListStore* _tmp125_ = NULL;
	PuzzleView* _tmp126_ = NULL;
	PuzzleView* _tmp127_ = NULL;
	PuzzleView* _tmp128_ = NULL;
	PuzzleView* _tmp129_ = NULL;
	GtkApplicationWindow* _tmp130_ = NULL;
	PuzzleView* _tmp131_ = NULL;
	GSettings* _tmp132_ = NULL;
	gint _tmp133_ = 0;
	gint _tmp134_ = 0;
	GtkPopover* _tmp135_ = NULL;
	GtkApplicationWindow* _tmp136_ = NULL;
#line 489 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (Klotski*) base;
#line 491 "/home/mcatanzaro/src/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 493 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = _ ("Klotski");
#line 493 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_set_application_name (_tmp0_);
#line 494 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_set_default_icon_name ("gnome-klotski");
#line 496 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = gtk_css_provider_new ();
#line 496 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	css_provider = _tmp1_;
#line 497 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = css_provider;
#line 497 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_css_provider_load_from_resource (_tmp2_, "/org/gnome/klotski/ui/klotski.css");
#line 498 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = gdk_screen_get_default ();
#line 498 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = css_provider;
#line 498 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_style_context_add_provider_for_screen (_tmp3_, (GtkStyleProvider*) _tmp4_, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
#line 500 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = g_settings_new ("org.gnome.klotski");
#line 500 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->settings);
#line 500 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->settings = _tmp5_;
#line 502 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = gtk_builder_new_from_resource ("/org/gnome/klotski/ui/klotski.ui");
#line 502 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	builder = _tmp6_;
#line 503 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = builder;
#line 503 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = gtk_builder_get_object (_tmp7_, "window");
#line 503 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_application_window_get_type ()) ? ((GtkApplicationWindow*) _tmp8_) : NULL);
#line 503 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->window);
#line 503 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->window = _tmp9_;
#line 504 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp10_ = self->priv->window;
#line 504 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object ((GtkWidget*) _tmp10_, "size-allocate", (GCallback) _klotski_size_allocate_cb_gtk_widget_size_allocate, self, 0);
#line 505 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp11_ = self->priv->window;
#line 505 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object ((GtkWidget*) _tmp11_, "window-state-event", (GCallback) _klotski_window_state_event_cb_gtk_widget_window_state_event, self, 0);
#line 506 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp12_ = self->priv->window;
#line 506 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp13_ = self->priv->settings;
#line 506 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp14_ = g_settings_get_int (_tmp13_, "window-width");
#line 506 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp15_ = self->priv->settings;
#line 506 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp16_ = g_settings_get_int (_tmp15_, "window-height");
#line 506 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_set_default_size ((GtkWindow*) _tmp12_, _tmp14_, _tmp16_);
#line 507 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp17_ = self->priv->settings;
#line 507 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp18_ = g_settings_get_boolean (_tmp17_, "window-is-maximized");
#line 507 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp18_) {
#line 734 "gnome-klotski.c"
		GtkApplicationWindow* _tmp19_ = NULL;
#line 508 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp19_ = self->priv->window;
#line 508 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_window_maximize ((GtkWindow*) _tmp19_);
#line 740 "gnome-klotski.c"
	}
#line 510 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_action_map_add_action_entries ((GActionMap*) self, KLOTSKI_app_actions, G_N_ELEMENTS (KLOTSKI_app_actions), self);
#line 511 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp20_ = self->priv->window;
#line 511 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_action_map_add_action_entries ((GActionMap*) _tmp20_, KLOTSKI_win_actions, G_N_ELEMENTS (KLOTSKI_win_actions), self);
#line 512 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp21_ = self->priv->window;
#line 512 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp22_ = g_action_map_lookup_action ((GActionMap*) _tmp21_, "prev-pack");
#line 512 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp23_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp22_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp22_) : NULL);
#line 512 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->prev_pack);
#line 512 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->prev_pack = _tmp23_;
#line 513 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp24_ = self->priv->window;
#line 513 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp25_ = g_action_map_lookup_action ((GActionMap*) _tmp24_, "next-pack");
#line 513 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp26_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp25_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp25_) : NULL);
#line 513 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->next_pack);
#line 513 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->next_pack = _tmp26_;
#line 514 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp27_ = self->priv->window;
#line 514 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp28_ = g_action_map_lookup_action ((GActionMap*) _tmp27_, "prev-puzzle");
#line 514 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp29_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp28_) : NULL);
#line 514 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->prev_puzzle);
#line 514 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->prev_puzzle = _tmp29_;
#line 515 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp30_ = self->priv->window;
#line 515 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp31_ = g_action_map_lookup_action ((GActionMap*) _tmp30_, "next-puzzle");
#line 515 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp32_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp31_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp31_) : NULL);
#line 515 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->next_puzzle);
#line 515 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->next_puzzle = _tmp32_;
#line 516 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp33_ = self->priv->window;
#line 516 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp34_ = g_action_map_lookup_action ((GActionMap*) _tmp33_, "start-game");
#line 516 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp35_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp34_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp34_) : NULL);
#line 516 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->start_game);
#line 516 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->start_game = _tmp35_;
#line 518 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp36_ = g_strdup ("Up");
#line 518 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp37_ = g_new0 (gchar*, 1 + 1);
#line 518 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp37_[0] = _tmp36_;
#line 518 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp38_ = _tmp37_;
#line 518 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp38__length1 = 1;
#line 518 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_set_accels_for_action ((GtkApplication*) self, "win.prev-puzzle", _tmp38_);
#line 518 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp38_ = (_vala_array_free (_tmp38_, _tmp38__length1, (GDestroyNotify) g_free), NULL);
#line 519 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp39_ = g_strdup ("Down");
#line 519 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp40_ = g_new0 (gchar*, 1 + 1);
#line 519 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp40_[0] = _tmp39_;
#line 519 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp41_ = _tmp40_;
#line 519 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp41__length1 = 1;
#line 519 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_set_accels_for_action ((GtkApplication*) self, "win.next-puzzle", _tmp41_);
#line 519 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp41_ = (_vala_array_free (_tmp41_, _tmp41__length1, (GDestroyNotify) g_free), NULL);
#line 520 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp42_ = g_strdup ("Page_Up");
#line 520 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp43_ = g_new0 (gchar*, 1 + 1);
#line 520 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp43_[0] = _tmp42_;
#line 520 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp44_ = _tmp43_;
#line 520 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp44__length1 = 1;
#line 520 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_set_accels_for_action ((GtkApplication*) self, "win.prev-pack", _tmp44_);
#line 520 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp44_ = (_vala_array_free (_tmp44_, _tmp44__length1, (GDestroyNotify) g_free), NULL);
#line 521 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp45_ = g_strdup ("Page_Down");
#line 521 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp46_ = g_new0 (gchar*, 1 + 1);
#line 521 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp46_[0] = _tmp45_;
#line 521 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp47_ = _tmp46_;
#line 521 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp47__length1 = 1;
#line 521 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_set_accels_for_action ((GtkApplication*) self, "win.next-pack", _tmp47_);
#line 521 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp47_ = (_vala_array_free (_tmp47_, _tmp47__length1, (GDestroyNotify) g_free), NULL);
#line 523 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp48_ = g_get_user_data_dir ();
#line 523 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp49_ = g_build_filename (_tmp48_, "gnome-klotski", "history", NULL);
#line 523 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	histfile = _tmp49_;
#line 525 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp50_ = histfile;
#line 525 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp51_ = history_new (_tmp50_);
#line 525 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->history);
#line 525 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->history = _tmp51_;
#line 526 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp52_ = self->priv->history;
#line 526 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	history_load (_tmp52_);
#line 528 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp53_ = builder;
#line 528 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp54_ = gtk_builder_get_object (_tmp53_, "headerbar");
#line 528 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp55_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp54_, gtk_header_bar_get_type ()) ? ((GtkHeaderBar*) _tmp54_) : NULL);
#line 528 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->headerbar);
#line 528 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->headerbar = _tmp55_;
#line 529 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp56_ = builder;
#line 529 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp57_ = gtk_builder_get_object (_tmp56_, "stack-packs");
#line 529 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp58_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp57_, gtk_stack_get_type ()) ? ((GtkStack*) _tmp57_) : NULL);
#line 529 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->stack_packs);
#line 529 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->stack_packs = _tmp58_;
#line 530 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp59_ = builder;
#line 530 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp60_ = gtk_builder_get_object (_tmp59_, "stack-puzzles");
#line 530 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp61_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp60_, gtk_stack_get_type ()) ? ((GtkStack*) _tmp60_) : NULL);
#line 530 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->stack_puzzles);
#line 530 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->stack_puzzles = _tmp61_;
#line 531 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp62_ = builder;
#line 531 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp63_ = gtk_builder_get_object (_tmp62_, "puzzles-popover");
#line 531 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp64_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp63_, gtk_popover_get_type ()) ? ((GtkPopover*) _tmp63_) : NULL);
#line 531 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzles_popover);
#line 531 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_popover = _tmp64_;
#line 534 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp65_ = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT, G_TYPE_BOOLEAN, -1);
#line 534 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->liststore_huarong);
#line 534 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->liststore_huarong = _tmp65_;
#line 535 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp66_ = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT, G_TYPE_BOOLEAN, -1);
#line 535 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->liststore_challenge);
#line 535 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->liststore_challenge = _tmp66_;
#line 536 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp67_ = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT, G_TYPE_BOOLEAN, -1);
#line 536 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->liststore_skill);
#line 536 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->liststore_skill = _tmp67_;
#line 538 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp68_ = g_new0 (GtkTreeIter, G_N_ELEMENTS (KLOTSKI_level));
#line 538 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_items = (g_free (self->priv->puzzles_items), NULL);
#line 538 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_items = _tmp68_;
#line 538 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_items_length1 = G_N_ELEMENTS (KLOTSKI_level);
#line 538 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->_puzzles_items_size_ = self->priv->puzzles_items_length1;
#line 940 "gnome-klotski.c"
	{
		gint i = 0;
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		i = 0;
#line 945 "gnome-klotski.c"
		{
			gboolean _tmp69_ = FALSE;
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp69_ = TRUE;
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			while (TRUE) {
#line 952 "gnome-klotski.c"
				gint _tmp71_ = 0;
				gint _tmp72_ = 0;
				LevelInfo _tmp73_ = {0};
				gint _tmp74_ = 0;
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!_tmp69_) {
#line 959 "gnome-klotski.c"
					gint _tmp70_ = 0;
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp70_ = i;
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					i = _tmp70_ + 1;
#line 965 "gnome-klotski.c"
				}
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp69_ = FALSE;
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp71_ = i;
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!(_tmp71_ < G_N_ELEMENTS (KLOTSKI_level))) {
#line 539 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					break;
#line 975 "gnome-klotski.c"
				}
#line 541 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp72_ = i;
#line 541 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp73_ = KLOTSKI_level[_tmp72_];
#line 541 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp74_ = _tmp73_.group;
#line 541 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				switch (_tmp74_) {
#line 541 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					case 0:
#line 987 "gnome-klotski.c"
					{
						GtkListStore* _tmp75_ = NULL;
						GtkTreeIter* _tmp76_ = NULL;
						gint _tmp76__length1 = 0;
						gint _tmp77_ = 0;
						GtkTreeIter _tmp78_ = {0};
						GtkListStore* _tmp79_ = NULL;
						GtkTreeIter* _tmp80_ = NULL;
						gint _tmp80__length1 = 0;
						gint _tmp81_ = 0;
						GtkTreeIter _tmp82_ = {0};
						gint _tmp83_ = 0;
						LevelInfo _tmp84_ = {0};
						const gchar* _tmp85_ = NULL;
						const gchar* _tmp86_ = NULL;
						gint _tmp87_ = 0;
#line 544 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp75_ = self->priv->liststore_huarong;
#line 544 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp76_ = self->priv->puzzles_items;
#line 544 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp76__length1 = self->priv->puzzles_items_length1;
#line 544 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp77_ = i;
#line 544 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_list_store_append (_tmp75_, &_tmp78_);
#line 544 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp76_[_tmp77_] = _tmp78_;
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp79_ = self->priv->liststore_huarong;
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp80_ = self->priv->puzzles_items;
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp80__length1 = self->priv->puzzles_items_length1;
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp81_ = i;
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp82_ = _tmp80_[_tmp81_];
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp83_ = i;
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp84_ = KLOTSKI_level[_tmp83_];
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp85_ = _tmp84_.name;
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp86_ = _ (_tmp85_);
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp87_ = i;
#line 545 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_list_store_set (_tmp79_, &_tmp82_, 0, _tmp86_, 1, FALSE, 2, _tmp87_, 3, FALSE, -1);
#line 550 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						break;
#line 1040 "gnome-klotski.c"
					}
#line 541 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					case 1:
#line 1044 "gnome-klotski.c"
					{
						GtkListStore* _tmp88_ = NULL;
						GtkTreeIter* _tmp89_ = NULL;
						gint _tmp89__length1 = 0;
						gint _tmp90_ = 0;
						GtkTreeIter _tmp91_ = {0};
						GtkListStore* _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 552 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp88_ = self->priv->liststore_challenge;
#line 552 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp89_ = self->priv->puzzles_items;
#line 552 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp89__length1 = self->priv->puzzles_items_length1;
#line 552 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp90_ = i;
#line 552 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_list_store_append (_tmp88_, &_tmp91_);
#line 552 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp89_[_tmp90_] = _tmp91_;
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp92_ = self->priv->liststore_challenge;
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp93_ = self->priv->puzzles_items;
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp93__length1 = self->priv->puzzles_items_length1;
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp94_ = i;
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp95_ = _tmp93_[_tmp94_];
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp96_ = i;
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp97_ = KLOTSKI_level[_tmp96_];
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp98_ = _tmp97_.name;
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp99_ = _ (_tmp98_);
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp100_ = i;
#line 553 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_list_store_set (_tmp92_, &_tmp95_, 0, _tmp99_, 1, FALSE, 2, _tmp100_, 3, FALSE, -1);
#line 558 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						break;
#line 1097 "gnome-klotski.c"
					}
#line 541 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					case 2:
#line 1101 "gnome-klotski.c"
					{
						GtkListStore* _tmp101_ = NULL;
						GtkTreeIter* _tmp102_ = NULL;
						gint _tmp102__length1 = 0;
						gint _tmp103_ = 0;
						GtkTreeIter _tmp104_ = {0};
						GtkListStore* _tmp105_ = NULL;
						GtkTreeIter* _tmp106_ = NULL;
						gint _tmp106__length1 = 0;
						gint _tmp107_ = 0;
						GtkTreeIter _tmp108_ = {0};
						gint _tmp109_ = 0;
						LevelInfo _tmp110_ = {0};
						const gchar* _tmp111_ = NULL;
						const gchar* _tmp112_ = NULL;
						gint _tmp113_ = 0;
#line 560 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp101_ = self->priv->liststore_skill;
#line 560 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp102_ = self->priv->puzzles_items;
#line 560 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp102__length1 = self->priv->puzzles_items_length1;
#line 560 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp103_ = i;
#line 560 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_list_store_append (_tmp101_, &_tmp104_);
#line 560 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp102_[_tmp103_] = _tmp104_;
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp105_ = self->priv->liststore_skill;
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp106_ = self->priv->puzzles_items;
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp106__length1 = self->priv->puzzles_items_length1;
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp107_ = i;
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp108_ = _tmp106_[_tmp107_];
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp109_ = i;
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp110_ = KLOTSKI_level[_tmp109_];
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp111_ = _tmp110_.name;
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp112_ = _ (_tmp111_);
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp113_ = i;
#line 561 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						gtk_list_store_set (_tmp105_, &_tmp108_, 0, _tmp112_, 1, FALSE, 2, _tmp113_, 3, FALSE, -1);
#line 566 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						break;
#line 1154 "gnome-klotski.c"
					}
					default:
#line 541 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					break;
#line 1159 "gnome-klotski.c"
				}
			}
		}
	}
#line 570 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp114_ = builder;
#line 570 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp115_ = gtk_builder_get_object (_tmp114_, "treeview-huarong");
#line 570 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp116_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp115_, gtk_tree_view_get_type ()) ? ((GtkTreeView*) _tmp115_) : NULL);
#line 570 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	treeview_huarong = _tmp116_;
#line 571 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp117_ = builder;
#line 571 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp118_ = gtk_builder_get_object (_tmp117_, "treeview-challenge");
#line 571 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp119_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp118_, gtk_tree_view_get_type ()) ? ((GtkTreeView*) _tmp118_) : NULL);
#line 571 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	treeview_challenge = _tmp119_;
#line 572 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp120_ = builder;
#line 572 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp121_ = gtk_builder_get_object (_tmp120_, "treeview-skill");
#line 572 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp122_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp121_, gtk_tree_view_get_type ()) ? ((GtkTreeView*) _tmp121_) : NULL);
#line 572 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	treeview_skill = _tmp122_;
#line 574 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp123_ = self->priv->liststore_huarong;
#line 574 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_view_set_model (treeview_huarong, (GtkTreeModel*) _tmp123_);
#line 575 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp124_ = self->priv->liststore_challenge;
#line 575 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_view_set_model (treeview_challenge, (GtkTreeModel*) _tmp124_);
#line 576 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp125_ = self->priv->liststore_skill;
#line 576 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_view_set_model (treeview_skill, (GtkTreeModel*) _tmp125_);
#line 578 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object (treeview_huarong, "row-activated", (GCallback) _klotski_level_huarong_cb_gtk_tree_view_row_activated, self, 0);
#line 579 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object (treeview_challenge, "row-activated", (GCallback) _klotski_level_challenge_cb_gtk_tree_view_row_activated, self, 0);
#line 580 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object (treeview_skill, "row-activated", (GCallback) _klotski_level_skill_cb_gtk_tree_view_row_activated, self, 0);
#line 582 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp126_ = puzzle_view_new ();
#line 582 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp126_);
#line 582 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->view);
#line 582 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->view = _tmp126_;
#line 583 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp127_ = self->priv->view;
#line 583 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_set_halign ((GtkWidget*) _tmp127_, GTK_ALIGN_FILL);
#line 584 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp128_ = self->priv->view;
#line 584 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_set ((GtkWidget*) _tmp128_, "can-focus", TRUE, NULL);
#line 585 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp129_ = self->priv->view;
#line 585 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_show ((GtkWidget*) _tmp129_);
#line 586 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp130_ = self->priv->window;
#line 586 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp131_ = self->priv->view;
#line 586 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_container_add ((GtkContainer*) _tmp130_, (GtkWidget*) _tmp131_);
#line 588 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_load_solved_state (self);
#line 590 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp132_ = self->priv->settings;
#line 590 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp133_ = g_settings_get_int (_tmp132_, KLOTSKI_KEY_LEVEL);
#line 590 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp134_ = CLAMP (_tmp133_, 0, G_N_ELEMENTS (KLOTSKI_level) - 1);
#line 590 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->current_level = _tmp134_;
#line 591 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp135_ = self->priv->puzzles_popover;
#line 591 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object ((GtkWidget*) _tmp135_, "show", (GCallback) ___lambda4__gtk_widget_show, self, 0);
#line 592 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_popover (self, TRUE);
#line 594 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_start_puzzle (self);
#line 595 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp136_ = self->priv->window;
#line 595 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_application_add_window ((GtkApplication*) self, (GtkWindow*) _tmp136_);
#line 489 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (treeview_skill);
#line 489 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (treeview_challenge);
#line 489 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (treeview_huarong);
#line 489 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (histfile);
#line 489 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (builder);
#line 489 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (css_provider);
#line 1266 "gnome-klotski.c"
}


static void klotski_real_activate (GApplication* base) {
	Klotski * self;
	GtkApplicationWindow* _tmp0_ = NULL;
#line 598 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (Klotski*) base;
#line 600 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->window;
#line 600 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_present ((GtkWindow*) _tmp0_);
#line 1279 "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;
	gint _tmp5_ = 0;
	GSettings* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
#line 603 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = (Klotski*) base;
#line 605 "/home/mcatanzaro/src/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 608 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->settings;
#line 608 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = self->priv->current_level;
#line 608 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_settings_set_int (_tmp0_, KLOTSKI_KEY_LEVEL, _tmp1_);
#line 611 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = self->priv->settings;
#line 611 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->window_width;
#line 611 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_settings_set_int (_tmp2_, "window-width", _tmp3_);
#line 612 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = self->priv->settings;
#line 612 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = self->priv->window_height;
#line 612 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_settings_set_int (_tmp4_, "window-height", _tmp5_);
#line 613 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = self->priv->settings;
#line 613 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = self->priv->is_maximized;
#line 613 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_settings_set_boolean (_tmp6_, "window-is-maximized", _tmp7_);
#line 1321 "gnome-klotski.c"
}


static void klotski_size_allocate_cb (Klotski* self, GtkAllocation* allocation) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkAllocation _tmp3_ = {0};
	gint _tmp4_ = 0;
	GtkAllocation _tmp5_ = {0};
	gint _tmp6_ = 0;
#line 620 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 620 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (allocation != NULL);
#line 622 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = self->priv->is_maximized;
#line 622 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp1_) {
#line 622 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp0_ = TRUE;
#line 1342 "gnome-klotski.c"
	} else {
		gboolean _tmp2_ = FALSE;
#line 622 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp2_ = self->priv->is_tiled;
#line 622 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp0_ = _tmp2_;
#line 1349 "gnome-klotski.c"
	}
#line 622 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp0_) {
#line 623 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 1355 "gnome-klotski.c"
	}
#line 624 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = *allocation;
#line 624 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = _tmp3_.width;
#line 624 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->window_width = _tmp4_;
#line 625 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = *allocation;
#line 625 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = _tmp5_.height;
#line 625 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->window_height = _tmp6_;
#line 1369 "gnome-klotski.c"
}


static gboolean klotski_window_state_event_cb (Klotski* self, GdkEventWindowState* event) {
	gboolean result = FALSE;
	GdkEventWindowState* _tmp0_ = NULL;
	GdkWindowState _tmp1_ = 0;
	GdkEventWindowState* _tmp4_ = NULL;
	GdkWindowState _tmp5_ = 0;
#line 628 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 628 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 630 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = event;
#line 630 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = _tmp0_->changed_mask;
#line 630 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if ((_tmp1_ & GDK_WINDOW_STATE_MAXIMIZED) != 0) {
#line 1389 "gnome-klotski.c"
		GdkEventWindowState* _tmp2_ = NULL;
		GdkWindowState _tmp3_ = 0;
#line 631 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp2_ = event;
#line 631 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp3_ = _tmp2_->new_window_state;
#line 631 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		self->priv->is_maximized = (_tmp3_ & GDK_WINDOW_STATE_MAXIMIZED) != 0;
#line 1398 "gnome-klotski.c"
	}
#line 633 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = event;
#line 633 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = _tmp4_->changed_mask;
#line 633 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if ((_tmp5_ & GDK_WINDOW_STATE_TILED) != 0) {
#line 1406 "gnome-klotski.c"
		GdkEventWindowState* _tmp6_ = NULL;
		GdkWindowState _tmp7_ = 0;
#line 634 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp6_ = event;
#line 634 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp7_ = _tmp6_->new_window_state;
#line 634 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		self->priv->is_tiled = (_tmp7_ & GDK_WINDOW_STATE_TILED) != 0;
#line 1415 "gnome-klotski.c"
	}
#line 635 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = FALSE;
#line 635 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 1421 "gnome-klotski.c"
}


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


static void klotski_help_cb (Klotski* self) {
	GError * _inner_error_ = NULL;
#line 647 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 1438 "gnome-klotski.c"
	{
		GtkApplicationWindow* _tmp0_ = NULL;
		GdkScreen* _tmp1_ = NULL;
		guint32 _tmp2_ = 0U;
#line 651 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp0_ = self->priv->window;
#line 651 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp1_ = gtk_window_get_screen ((GtkWindow*) _tmp0_);
#line 651 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp2_ = gtk_get_current_event_time ();
#line 651 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_show_uri (_tmp1_, "help:gnome-klotski", _tmp2_, &_inner_error_);
#line 651 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1453 "gnome-klotski.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
#line 649 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 649 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 655 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp3_ = e;
#line 655 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp4_ = _tmp3_->message;
#line 655 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_warning ("gnome-klotski.vala:655: Failed to show help: %s", _tmp4_);
#line 649 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 1475 "gnome-klotski.c"
	}
	__finally0:
#line 649 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 649 "/home/mcatanzaro/src/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 649 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 649 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 1486 "gnome-klotski.c"
	}
}


static void klotski_about_cb (Klotski* self) {
#line 661 "/home/mcatanzaro/src/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 662 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	static const gchar* documenters[] = {"Andrew Sobala", NULL};
#line 1496 "gnome-klotski.c"
	GtkApplicationWindow* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
#line 659 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 664 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->window;
#line 664 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = _ ("Klotski");
#line 664 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _ ("Sliding block puzzles");
#line 664 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = _ ("translator-credits");
#line 664 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_show_about_dialog ((GtkWindow*) _tmp0_, "program-name", _tmp1_, "version", VERSION, "comments", _tmp2_, "copyright", "Copyright © 1999–2008 Lars Rydlinge\n" "Copyright © 2014–2015 Michael Catanzaro\n" "Copyright © 2015 Arnaud Bonatti\n", "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 1513 "gnome-klotski.c"
}


static void klotski_prev_pack_cb (Klotski* self) {
	GtkPopover* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gint _tmp3_ = 0;
#line 685 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 687 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->puzzles_popover;
#line 687 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = gtk_widget_get_visible ((GtkWidget*) _tmp0_);
#line 687 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _tmp1_;
#line 687 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (!_tmp2_) {
#line 688 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 1534 "gnome-klotski.c"
	}
#line 689 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->current_pack;
#line 689 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->current_pack = _tmp3_ - 1;
#line 690 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_popover (self, FALSE);
#line 1542 "gnome-klotski.c"
}


static void klotski_next_pack_cb (Klotski* self) {
	GtkPopover* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gint _tmp3_ = 0;
#line 693 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 695 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->puzzles_popover;
#line 695 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = gtk_widget_get_visible ((GtkWidget*) _tmp0_);
#line 695 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _tmp1_;
#line 695 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (!_tmp2_) {
#line 696 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 1563 "gnome-klotski.c"
	}
#line 697 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->current_pack;
#line 697 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->current_pack = _tmp3_ + 1;
#line 698 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_popover (self, FALSE);
#line 1571 "gnome-klotski.c"
}


static void klotski_prev_puzzle_cb (Klotski* self) {
	GtkPopover* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gint _tmp3_ = 0;
#line 701 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 703 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->puzzles_popover;
#line 703 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = gtk_widget_get_visible ((GtkWidget*) _tmp0_);
#line 703 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _tmp1_;
#line 703 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (!_tmp2_) {
#line 704 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 1592 "gnome-klotski.c"
	}
#line 705 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->current_level;
#line 705 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->current_level = _tmp3_ - 1;
#line 706 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_popover (self, TRUE);
#line 707 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_start_puzzle (self);
#line 1602 "gnome-klotski.c"
}


static void klotski_next_puzzle_cb (Klotski* self) {
	GtkPopover* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gint _tmp3_ = 0;
#line 710 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 712 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->puzzles_popover;
#line 712 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = gtk_widget_get_visible ((GtkWidget*) _tmp0_);
#line 712 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _tmp1_;
#line 712 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (!_tmp2_) {
#line 713 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 1623 "gnome-klotski.c"
	}
#line 714 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->current_level;
#line 714 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->current_level = _tmp3_ + 1;
#line 715 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_popover (self, TRUE);
#line 716 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_start_puzzle (self);
#line 1633 "gnome-klotski.c"
}


static void klotski_start_puzzle_cb (Klotski* self) {
	GtkTreeView* tree = NULL;
	GtkStack* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gconstpointer _tmp4_ = NULL;
	GtkWidget* _tmp5_ = NULL;
	GtkTreeView* _tmp6_ = NULL;
	GtkTreeView* _tmp7_ = NULL;
	GtkTreeModel* model = NULL;
	GtkTreeView* _tmp8_ = NULL;
	GtkTreeModel* _tmp9_ = NULL;
	GtkTreeModel* _tmp10_ = NULL;
	GtkTreeIter iter = {0};
	GtkTreeView* _tmp11_ = NULL;
	GtkTreeSelection* _tmp12_ = NULL;
	GtkTreeModel* _tmp13_ = NULL;
	GtkTreeIter _tmp14_ = {0};
	gboolean _tmp15_ = FALSE;
	GtkTreeModel* _tmp16_ = NULL;
	GtkPopover* _tmp19_ = NULL;
#line 719 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->stack_puzzles;
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = gtk_container_get_children ((GtkContainer*) _tmp0_);
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _tmp1_;
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->current_pack;
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = g_list_nth_data (_tmp2_, (guint) _tmp3_);
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = gtk_bin_get_child ((GtkBin*) G_TYPE_CHECK_INSTANCE_CAST ((GtkWidget*) _tmp4_, gtk_scrolled_window_get_type (), GtkScrolledWindow));
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_tree_view_get_type (), GtkTreeView));
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = _tmp6_;
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_list_free0 (_tmp2_);
#line 721 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	tree = _tmp7_;
#line 722 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = tree;
#line 722 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = gtk_tree_view_get_model (_tmp8_);
#line 722 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp10_ = _g_object_ref0 (_tmp9_);
#line 722 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	model = _tmp10_;
#line 725 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp11_ = tree;
#line 725 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp12_ = gtk_tree_view_get_selection (_tmp11_);
#line 725 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp15_ = gtk_tree_selection_get_selected (_tmp12_, &_tmp13_, &_tmp14_);
#line 725 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (model);
#line 725 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp16_ = _g_object_ref0 (_tmp13_);
#line 725 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	model = _tmp16_;
#line 725 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	iter = _tmp14_;
#line 725 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp15_) {
#line 1705 "gnome-klotski.c"
		GtkTreeModel* _tmp17_ = NULL;
		GtkTreeIter _tmp18_ = {0};
#line 726 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp17_ = model;
#line 726 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp18_ = iter;
#line 726 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		klotski_start_puzzle_from_iter (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_list_store_get_type (), GtkListStore), &_tmp18_);
#line 1714 "gnome-klotski.c"
	} else {
#line 728 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		klotski_start_puzzle (self);
#line 1718 "gnome-klotski.c"
	}
#line 729 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp19_ = self->priv->puzzles_popover;
#line 729 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_hide ((GtkWidget*) _tmp19_);
#line 719 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (model);
#line 719 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (tree);
#line 1728 "gnome-klotski.c"
}


static void klotski_update_popover (Klotski* self, gboolean make_current) {
	gint current_level_pack = 0;
	GtkTreeIter iter = {0};
	GtkTreeIter* _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	gint _tmp1_ = 0;
	GtkTreeIter _tmp2_ = {0};
	GtkListStore* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
	gboolean _tmp5_ = FALSE;
	gboolean _tmp9_ = FALSE;
	GtkTreeSelection* selection = NULL;
	GtkStack* _tmp11_ = NULL;
	GList* _tmp12_ = NULL;
	GList* _tmp13_ = NULL;
	gint _tmp14_ = 0;
	gconstpointer _tmp15_ = NULL;
	GtkWidget* _tmp16_ = NULL;
	GtkTreeSelection* _tmp17_ = NULL;
	GtkTreeSelection* _tmp18_ = NULL;
	GtkTreeSelection* _tmp19_ = NULL;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
	GtkStack* _tmp25_ = NULL;
	GtkStack* _tmp26_ = NULL;
	GList* _tmp27_ = NULL;
	GList* _tmp28_ = NULL;
	gint _tmp29_ = 0;
	gconstpointer _tmp30_ = NULL;
	GtkStack* _tmp31_ = NULL;
	GtkStack* _tmp32_ = NULL;
	GList* _tmp33_ = NULL;
	GList* _tmp34_ = NULL;
	gint _tmp35_ = 0;
	gconstpointer _tmp36_ = NULL;
#line 736 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 739 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->puzzles_items;
#line 739 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0__length1 = self->priv->puzzles_items_length1;
#line 739 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = self->priv->current_level;
#line 739 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _tmp0_[_tmp1_];
#line 739 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	iter = _tmp2_;
#line 740 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->liststore_huarong;
#line 740 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = iter;
#line 740 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = gtk_list_store_iter_is_valid (_tmp3_, &_tmp4_);
#line 740 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp5_) {
#line 741 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		current_level_pack = 0;
#line 1789 "gnome-klotski.c"
	} else {
		GtkListStore* _tmp6_ = NULL;
		GtkTreeIter _tmp7_ = {0};
		gboolean _tmp8_ = FALSE;
#line 742 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp6_ = self->priv->liststore_challenge;
#line 742 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp7_ = iter;
#line 742 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp8_ = gtk_list_store_iter_is_valid (_tmp6_, &_tmp7_);
#line 742 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (_tmp8_) {
#line 743 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			current_level_pack = 1;
#line 1804 "gnome-klotski.c"
		} else {
#line 745 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			current_level_pack = 2;
#line 1808 "gnome-klotski.c"
		}
	}
#line 747 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = make_current;
#line 747 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp9_) {
#line 1815 "gnome-klotski.c"
		gint _tmp10_ = 0;
#line 748 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp10_ = current_level_pack;
#line 748 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		self->priv->current_pack = _tmp10_;
#line 1821 "gnome-klotski.c"
	}
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp11_ = self->priv->stack_puzzles;
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp12_ = gtk_container_get_children ((GtkContainer*) _tmp11_);
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp13_ = _tmp12_;
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp14_ = self->priv->current_pack;
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp15_ = g_list_nth_data (_tmp13_, (guint) _tmp14_);
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp16_ = gtk_bin_get_child ((GtkBin*) G_TYPE_CHECK_INSTANCE_CAST ((GtkWidget*) _tmp15_, gtk_scrolled_window_get_type (), GtkScrolledWindow));
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp17_ = gtk_tree_view_get_selection (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_tree_view_get_type (), GtkTreeView));
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp18_ = _g_object_ref0 (_tmp17_);
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp19_ = _tmp18_;
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_list_free0 (_tmp13_);
#line 751 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	selection = _tmp19_;
#line 752 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp20_ = self->priv->current_pack;
#line 752 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp21_ = current_level_pack;
#line 752 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp20_ == _tmp21_) {
#line 1851 "gnome-klotski.c"
		GtkTreeSelection* _tmp22_ = NULL;
		GtkTreeIter _tmp23_ = {0};
#line 753 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp22_ = selection;
#line 753 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp23_ = iter;
#line 753 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_tree_selection_select_iter (_tmp22_, &_tmp23_);
#line 1860 "gnome-klotski.c"
	} else {
		GtkTreeSelection* _tmp24_ = NULL;
#line 755 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp24_ = selection;
#line 755 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_tree_selection_unselect_all (_tmp24_);
#line 1867 "gnome-klotski.c"
	}
#line 757 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_buttons_state (self);
#line 760 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp25_ = self->priv->stack_packs;
#line 760 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp26_ = self->priv->stack_packs;
#line 760 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp27_ = gtk_container_get_children ((GtkContainer*) _tmp26_);
#line 760 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp28_ = _tmp27_;
#line 760 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp29_ = self->priv->current_pack;
#line 760 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp30_ = g_list_nth_data (_tmp28_, (guint) _tmp29_);
#line 760 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_stack_set_visible_child (_tmp25_, (GtkWidget*) _tmp30_);
#line 760 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_list_free0 (_tmp28_);
#line 761 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp31_ = self->priv->stack_puzzles;
#line 761 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp32_ = self->priv->stack_puzzles;
#line 761 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp33_ = gtk_container_get_children ((GtkContainer*) _tmp32_);
#line 761 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp34_ = _tmp33_;
#line 761 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp35_ = self->priv->current_pack;
#line 761 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp36_ = g_list_nth_data (_tmp34_, (guint) _tmp35_);
#line 761 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_stack_set_visible_child (_tmp31_, (GtkWidget*) _tmp36_);
#line 761 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_list_free0 (_tmp34_);
#line 736 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (selection);
#line 1905 "gnome-klotski.c"
}


static void klotski_update_buttons_state (Klotski* self) {
	GSimpleAction* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	GSimpleAction* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GSimpleAction* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	GSimpleAction* _tmp6_ = NULL;
	gint _tmp7_ = 0;
#line 764 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 766 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->prev_pack;
#line 766 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = self->priv->current_pack;
#line 766 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp0_, _tmp1_ > 0);
#line 767 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = self->priv->next_pack;
#line 767 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->current_pack;
#line 767 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp2_, _tmp3_ < 2);
#line 769 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = self->priv->prev_puzzle;
#line 769 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = self->priv->current_level;
#line 769 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp4_, _tmp5_ > 0);
#line 770 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = self->priv->next_puzzle;
#line 770 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = self->priv->current_level;
#line 770 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp6_, _tmp7_ < (G_N_ELEMENTS (KLOTSKI_level) - 1));
#line 1944 "gnome-klotski.c"
}


static void klotski_level_huarong_cb (Klotski* self, GtkTreePath* path, GtkTreeViewColumn* column) {
	GtkListStore* _tmp0_ = NULL;
	GtkTreePath* _tmp1_ = NULL;
	GtkTreeViewColumn* _tmp2_ = NULL;
#line 777 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 777 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (path != NULL);
#line 777 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (column != NULL);
#line 779 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->liststore_huarong;
#line 779 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = path;
#line 779 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = column;
#line 779 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_level_cb (self, _tmp0_, _tmp1_, _tmp2_);
#line 1966 "gnome-klotski.c"
}


static void klotski_level_challenge_cb (Klotski* self, GtkTreePath* path, GtkTreeViewColumn* column) {
	GtkListStore* _tmp0_ = NULL;
	GtkTreePath* _tmp1_ = NULL;
	GtkTreeViewColumn* _tmp2_ = NULL;
#line 781 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 781 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (path != NULL);
#line 781 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (column != NULL);
#line 783 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->liststore_challenge;
#line 783 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = path;
#line 783 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = column;
#line 783 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_level_cb (self, _tmp0_, _tmp1_, _tmp2_);
#line 1988 "gnome-klotski.c"
}


static void klotski_level_skill_cb (Klotski* self, GtkTreePath* path, GtkTreeViewColumn* column) {
	GtkListStore* _tmp0_ = NULL;
	GtkTreePath* _tmp1_ = NULL;
	GtkTreeViewColumn* _tmp2_ = NULL;
#line 785 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 785 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (path != NULL);
#line 785 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (column != NULL);
#line 787 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->liststore_skill;
#line 787 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = path;
#line 787 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = column;
#line 787 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_level_cb (self, _tmp0_, _tmp1_, _tmp2_);
#line 2010 "gnome-klotski.c"
}


static void klotski_level_cb (Klotski* self, GtkListStore* liststore, GtkTreePath* path, GtkTreeViewColumn* column) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_ = NULL;
	GtkTreePath* _tmp1_ = NULL;
	GtkTreeIter _tmp2_ = {0};
	GtkListStore* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
#line 789 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 789 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (liststore != NULL);
#line 789 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (path != NULL);
#line 789 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (column != NULL);
#line 793 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = liststore;
#line 793 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = path;
#line 793 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_model_get_iter ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
#line 793 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	iter = _tmp2_;
#line 794 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = liststore;
#line 794 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = iter;
#line 794 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_start_puzzle_from_iter (self, _tmp3_, &_tmp4_);
#line 2043 "gnome-klotski.c"
}


static void klotski_start_puzzle_from_iter (Klotski* self, GtkListStore* model, GtkTreeIter* iter) {
	GValue val = {0};
	GtkListStore* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GValue _tmp2_ = {0};
	gint requested_level = 0;
	GValue _tmp3_ = {0};
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
#line 801 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 801 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (model != NULL);
#line 801 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (iter != NULL);
#line 804 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = model;
#line 804 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = *iter;
#line 804 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp0_, &_tmp1_, 2, &_tmp2_);
#line 804 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
#line 804 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	val = _tmp2_;
#line 806 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = val;
#line 806 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	requested_level = g_value_get_int (&_tmp3_);
#line 807 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = requested_level;
#line 807 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp4_ < 0) {
#line 808 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
#line 808 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 2084 "gnome-klotski.c"
	}
#line 810 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = requested_level;
#line 810 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->current_level = _tmp5_;
#line 811 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_buttons_state (self);
#line 812 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_start_puzzle (self);
#line 801 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
#line 2096 "gnome-klotski.c"
}


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


static void klotski_start_puzzle (Klotski* self) {
	GtkHeaderBar* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	LevelInfo _tmp2_ = {0};
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	LevelInfo _tmp6_ = {0};
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	LevelInfo _tmp9_ = {0};
	gint _tmp10_ = 0;
	gint _tmp11_ = 0;
	LevelInfo _tmp12_ = {0};
	const gchar* _tmp13_ = NULL;
	Puzzle* _tmp14_ = NULL;
	Puzzle* _tmp15_ = NULL;
	PuzzleView* _tmp16_ = NULL;
	Puzzle* _tmp17_ = NULL;
	GSimpleAction* _tmp18_ = NULL;
#line 815 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 817 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->headerbar;
#line 817 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = self->priv->current_level;
#line 817 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = KLOTSKI_level[_tmp1_];
#line 817 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = _tmp2_.name;
#line 817 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = _ (_tmp3_);
#line 817 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_header_bar_set_title (_tmp0_, _tmp4_);
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = self->priv->current_level;
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = KLOTSKI_level[_tmp5_];
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = _tmp6_.width;
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = self->priv->current_level;
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = KLOTSKI_level[_tmp8_];
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp10_ = _tmp9_.height;
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp11_ = self->priv->current_level;
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp12_ = KLOTSKI_level[_tmp11_];
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp13_ = _tmp12_.data;
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp14_ = puzzle_new (_tmp7_, _tmp10_, _tmp13_);
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzle);
#line 818 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzle = _tmp14_;
#line 819 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp15_ = self->priv->puzzle;
#line 819 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_signal_connect_object (_tmp15_, "moved", (GCallback) _klotski_puzzle_moved_cb_puzzle_moved, self, 0);
#line 820 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp16_ = self->priv->view;
#line 820 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp17_ = self->priv->puzzle;
#line 820 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	puzzle_view_set_puzzle (_tmp16_, _tmp17_);
#line 822 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_moves_label (self);
#line 823 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp18_ = self->priv->start_game;
#line 823 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp18_, FALSE);
#line 2181 "gnome-klotski.c"
}


static void klotski_puzzle_moved_cb (Klotski* self) {
#line 826 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 828 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_update_moves_label (self);
#line 2190 "gnome-klotski.c"
}


static void klotski_update_moves_label (Klotski* self) {
	GSimpleAction* _tmp0_ = NULL;
	GtkHeaderBar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	Puzzle* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	Puzzle* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
#line 831 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 833 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->start_game;
#line 833 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_simple_action_set_enabled (_tmp0_, TRUE);
#line 834 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = self->priv->headerbar;
#line 834 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _ ("Moves: %d");
#line 834 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->puzzle;
#line 834 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = _tmp3_->moves;
#line 834 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp5_ = g_strdup_printf (_tmp2_, _tmp4_);
#line 834 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp6_ = _tmp5_;
#line 834 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_header_bar_set_subtitle (_tmp1_, _tmp6_);
#line 834 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (_tmp6_);
#line 835 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = self->priv->puzzle;
#line 835 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = puzzle_game_over (_tmp7_);
#line 835 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp8_) {
#line 2232 "gnome-klotski.c"
		GtkHeaderBar* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
#line 837 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp9_ = self->priv->headerbar;
#line 837 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp10_ = _ ("Level completed.");
#line 837 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_header_bar_set_title (_tmp9_, _tmp10_);
#line 838 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		klotski_game_score (self);
#line 2243 "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;
	GtkTreeIter* _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
	gint _tmp8_ = 0;
	GtkTreeIter _tmp9_ = {0};
	GDateTime* date = NULL;
	GDateTime* _tmp10_ = NULL;
	HistoryEntry* entry = NULL;
	gint _tmp11_ = 0;
	Puzzle* _tmp12_ = NULL;
	gint _tmp13_ = 0;
	HistoryEntry* _tmp14_ = NULL;
	History* _tmp15_ = NULL;
	History* _tmp16_ = NULL;
	GError * _inner_error_ = NULL;
#line 846 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 849 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->current_level;
#line 849 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = klotski_get_level_key (self, _tmp0_);
#line 849 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	key = _tmp1_;
#line 850 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = g_key_file_new ();
#line 850 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	keyfile = _tmp2_;
#line 851 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = g_get_user_data_dir ();
#line 851 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp4_ = g_build_filename (_tmp3_, "gnome-klotski", "levels", NULL);
#line 851 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	filename = _tmp4_;
#line 2289 "gnome-klotski.c"
	{
#line 855 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, &_inner_error_);
#line 855 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2295 "gnome-klotski.c"
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
#line 853 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 853 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 853 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 2309 "gnome-klotski.c"
	}
	__finally1:
#line 853 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 853 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (filename);
#line 853 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_key_file_unref0 (keyfile);
#line 853 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (key);
#line 853 "/home/mcatanzaro/src/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 853 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 853 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 2326 "gnome-klotski.c"
	}
#line 861 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_key_file_set_boolean (keyfile, key, "solved", TRUE);
#line 2330 "gnome-klotski.c"
	{
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 865 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp5_ = g_key_file_to_data (keyfile, NULL, NULL);
#line 865 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp6_ = _tmp5_;
#line 865 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_file_set_contents (filename, _tmp6_, (gssize) -1, &_inner_error_);
#line 865 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (_tmp6_);
#line 865 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2344 "gnome-klotski.c"
			goto __catch2_g_error;
		}
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
#line 863 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 863 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 863 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 2358 "gnome-klotski.c"
	}
	__finally2:
#line 863 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 863 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (filename);
#line 863 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_key_file_unref0 (keyfile);
#line 863 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (key);
#line 863 "/home/mcatanzaro/src/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 863 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 863 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 2375 "gnome-klotski.c"
	}
#line 871 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7_ = self->priv->puzzles_items;
#line 871 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp7__length1 = self->priv->puzzles_items_length1;
#line 871 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp8_ = self->priv->current_level;
#line 871 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp9_ = _tmp7_[_tmp8_];
#line 871 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_puzzle_solved (self, &_tmp9_, TRUE);
#line 873 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp10_ = g_date_time_new_now_local ();
#line 873 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	date = _tmp10_;
#line 874 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp11_ = self->priv->current_level;
#line 874 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp12_ = self->priv->puzzle;
#line 874 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp13_ = _tmp12_->moves;
#line 874 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp14_ = history_entry_new (date, (guint) _tmp11_, (guint) _tmp13_);
#line 874 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	entry = _tmp14_;
#line 875 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp15_ = self->priv->history;
#line 875 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	history_add (_tmp15_, entry);
#line 876 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp16_ = self->priv->history;
#line 876 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	history_save (_tmp16_);
#line 878 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	klotski_show_scores (self, entry);
#line 846 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (entry);
#line 846 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_date_time_unref0 (date);
#line 846 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (filename);
#line 846 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_key_file_unref0 (keyfile);
#line 846 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (key);
#line 2421 "gnome-klotski.c"
}


static void klotski_show_scores (Klotski* self, HistoryEntry* selected_entry) {
	ScoreDialog* dialog = NULL;
	History* _tmp0_ = NULL;
	HistoryEntry* _tmp1_ = NULL;
	ScoreDialog* _tmp2_ = NULL;
	GtkApplicationWindow* _tmp3_ = NULL;
#line 881 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 883 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->history;
#line 883 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = selected_entry;
#line 883 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = score_dialog_new (_tmp0_, _tmp1_);
#line 883 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_object_ref_sink (_tmp2_);
#line 883 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	dialog = _tmp2_;
#line 884 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = self->priv->window;
#line 884 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_window_set_transient_for ((GtkWindow*) dialog, (GtkWindow*) _tmp3_);
#line 886 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_dialog_run ((GtkDialog*) dialog);
#line 887 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	gtk_widget_destroy ((GtkWidget*) dialog);
#line 881 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (dialog);
#line 2453 "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/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, '\0');
#line 997 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp0_ = index;
#line 997 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp1_ = ((gchar*) self)[_tmp0_];
#line 997 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	result = _tmp1_;
#line 997 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	return result;
#line 2471 "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 890 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 893 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_result_ = (guint32) 0xFFFFFFFFU;
#line 894 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = level_number;
#line 894 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = KLOTSKI_level[_tmp0_];
#line 894 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = _tmp1_.data;
#line 894 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 894 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	data = _tmp3_;
#line 2499 "gnome-klotski.c"
	{
		gint i = 0;
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		i = 0;
#line 2504 "gnome-klotski.c"
		{
			gboolean _tmp4_ = FALSE;
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp4_ = TRUE;
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			while (TRUE) {
#line 2511 "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 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!_tmp4_) {
#line 2521 "gnome-klotski.c"
					gint _tmp5_ = 0;
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp5_ = i;
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					i = _tmp5_ + 1;
#line 2527 "gnome-klotski.c"
				}
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp4_ = FALSE;
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp6_ = data;
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp7_ = i;
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp8_ = string_get (_tmp6_, (glong) _tmp7_);
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!(_tmp8_ != '\0')) {
#line 895 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					break;
#line 2541 "gnome-klotski.c"
				}
#line 897 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp9_ = data;
#line 897 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp10_ = i;
#line 897 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp11_ = string_get (_tmp9_, (glong) _tmp10_);
#line 897 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				octet = _tmp11_;
#line 2551 "gnome-klotski.c"
				{
					gint j = 0;
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					j = 0;
#line 2556 "gnome-klotski.c"
					{
						gboolean _tmp12_ = FALSE;
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						_tmp12_ = TRUE;
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
						while (TRUE) {
#line 2563 "gnome-klotski.c"
							gint _tmp14_ = 0;
							gchar _tmp15_ = '\0';
							guint32 _tmp16_ = 0U;
							guint32 _tmp19_ = 0U;
							gchar _tmp20_ = '\0';
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							if (!_tmp12_) {
#line 2571 "gnome-klotski.c"
								gint _tmp13_ = 0;
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_tmp13_ = j;
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								j = _tmp13_ + 1;
#line 2577 "gnome-klotski.c"
							}
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp12_ = FALSE;
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp14_ = j;
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							if (!(_tmp14_ < 8)) {
#line 898 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								break;
#line 2587 "gnome-klotski.c"
							}
#line 900 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp15_ = octet;
#line 900 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp16_ = _result_;
#line 900 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							if (((_tmp15_ >> 7) ^ (_tmp16_ >> 31)) != 0) {
#line 2595 "gnome-klotski.c"
								guint32 _tmp17_ = 0U;
#line 901 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_tmp17_ = _result_;
#line 901 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_result_ = (_tmp17_ << 1) ^ 0x04c11db7;
#line 2601 "gnome-klotski.c"
							} else {
								guint32 _tmp18_ = 0U;
#line 903 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_tmp18_ = _result_;
#line 903 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
								_result_ = _tmp18_ << 1;
#line 2608 "gnome-klotski.c"
							}
#line 904 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp19_ = _result_;
#line 904 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_result_ = _tmp19_ & 0xFFFFFFFFLL;
#line 905 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							_tmp20_ = octet;
#line 905 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
							octet = (gchar) (_tmp20_ << 1);
#line 2618 "gnome-klotski.c"
						}
					}
				}
			}
		}
	}
#line 909 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp21_ = _result_;
#line 909 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp22_ = g_strdup_printf ("%08X", (guint) (~_tmp21_));
#line 909 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	result = _tmp22_;
#line 909 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (data);
#line 909 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	return result;
#line 2635 "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 912 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 914 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = g_key_file_new ();
#line 914 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	keyfile = _tmp0_;
#line 915 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = g_get_user_data_dir ();
#line 915 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = g_build_filename (_tmp1_, "gnome-klotski", "levels", NULL);
#line 915 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	filename = _tmp2_;
#line 2658 "gnome-klotski.c"
	{
#line 918 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, &_inner_error_);
#line 918 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2664 "gnome-klotski.c"
			goto __catch3_g_error;
		}
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
#line 916 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		e = _inner_error_;
#line 916 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_inner_error_ = NULL;
#line 916 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_error_free0 (e);
#line 2678 "gnome-klotski.c"
	}
	__finally3:
#line 916 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 916 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_free0 (filename);
#line 916 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_g_key_file_unref0 (keyfile);
#line 916 "/home/mcatanzaro/src/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 916 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		g_clear_error (&_inner_error_);
#line 916 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		return;
#line 2693 "gnome-klotski.c"
	}
	{
		gint i = 0;
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		i = 0;
#line 2699 "gnome-klotski.c"
		{
			gboolean _tmp3_ = FALSE;
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp3_ = TRUE;
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			while (TRUE) {
#line 2706 "gnome-klotski.c"
				gint _tmp5_ = 0;
				gchar* key = NULL;
				gint _tmp6_ = 0;
				gchar* _tmp7_ = NULL;
				gboolean value = FALSE;
				GtkTreeIter* _tmp11_ = NULL;
				gint _tmp11__length1 = 0;
				gint _tmp12_ = 0;
				GtkTreeIter _tmp13_ = {0};
				gboolean _tmp14_ = FALSE;
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!_tmp3_) {
#line 2719 "gnome-klotski.c"
					gint _tmp4_ = 0;
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp4_ = i;
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					i = _tmp4_ + 1;
#line 2725 "gnome-klotski.c"
				}
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp3_ = FALSE;
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp5_ = i;
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (!(_tmp5_ < G_N_ELEMENTS (KLOTSKI_level))) {
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					break;
#line 2735 "gnome-klotski.c"
				}
#line 926 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp6_ = i;
#line 926 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp7_ = klotski_get_level_key (self, _tmp6_);
#line 926 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				key = _tmp7_;
#line 927 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				value = FALSE;
#line 2745 "gnome-klotski.c"
				{
					gboolean _tmp8_ = FALSE;
					const gchar* _tmp9_ = NULL;
					gboolean _tmp10_ = FALSE;
#line 930 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp9_ = key;
#line 930 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp10_ = g_key_file_get_boolean (keyfile, _tmp9_, "solved", &_inner_error_);
#line 930 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_tmp8_ = _tmp10_;
#line 930 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2758 "gnome-klotski.c"
						goto __catch4_g_error;
					}
#line 930 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					value = _tmp8_;
#line 2763 "gnome-klotski.c"
				}
				goto __finally4;
				__catch4_g_error:
				{
					GError* e = NULL;
#line 928 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					e = _inner_error_;
#line 928 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_inner_error_ = NULL;
#line 928 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_g_error_free0 (e);
#line 2775 "gnome-klotski.c"
				}
				__finally4:
#line 928 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 928 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_g_free0 (key);
#line 928 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_g_free0 (filename);
#line 928 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					_g_key_file_unref0 (keyfile);
#line 928 "/home/mcatanzaro/src/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 928 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					g_clear_error (&_inner_error_);
#line 928 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
					return;
#line 2792 "gnome-klotski.c"
				}
#line 936 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp11_ = self->priv->puzzles_items;
#line 936 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp11__length1 = self->priv->puzzles_items_length1;
#line 936 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp12_ = i;
#line 936 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp13_ = _tmp11_[_tmp12_];
#line 936 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_tmp14_ = value;
#line 936 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				klotski_puzzle_solved (self, &_tmp13_, _tmp14_);
#line 924 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
				_g_free0 (key);
#line 2808 "gnome-klotski.c"
			}
		}
	}
#line 912 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_free0 (filename);
#line 912 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_key_file_unref0 (keyfile);
#line 2816 "gnome-klotski.c"
}


static void klotski_puzzle_solved (Klotski* self, GtkTreeIter* iter, gboolean solved) {
	GtkListStore* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
#line 940 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (self != NULL);
#line 940 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	g_return_if_fail (iter != NULL);
#line 942 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp0_ = self->priv->liststore_huarong;
#line 942 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp1_ = *iter;
#line 942 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_tmp2_ = gtk_list_store_iter_is_valid (_tmp0_, &_tmp1_);
#line 942 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	if (_tmp2_) {
#line 2836 "gnome-klotski.c"
		GtkListStore* _tmp3_ = NULL;
		GtkTreeIter _tmp4_ = {0};
		gboolean _tmp5_ = FALSE;
#line 943 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp3_ = self->priv->liststore_huarong;
#line 943 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp4_ = *iter;
#line 943 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp5_ = solved;
#line 943 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		gtk_list_store_set (_tmp3_, &_tmp4_, 1, _tmp5_, -1);
#line 2848 "gnome-klotski.c"
	} else {
		GtkListStore* _tmp6_ = NULL;
		GtkTreeIter _tmp7_ = {0};
		gboolean _tmp8_ = FALSE;
#line 944 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp6_ = self->priv->liststore_challenge;
#line 944 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp7_ = *iter;
#line 944 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		_tmp8_ = gtk_list_store_iter_is_valid (_tmp6_, &_tmp7_);
#line 944 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
		if (_tmp8_) {
#line 2861 "gnome-klotski.c"
			GtkListStore* _tmp9_ = NULL;
			GtkTreeIter _tmp10_ = {0};
			gboolean _tmp11_ = FALSE;
#line 945 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp9_ = self->priv->liststore_challenge;
#line 945 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp10_ = *iter;
#line 945 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp11_ = solved;
#line 945 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			gtk_list_store_set (_tmp9_, &_tmp10_, 1, _tmp11_, -1);
#line 2873 "gnome-klotski.c"
		} else {
			GtkListStore* _tmp12_ = NULL;
			GtkTreeIter _tmp13_ = {0};
			gboolean _tmp14_ = FALSE;
#line 947 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp12_ = self->priv->liststore_skill;
#line 947 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp13_ = *iter;
#line 947 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			_tmp14_ = solved;
#line 947 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
			gtk_list_store_set (_tmp12_, &_tmp13_, 1, _tmp14_, -1);
#line 2886 "gnome-klotski.c"
		}
	}
}


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


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


static void klotski_finalize (GObject* obj) {
	Klotski * self;
#line 23 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KLOTSKI, Klotski);
#line 26 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->settings);
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->window);
#line 36 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->headerbar);
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->stack_packs);
#line 38 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->stack_puzzles);
#line 39 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzles_popover);
#line 40 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->view);
#line 43 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->prev_pack);
#line 44 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->next_pack);
#line 45 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->prev_puzzle);
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->next_puzzle);
#line 47 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->start_game);
#line 50 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->puzzle);
#line 55 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->history);
#line 58 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->liststore_huarong);
#line 59 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->liststore_challenge);
#line 60 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	_g_object_unref0 (self->priv->liststore_skill);
#line 61 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	self->priv->puzzles_items = (g_free (self->priv->puzzles_items), NULL);
#line 23 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/gnome-klotski.vala"
	G_OBJECT_CLASS (klotski_parent_class)->finalize (obj);
#line 2964 "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;
}


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


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



