/* score-dialog.c generated by valac 0.30.0.15-6463e, the Vala compiler
 * generated from score-dialog.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 <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <pango/pango.h>
#include <float.h>
#include <math.h>


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

typedef struct _ScoreDialog ScoreDialog;
typedef struct _ScoreDialogClass ScoreDialogClass;
typedef struct _ScoreDialogPrivate ScoreDialogPrivate;

#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 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_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _HistoryPrivate HistoryPrivate;
typedef struct _HistoryEntryPrivate HistoryEntryPrivate;
#define _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))

#define TYPE_LEVEL_INFO (level_info_get_type ())
typedef struct _LevelInfo LevelInfo;

struct _ScoreDialog {
	GtkDialog parent_instance;
	ScoreDialogPrivate * priv;
};

struct _ScoreDialogClass {
	GtkDialogClass parent_class;
};

struct _ScoreDialogPrivate {
	History* history;
	HistoryEntry* selected_entry;
	GtkListStore* levels_liststore;
	GtkListStore* scores_liststore;
	GtkComboBox* level_combo;
	GtkTreeView* scores_tree;
};

struct _History {
	GObject parent_instance;
	HistoryPrivate * priv;
	gchar* filename;
	GList* entries;
};

struct _HistoryClass {
	GObjectClass parent_class;
};

struct _HistoryEntry {
	GObject parent_instance;
	HistoryEntryPrivate * priv;
	GDateTime* date;
	guint level;
	guint moves;
};

struct _HistoryEntryClass {
	GObjectClass parent_class;
};

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


static gpointer score_dialog_parent_class = NULL;

GType score_dialog_get_type (void) G_GNUC_CONST;
GType history_get_type (void) G_GNUC_CONST;
GType history_entry_get_type (void) G_GNUC_CONST;
#define SCORE_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SCORE_DIALOG, ScoreDialogPrivate))
enum  {
	SCORE_DIALOG_DUMMY_PROPERTY
};
ScoreDialog* score_dialog_new (History* history, HistoryEntry* selected_entry);
ScoreDialog* score_dialog_construct (GType object_type, History* history, HistoryEntry* selected_entry);
static void score_dialog_entry_added_cb (ScoreDialog* self, HistoryEntry* entry);
static void _score_dialog_entry_added_cb_history_entry_added (History* _sender, HistoryEntry* entry, gpointer self);
static void score_dialog_level_changed_cb (ScoreDialog* self, GtkComboBox* combo);
static void _score_dialog_level_changed_cb_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
static gint score_dialog_compare_entries (HistoryEntry* a, HistoryEntry* b);
static gint _score_dialog_compare_entries_gcompare_func (gconstpointer a, gconstpointer b);
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);
static void score_dialog_finalize (GObject* obj);

extern const LevelInfo KLOTSKI_level[28];

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


static void _score_dialog_entry_added_cb_history_entry_added (History* _sender, HistoryEntry* entry, gpointer self) {
#line 36 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	score_dialog_entry_added_cb ((ScoreDialog*) self, entry);
#line 152 "score-dialog.c"
}


static void _score_dialog_level_changed_cb_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
#line 39 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	score_dialog_level_changed_cb ((ScoreDialog*) self, _sender);
#line 159 "score-dialog.c"
}


ScoreDialog* score_dialog_construct (GType object_type, History* history, HistoryEntry* selected_entry) {
	ScoreDialog * self = NULL;
	gboolean use_header = FALSE;
	GtkSettings* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gint _tmp3_ = 0;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	History* _tmp7_ = NULL;
	History* _tmp8_ = NULL;
	History* _tmp9_ = NULL;
	HistoryEntry* _tmp10_ = NULL;
	HistoryEntry* _tmp11_ = NULL;
	GtkComboBox* _tmp12_ = NULL;
	History* _tmp13_ = NULL;
	GList* _tmp14_ = NULL;
#line 28 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_return_val_if_fail (history != NULL, NULL);
#line 30 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp0_ = gtk_settings_get_default ();
#line 30 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_object_get (_tmp0_, "gtk-dialogs-use-header", &_tmp1_, NULL);
#line 30 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp2_ = _tmp1_;
#line 30 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	use_header = _tmp2_;
#line 31 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp4_ = use_header;
#line 31 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	if (_tmp4_) {
#line 31 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp3_ = 1;
#line 196 "score-dialog.c"
	} else {
#line 31 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp3_ = 0;
#line 200 "score-dialog.c"
	}
#line 31 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	self = (ScoreDialog*) g_object_new (object_type, "use-header-bar", _tmp3_, NULL);
#line 32 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp5_ = use_header;
#line 32 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	if (!_tmp5_) {
#line 208 "score-dialog.c"
		const gchar* _tmp6_ = NULL;
#line 33 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp6_ = _ ("_OK");
#line 33 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		gtk_dialog_add_button ((GtkDialog*) self, _tmp6_, (gint) GTK_RESPONSE_DELETE_EVENT);
#line 214 "score-dialog.c"
	}
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp7_ = history;
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_g_object_unref0 (self->priv->history);
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	self->priv->history = _tmp8_;
#line 36 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp9_ = history;
#line 36 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_signal_connect_object (_tmp9_, "entry-added", (GCallback) _score_dialog_entry_added_cb_history_entry_added, self, 0);
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp10_ = selected_entry;
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp11_ = _g_object_ref0 (_tmp10_);
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_g_object_unref0 (self->priv->selected_entry);
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	self->priv->selected_entry = _tmp11_;
#line 39 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp12_ = self->priv->level_combo;
#line 39 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_signal_connect_object (_tmp12_, "changed", (GCallback) _score_dialog_level_changed_cb_gtk_combo_box_changed, self, 0);
#line 41 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp13_ = history;
#line 41 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp14_ = _tmp13_->entries;
#line 244 "score-dialog.c"
	{
		GList* entry_collection = NULL;
		GList* entry_it = NULL;
#line 41 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		entry_collection = _tmp14_;
#line 41 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		for (entry_it = entry_collection; entry_it != NULL; entry_it = entry_it->next) {
#line 252 "score-dialog.c"
			HistoryEntry* _tmp15_ = NULL;
			HistoryEntry* entry = NULL;
#line 41 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp15_ = _g_object_ref0 ((HistoryEntry*) entry_it->data);
#line 41 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			entry = _tmp15_;
#line 259 "score-dialog.c"
			{
				HistoryEntry* _tmp16_ = NULL;
#line 42 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp16_ = entry;
#line 42 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				score_dialog_entry_added_cb (self, _tmp16_);
#line 41 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_g_object_unref0 (entry);
#line 268 "score-dialog.c"
			}
		}
	}
#line 28 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	return self;
#line 274 "score-dialog.c"
}


ScoreDialog* score_dialog_new (History* history, HistoryEntry* selected_entry) {
#line 28 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	return score_dialog_construct (TYPE_SCORE_DIALOG, history, selected_entry);
#line 281 "score-dialog.c"
}


static gint _score_dialog_compare_entries_gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = score_dialog_compare_entries ((HistoryEntry*) a, (HistoryEntry*) b);
#line 68 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	return result;
#line 290 "score-dialog.c"
}


static void score_dialog_level_changed_cb (ScoreDialog* self, GtkComboBox* combo) {
	GtkTreeIter iter = {0};
	GtkComboBox* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
	gint level = 0;
	GtkListStore* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
	GtkListStore* _tmp5_ = NULL;
	GList* entries = NULL;
	History* _tmp6_ = NULL;
	GList* _tmp7_ = NULL;
	GList* _tmp8_ = NULL;
	GList* _tmp9_ = NULL;
#line 49 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_return_if_fail (self != NULL);
#line 49 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_return_if_fail (combo != NULL);
#line 52 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp0_ = combo;
#line 52 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_);
#line 52 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	iter = _tmp1_;
#line 52 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	if (!_tmp2_) {
#line 53 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		return;
#line 322 "score-dialog.c"
	}
#line 56 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp3_ = self->priv->levels_liststore;
#line 56 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp4_ = iter;
#line 56 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 1, &level, -1);
#line 65 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp5_ = self->priv->scores_liststore;
#line 65 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	gtk_list_store_clear (_tmp5_);
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp6_ = self->priv->history;
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp7_ = _tmp6_->entries;
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp8_ = g_list_copy (_tmp7_);
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	entries = _tmp8_;
#line 68 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	entries = g_list_sort (entries, _score_dialog_compare_entries_gcompare_func);
#line 70 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp9_ = entries;
#line 346 "score-dialog.c"
	{
		GList* entry_collection = NULL;
		GList* entry_it = NULL;
#line 70 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		entry_collection = _tmp9_;
#line 70 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		for (entry_it = entry_collection; entry_it != NULL; entry_it = entry_it->next) {
#line 354 "score-dialog.c"
			HistoryEntry* entry = NULL;
#line 70 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			entry = (HistoryEntry*) entry_it->data;
#line 358 "score-dialog.c"
			{
				HistoryEntry* _tmp10_ = NULL;
				guint _tmp11_ = 0U;
				gint _tmp12_ = 0;
				gchar* date_label = NULL;
				HistoryEntry* _tmp13_ = NULL;
				GDateTime* _tmp14_ = NULL;
				gchar* _tmp15_ = NULL;
				gchar* moves_label = NULL;
				HistoryEntry* _tmp16_ = NULL;
				guint _tmp17_ = 0U;
				gchar* _tmp18_ = NULL;
				GtkListStore* _tmp19_ = NULL;
				GtkTreeIter _tmp20_ = {0};
				HistoryEntry* _tmp21_ = NULL;
				HistoryEntry* _tmp22_ = NULL;
#line 72 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp10_ = entry;
#line 72 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp11_ = _tmp10_->level;
#line 72 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp12_ = level;
#line 72 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				if (_tmp11_ != ((guint) _tmp12_)) {
#line 73 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					continue;
#line 385 "score-dialog.c"
				}
#line 75 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp13_ = entry;
#line 75 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp14_ = _tmp13_->date;
#line 75 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp15_ = g_date_time_format (_tmp14_, "%d/%m/%Y");
#line 75 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				date_label = _tmp15_;
#line 76 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp16_ = entry;
#line 76 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp17_ = _tmp16_->moves;
#line 76 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp18_ = g_strdup_printf ("%u", _tmp17_);
#line 76 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				moves_label = _tmp18_;
#line 78 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp19_ = self->priv->scores_liststore;
#line 78 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				gtk_list_store_append (_tmp19_, &_tmp20_);
#line 78 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				iter = _tmp20_;
#line 80 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp21_ = entry;
#line 80 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp22_ = self->priv->selected_entry;
#line 80 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				if (_tmp21_ != _tmp22_) {
#line 415 "score-dialog.c"
					GtkListStore* _tmp23_ = NULL;
					GtkTreeIter _tmp24_ = {0};
					const gchar* _tmp25_ = NULL;
					const gchar* _tmp26_ = NULL;
#line 82 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp23_ = self->priv->scores_liststore;
#line 82 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp24_ = iter;
#line 82 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp25_ = date_label;
#line 82 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp26_ = moves_label;
#line 82 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					gtk_list_store_set (_tmp23_, &_tmp24_, 0, _tmp25_, 1, _tmp26_, 2, PANGO_WEIGHT_NORMAL, -1);
#line 430 "score-dialog.c"
				} else {
					GtkListStore* _tmp27_ = NULL;
					GtkTreeIter _tmp28_ = {0};
					const gchar* _tmp29_ = NULL;
					const gchar* _tmp30_ = NULL;
					GtkTreeIter piter = {0};
					GtkTreeIter _tmp31_ = {0};
					GtkListStore* _tmp32_ = NULL;
					gboolean _tmp33_ = FALSE;
					GtkTreeView* _tmp39_ = NULL;
					GtkListStore* _tmp40_ = NULL;
					GtkTreeIter _tmp41_ = {0};
					GtkTreePath* _tmp42_ = NULL;
					GtkTreePath* _tmp43_ = NULL;
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp27_ = self->priv->scores_liststore;
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp28_ = iter;
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp29_ = date_label;
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp30_ = moves_label;
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					gtk_list_store_set (_tmp27_, &_tmp28_, 0, _tmp29_, 1, _tmp30_, 2, PANGO_WEIGHT_BOLD, -1);
#line 93 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp31_ = iter;
#line 93 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					piter = _tmp31_;
#line 94 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp32_ = self->priv->scores_liststore;
#line 94 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp33_ = gtk_tree_model_iter_previous ((GtkTreeModel*) _tmp32_, &piter);
#line 94 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					if (_tmp33_) {
#line 465 "score-dialog.c"
						GtkTreeIter ppiter = {0};
						GtkTreeIter _tmp34_ = {0};
						GtkListStore* _tmp35_ = NULL;
						gboolean _tmp36_ = FALSE;
#line 96 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
						_tmp34_ = piter;
#line 96 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
						ppiter = _tmp34_;
#line 97 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
						_tmp35_ = self->priv->scores_liststore;
#line 97 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
						_tmp36_ = gtk_tree_model_iter_previous ((GtkTreeModel*) _tmp35_, &ppiter);
#line 97 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
						if (_tmp36_) {
#line 480 "score-dialog.c"
							GtkTreeIter _tmp37_ = {0};
#line 98 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
							_tmp37_ = ppiter;
#line 98 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
							piter = _tmp37_;
#line 486 "score-dialog.c"
						}
					} else {
						GtkTreeIter _tmp38_ = {0};
#line 101 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
						_tmp38_ = iter;
#line 101 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
						piter = _tmp38_;
#line 494 "score-dialog.c"
					}
#line 102 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp39_ = self->priv->scores_tree;
#line 102 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp40_ = self->priv->scores_liststore;
#line 102 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp41_ = piter;
#line 102 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp42_ = gtk_tree_model_get_path ((GtkTreeModel*) _tmp40_, &_tmp41_);
#line 102 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp43_ = _tmp42_;
#line 102 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					gtk_tree_view_scroll_to_cell (_tmp39_, _tmp43_, NULL, FALSE, (gfloat) 0, (gfloat) 0);
#line 102 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_gtk_tree_path_free0 (_tmp43_);
#line 510 "score-dialog.c"
				}
#line 70 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_g_free0 (moves_label);
#line 70 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_g_free0 (date_label);
#line 516 "score-dialog.c"
			}
		}
	}
#line 49 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_g_list_free0 (entries);
#line 522 "score-dialog.c"
}


static gint score_dialog_compare_entries (HistoryEntry* a, HistoryEntry* b) {
	gint result = 0;
	HistoryEntry* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	HistoryEntry* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	HistoryEntry* _tmp8_ = NULL;
	guint _tmp9_ = 0U;
	HistoryEntry* _tmp10_ = NULL;
	guint _tmp11_ = 0U;
	HistoryEntry* _tmp16_ = NULL;
	GDateTime* _tmp17_ = NULL;
	HistoryEntry* _tmp18_ = NULL;
	GDateTime* _tmp19_ = NULL;
	gint _tmp20_ = 0;
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_return_val_if_fail (a != NULL, 0);
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_return_val_if_fail (b != NULL, 0);
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp0_ = a;
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp1_ = _tmp0_->level;
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp2_ = b;
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp3_ = _tmp2_->level;
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	if (_tmp1_ != _tmp3_) {
#line 555 "score-dialog.c"
		HistoryEntry* _tmp4_ = NULL;
		guint _tmp5_ = 0U;
		HistoryEntry* _tmp6_ = NULL;
		guint _tmp7_ = 0U;
#line 110 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp4_ = a;
#line 110 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp5_ = _tmp4_->level;
#line 110 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp6_ = b;
#line 110 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp7_ = _tmp6_->level;
#line 110 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		result = ((gint) _tmp5_) - ((gint) _tmp7_);
#line 110 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		return result;
#line 572 "score-dialog.c"
	}
#line 111 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp8_ = a;
#line 111 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp9_ = _tmp8_->moves;
#line 111 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp10_ = b;
#line 111 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp11_ = _tmp10_->moves;
#line 111 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	if (_tmp9_ != _tmp11_) {
#line 584 "score-dialog.c"
		HistoryEntry* _tmp12_ = NULL;
		guint _tmp13_ = 0U;
		HistoryEntry* _tmp14_ = NULL;
		guint _tmp15_ = 0U;
#line 112 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp12_ = a;
#line 112 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp13_ = _tmp12_->moves;
#line 112 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp14_ = b;
#line 112 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp15_ = _tmp14_->moves;
#line 112 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		result = ((gint) _tmp13_) - ((gint) _tmp15_);
#line 112 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		return result;
#line 601 "score-dialog.c"
	}
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp16_ = a;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp17_ = _tmp16_->date;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp18_ = b;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp19_ = _tmp18_->date;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp20_ = g_date_time_compare (_tmp17_, _tmp19_);
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	result = _tmp20_;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	return result;
#line 617 "score-dialog.c"
}


static void score_dialog_entry_added_cb (ScoreDialog* self, HistoryEntry* entry) {
	GtkTreeIter iter = {0};
	gboolean have_level_entry = FALSE;
	GtkListStore* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
	gboolean _tmp11_ = FALSE;
#line 120 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_return_if_fail (self != NULL);
#line 120 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_return_if_fail (entry != NULL);
#line 124 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	have_level_entry = FALSE;
#line 125 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp0_ = self->priv->levels_liststore;
#line 125 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp2_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp0_, &_tmp1_);
#line 125 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	iter = _tmp1_;
#line 125 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	if (_tmp2_) {
#line 642 "score-dialog.c"
		{
			gboolean _tmp3_ = FALSE;
#line 127 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp3_ = TRUE;
#line 127 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			while (TRUE) {
#line 649 "score-dialog.c"
				guint level = 0U;
				GtkListStore* _tmp6_ = NULL;
				GtkTreeIter _tmp7_ = {0};
				guint _tmp8_ = 0U;
				HistoryEntry* _tmp9_ = NULL;
				guint _tmp10_ = 0U;
#line 127 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				if (!_tmp3_) {
#line 658 "score-dialog.c"
					GtkListStore* _tmp4_ = NULL;
					gboolean _tmp5_ = FALSE;
#line 136 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp4_ = self->priv->levels_liststore;
#line 136 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					_tmp5_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp4_, &iter);
#line 136 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					if (!_tmp5_) {
#line 136 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
						break;
#line 669 "score-dialog.c"
					}
				}
#line 127 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp3_ = FALSE;
#line 130 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp6_ = self->priv->levels_liststore;
#line 130 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp7_ = iter;
#line 130 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				gtk_tree_model_get ((GtkTreeModel*) _tmp6_, &_tmp7_, 1, &level, -1);
#line 131 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp8_ = level;
#line 131 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp9_ = entry;
#line 131 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				_tmp10_ = _tmp9_->level;
#line 131 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
				if (_tmp8_ == _tmp10_) {
#line 133 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					have_level_entry = TRUE;
#line 134 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
					break;
#line 692 "score-dialog.c"
				}
			}
		}
	}
#line 139 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_tmp11_ = have_level_entry;
#line 139 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	if (!_tmp11_) {
#line 701 "score-dialog.c"
		gchar* label = NULL;
		HistoryEntry* _tmp12_ = NULL;
		guint _tmp13_ = 0U;
		LevelInfo _tmp14_ = {0};
		const gchar* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		GtkListStore* _tmp18_ = NULL;
		GtkTreeIter _tmp19_ = {0};
		GtkListStore* _tmp20_ = NULL;
		GtkTreeIter _tmp21_ = {0};
		const gchar* _tmp22_ = NULL;
		HistoryEntry* _tmp23_ = NULL;
		guint _tmp24_ = 0U;
		GtkComboBox* _tmp25_ = NULL;
		gint _tmp26_ = 0;
		gboolean _tmp29_ = FALSE;
		HistoryEntry* _tmp30_ = NULL;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp12_ = entry;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp13_ = _tmp12_->level;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp14_ = KLOTSKI_level[_tmp13_];
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp15_ = _tmp14_.name;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp16_ = _ (_tmp15_);
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp17_ = g_strdup (_tmp16_);
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		label = _tmp17_;
#line 142 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp18_ = self->priv->levels_liststore;
#line 142 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		gtk_list_store_append (_tmp18_, &_tmp19_);
#line 142 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		iter = _tmp19_;
#line 143 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp20_ = self->priv->levels_liststore;
#line 143 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp21_ = iter;
#line 143 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp22_ = label;
#line 143 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp23_ = entry;
#line 143 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp24_ = _tmp23_->level;
#line 143 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		gtk_list_store_set (_tmp20_, &_tmp21_, 0, _tmp22_, 1, _tmp24_, -1);
#line 148 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp25_ = self->priv->level_combo;
#line 148 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp26_ = gtk_combo_box_get_active (_tmp25_);
#line 148 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		if (_tmp26_ == -1) {
#line 758 "score-dialog.c"
			GtkComboBox* _tmp27_ = NULL;
			GtkTreeIter _tmp28_ = {0};
#line 149 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp27_ = self->priv->level_combo;
#line 149 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp28_ = iter;
#line 149 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			gtk_combo_box_set_active_iter (_tmp27_, &_tmp28_);
#line 767 "score-dialog.c"
		}
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_tmp30_ = self->priv->selected_entry;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		if (_tmp30_ != NULL) {
#line 773 "score-dialog.c"
			HistoryEntry* _tmp31_ = NULL;
			guint _tmp32_ = 0U;
			HistoryEntry* _tmp33_ = NULL;
			guint _tmp34_ = 0U;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp31_ = entry;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp32_ = _tmp31_->level;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp33_ = self->priv->selected_entry;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp34_ = _tmp33_->level;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp29_ = _tmp32_ == _tmp34_;
#line 788 "score-dialog.c"
		} else {
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp29_ = FALSE;
#line 792 "score-dialog.c"
		}
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		if (_tmp29_) {
#line 796 "score-dialog.c"
			GtkComboBox* _tmp35_ = NULL;
			GtkTreeIter _tmp36_ = {0};
#line 153 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp35_ = self->priv->level_combo;
#line 153 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			_tmp36_ = iter;
#line 153 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
			gtk_combo_box_set_active_iter (_tmp35_, &_tmp36_);
#line 805 "score-dialog.c"
		}
#line 139 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
		_g_free0 (label);
#line 809 "score-dialog.c"
	}
}


static void score_dialog_class_init (ScoreDialogClass * klass) {
	gint ScoreDialog_private_offset;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	score_dialog_parent_class = g_type_class_peek_parent (klass);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	g_type_class_add_private (klass, sizeof (ScoreDialogPrivate));
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	G_OBJECT_CLASS (klass)->finalize = score_dialog_finalize;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	ScoreDialog_private_offset = g_type_class_get_instance_private_offset (klass);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/klotski/ui/scores.ui");
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "levels_liststore", FALSE, ScoreDialog_private_offset + G_STRUCT_OFFSET (ScoreDialogPrivate, levels_liststore));
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scores_liststore", FALSE, ScoreDialog_private_offset + G_STRUCT_OFFSET (ScoreDialogPrivate, scores_liststore));
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "level_combo", FALSE, ScoreDialog_private_offset + G_STRUCT_OFFSET (ScoreDialogPrivate, level_combo));
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scores_tree", FALSE, ScoreDialog_private_offset + G_STRUCT_OFFSET (ScoreDialogPrivate, scores_tree));
#line 834 "score-dialog.c"
}


static void score_dialog_instance_init (ScoreDialog * self) {
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	self->priv = SCORE_DIALOG_GET_PRIVATE (self);
#line 17 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	self->priv->selected_entry = NULL;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 845 "score-dialog.c"
}


static void score_dialog_finalize (GObject* obj) {
	ScoreDialog * self;
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCORE_DIALOG, ScoreDialog);
#line 16 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_g_object_unref0 (self->priv->history);
#line 17 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_g_object_unref0 (self->priv->selected_entry);
#line 20 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_g_object_unref0 (self->priv->levels_liststore);
#line 22 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_g_object_unref0 (self->priv->scores_liststore);
#line 24 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_g_object_unref0 (self->priv->level_combo);
#line 26 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	_g_object_unref0 (self->priv->scores_tree);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/score-dialog.vala"
	G_OBJECT_CLASS (score_dialog_parent_class)->finalize (obj);
#line 867 "score-dialog.c"
}


GType score_dialog_get_type (void) {
	static volatile gsize score_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&score_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ScoreDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) score_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScoreDialog), 0, (GInstanceInitFunc) score_dialog_instance_init, NULL };
		GType score_dialog_type_id;
		score_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "ScoreDialog", &g_define_type_info, 0);
		g_once_init_leave (&score_dialog_type_id__volatile, score_dialog_type_id);
	}
	return score_dialog_type_id__volatile;
}



