/* gnomine.c generated by valac 0.17.7.1-fedb1, the Vala compiler
 * generated from gnomine.vala, do not modify */


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


#define TYPE_GNO_MINE (gno_mine_get_type ())
#define GNO_MINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GNO_MINE, GnoMine))
#define GNO_MINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GNO_MINE, GnoMineClass))
#define IS_GNO_MINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GNO_MINE))
#define IS_GNO_MINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GNO_MINE))
#define GNO_MINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GNO_MINE, GnoMineClass))

typedef struct _GnoMine GnoMine;
typedef struct _GnoMineClass GnoMineClass;
typedef struct _GnoMinePrivate GnoMinePrivate;

#define TYPE_MINEFIELD (minefield_get_type ())
#define MINEFIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MINEFIELD, Minefield))
#define MINEFIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MINEFIELD, MinefieldClass))
#define IS_MINEFIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MINEFIELD))
#define IS_MINEFIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MINEFIELD))
#define MINEFIELD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MINEFIELD, MinefieldClass))

typedef struct _Minefield Minefield;
typedef struct _MinefieldClass MinefieldClass;

#define TYPE_MINEFIELD_VIEW (minefield_view_get_type ())
#define MINEFIELD_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MINEFIELD_VIEW, MinefieldView))
#define MINEFIELD_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MINEFIELD_VIEW, MinefieldViewClass))
#define IS_MINEFIELD_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MINEFIELD_VIEW))
#define IS_MINEFIELD_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MINEFIELD_VIEW))
#define MINEFIELD_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MINEFIELD_VIEW, MinefieldViewClass))

typedef struct _MinefieldView MinefieldView;
typedef struct _MinefieldViewClass MinefieldViewClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _minefield_unref0(var) ((var == NULL) ? NULL : (var = (minefield_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _MinefieldPrivate MinefieldPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))

struct _GnoMine {
	GtkApplication parent_instance;
	GnoMinePrivate * priv;
};

struct _GnoMineClass {
	GtkApplicationClass parent_class;
};

struct _GnoMinePrivate {
	GSettings* settings;
	GtkToolButton* face_button;
	GtkImage* win_face_image;
	GtkImage* sad_face_image;
	GtkImage* smile_face_image;
	GtkImage* cool_face_image;
	GtkImage* worried_face_image;
	GtkToolButton* fullscreen_button;
	GtkToolButton* pause_button;
	GtkWindow* window;
	gint window_width;
	gint window_height;
	gboolean is_fullscreen;
	gboolean is_maximized;
	Minefield* minefield;
	MinefieldView* minefield_view;
	GtkDialog* pref_dialog;
	GtkLabel* flag_label;
	GtkSpinButton* n_mines_spin;
	GtkLabel* clock_label;
	GSimpleAction* new_game_action;
	GSimpleAction* repeat_size_action;
	GSimpleAction* pause_action;
	GSimpleAction* hint_action;
	GtkAspectFrame* new_game_screen;
	GtkAspectFrame* custom_game_screen;
	gboolean is_new_game_screen;
	GamesScores* highscores;
};

struct _Minefield {
	GTypeInstance parent_instance;
	volatile int ref_count;
	MinefieldPrivate * priv;
	guint width;
	guint height;
	guint n_mines;
	gboolean exploded;
};

struct _MinefieldClass {
	GTypeClass parent_class;
	void (*finalize) (Minefield *self);
};


static gpointer gno_mine_parent_class = NULL;

GType gno_mine_get_type (void) G_GNUC_CONST;
gpointer minefield_ref (gpointer instance);
void minefield_unref (gpointer instance);
GParamSpec* param_spec_minefield (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_minefield (GValue* value, gpointer v_object);
void value_take_minefield (GValue* value, gpointer v_object);
gpointer value_get_minefield (const GValue* value);
GType minefield_get_type (void) G_GNUC_CONST;
GType minefield_view_get_type (void) G_GNUC_CONST;
#define GNO_MINE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_GNO_MINE, GnoMinePrivate))
enum  {
	GNO_MINE_DUMMY_PROPERTY
};
#define GNO_MINE_KEY_XSIZE "xsize"
#define GNO_MINE_XSIZE_MIN 4
#define GNO_MINE_XSIZE_MAX 100
#define GNO_MINE_KEY_YSIZE "ysize"
#define GNO_MINE_YSIZE_MIN 4
#define GNO_MINE_YSIZE_MAX 100
#define GNO_MINE_KEY_NMINES "nmines"
#define GNO_MINE_KEY_MODE "mode"
#define GNO_MINE_KEY_USE_QUESTION_MARKS "use-question-marks"
#define GNO_MINE_KEY_USE_OVERMINE_WARNING "use-overmine-warning"
#define GNO_MINE_KEY_USE_AUTOFLAG "use-autoflag"
static void gno_mine_new_game_cb (GnoMine* self);
static void _gno_mine_new_game_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void gno_mine_repeat_size_cb (GnoMine* self);
static void _gno_mine_repeat_size_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void gno_mine_hint_cb (GnoMine* self);
static void _gno_mine_hint_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void gno_mine_toggle_pause_cb (GnoMine* self);
static void _gno_mine_toggle_pause_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void gno_mine_fullscreen_cb (GnoMine* self);
static void _gno_mine_fullscreen_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void gno_mine_scores_cb (GnoMine* self);
static void _gno_mine_scores_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void gno_mine_preferences_cb (GnoMine* self);
static void _gno_mine_preferences_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void gno_mine_quit_cb (GnoMine* self);
static void _gno_mine_quit_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void gno_mine_help_cb (GnoMine* self);
static void _gno_mine_help_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void gno_mine_about_cb (GnoMine* self);
static void _gno_mine_about_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
GnoMine* gno_mine_new (void);
GnoMine* gno_mine_construct (GType object_type);
static void gno_mine_real_startup (GApplication* base);
static gboolean gno_mine_window_configure_event_cb (GnoMine* self, GdkEventConfigure* event);
static gboolean _gno_mine_window_configure_event_cb_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self);
static gboolean gno_mine_window_state_event_cb (GnoMine* self, GdkEventWindowState* event);
static gboolean _gno_mine_window_state_event_cb_gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self);
static GtkImage* gno_mine_load_face_image (GnoMine* self, const gchar* name);
static void gno_mine_set_face_image (GnoMine* self, GtkImage* face_image);
MinefieldView* minefield_view_new (void);
MinefieldView* minefield_view_construct (GType object_type);
void minefield_view_set_use_question_marks (MinefieldView* self, gboolean use_question_marks);
void minefield_view_set_use_overmine_warning (MinefieldView* self, gboolean use_overmine_warning);
void minefield_view_set_use_autoflag (MinefieldView* self, gboolean use_autoflag);
static gboolean gno_mine_view_button_press_event (GnoMine* self, GtkWidget* widget, GdkEventButton* event);
static gboolean _gno_mine_view_button_press_event_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static void gno_mine_look_cb (GnoMine* self, MinefieldView* minefield_view);
static void _gno_mine_look_cb_minefield_view_look (MinefieldView* _sender, gpointer self);
static void gno_mine_unlook_cb (GnoMine* self, MinefieldView* minefield_view);
static void _gno_mine_unlook_cb_minefield_view_unlook (MinefieldView* _sender, gpointer self);
static void gno_mine_small_size_clicked_cb (GnoMine* self);
static void _gno_mine_small_size_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
static gchar* gno_mine_make_minefield_description (GnoMine* self, const gchar* color, gint width, gint height, gint n_mines);
static void gno_mine_medium_size_clicked_cb (GnoMine* self);
static void _gno_mine_medium_size_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void gno_mine_large_size_clicked_cb (GnoMine* self);
static void _gno_mine_large_size_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void gno_mine_show_custom_game_screen (GnoMine* self);
static void _gno_mine_show_custom_game_screen_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void gno_mine_xsize_spin_cb (GnoMine* self, GtkSpinButton* spin);
static void _gno_mine_xsize_spin_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self);
static void gno_mine_ysize_spin_cb (GnoMine* self, GtkSpinButton* spin);
static void _gno_mine_ysize_spin_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self);
static void gno_mine_n_mines_spin_cb (GnoMine* self, GtkSpinButton* spin);
static void _gno_mine_n_mines_spin_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self);
static void gno_mine_set_n_mines_limit (GnoMine* self);
static void gno_mine_show_new_game_screen (GnoMine* self);
static void _gno_mine_show_new_game_screen_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void gno_mine_custom_size_clicked_cb (GnoMine* self);
static void _gno_mine_custom_size_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void gno_mine_tick_cb (GnoMine* self);
void gno_mine_start (GnoMine* self);
static void gno_mine_real_shutdown (GApplication* base);
static void gno_mine_real_activate (GApplication* base);
Minefield* minefield_view_get_minefield (MinefieldView* self);
gboolean minefield_get_paused (Minefield* self);
void minefield_set_paused (Minefield* self, gboolean value);
static void gno_mine_update_flag_label (GnoMine* self);
guint minefield_get_n_flags (Minefield* self);
static gint gno_mine_show_scores (GnoMine* self, gint pos, gboolean endofgame);
static gboolean gno_mine_can_start_new_game (GnoMine* self);
guint minefield_get_n_cleared (Minefield* self);
gboolean minefield_get_is_complete (Minefield* self);
static void gno_mine_start_game (GnoMine* self);
Minefield* minefield_new (guint width, guint height, guint n_mines);
Minefield* minefield_construct (GType object_type, guint width, guint height, guint n_mines);
static void gno_mine_marks_changed_cb (GnoMine* self, Minefield* minefield);
static void _gno_mine_marks_changed_cb_minefield_marks_changed (Minefield* _sender, gpointer self);
static void gno_mine_explode_cb (GnoMine* self, Minefield* minefield);
static void _gno_mine_explode_cb_minefield_explode (Minefield* _sender, gpointer self);
static void gno_mine_cleared_cb (GnoMine* self, Minefield* minefield);
static void _gno_mine_cleared_cb_minefield_cleared (Minefield* _sender, gpointer self);
static void _gno_mine_tick_cb_minefield_tick (Minefield* _sender, gpointer self);
void minefield_view_set_minefield (MinefieldView* self, Minefield* value);
void minefield_hint (Minefield* self);
gdouble minefield_get_elapsed (Minefield* self);
static void gno_mine_use_question_toggle_cb (GnoMine* self, GtkToggleButton* button);
static void gno_mine_use_overmine_toggle_cb (GnoMine* self, GtkToggleButton* button);
static GtkDialog* gno_mine_create_preferences (GnoMine* self);
static void gno_mine_pref_response_cb (GnoMine* self, GtkDialog* dialog, gint response_id);
static void _gno_mine_pref_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
static gboolean gno_mine_pref_delete_event_cb (GnoMine* self, GtkWidget* widget, GdkEventAny* event);
static gboolean _gno_mine_pref_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self);
static void _gno_mine_use_question_toggle_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void _gno_mine_use_overmine_toggle_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void gno_mine_set_mode (GnoMine* self, gint mode);
gint gno_mine_main (gchar** args, int args_length1);
static void gno_mine_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);

static const GActionEntry GNO_MINE_action_entries[10] = {{"new-game", _gno_mine_new_game_cb_gsimple_action_activate_callback}, {"repeat-size", _gno_mine_repeat_size_cb_gsimple_action_activate_callback}, {"hint", _gno_mine_hint_cb_gsimple_action_activate_callback}, {"pause", _gno_mine_toggle_pause_cb_gsimple_action_activate_callback}, {"fullscreen", _gno_mine_fullscreen_cb_gsimple_action_activate_callback}, {"scores", _gno_mine_scores_cb_gsimple_action_activate_callback}, {"preferences", _gno_mine_preferences_cb_gsimple_action_activate_callback}, {"quit", _gno_mine_quit_cb_gsimple_action_activate_callback}, {"help", _gno_mine_help_cb_gsimple_action_activate_callback}, {"about", _gno_mine_about_cb_gsimple_action_activate_callback}};
static const GamesScoresCategory GNO_MINE_scorecats[4] = {{"Small", "Small"}, {"Medium", "Medium"}, {"Large", "Large"}, {"Custom", "Custom"}};

static void _gno_mine_new_game_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_new_game_cb (self);
}


static void _gno_mine_repeat_size_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_repeat_size_cb (self);
}


static void _gno_mine_hint_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_hint_cb (self);
}


static void _gno_mine_toggle_pause_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_toggle_pause_cb (self);
}


static void _gno_mine_fullscreen_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_fullscreen_cb (self);
}


static void _gno_mine_scores_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_scores_cb (self);
}


static void _gno_mine_preferences_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_preferences_cb (self);
}


static void _gno_mine_quit_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_quit_cb (self);
}


static void _gno_mine_help_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_help_cb (self);
}


static void _gno_mine_about_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	gno_mine_about_cb (self);
}


GnoMine* gno_mine_construct (GType object_type) {
	GnoMine * self = NULL;
	self = (GnoMine*) g_object_new (object_type, "application-id", "org.gnome.gnomine", "flags", G_APPLICATION_FLAGS_NONE, NULL);
	return self;
}


GnoMine* gno_mine_new (void) {
	return gno_mine_construct (TYPE_GNO_MINE);
}


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


static gboolean _gno_mine_window_configure_event_cb_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self) {
	gboolean result;
	result = gno_mine_window_configure_event_cb (self, event);
	return result;
}


static gboolean _gno_mine_window_state_event_cb_gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self) {
	gboolean result;
	result = gno_mine_window_state_event_cb (self, event);
	return result;
}


static gboolean _gno_mine_view_button_press_event_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = gno_mine_view_button_press_event (self, _sender, event);
	return result;
}


static void _gno_mine_look_cb_minefield_view_look (MinefieldView* _sender, gpointer self) {
	gno_mine_look_cb (self, _sender);
}


static void _gno_mine_unlook_cb_minefield_view_unlook (MinefieldView* _sender, gpointer self) {
	gno_mine_unlook_cb (self, _sender);
}


static void _gno_mine_small_size_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	gno_mine_small_size_clicked_cb (self);
}


static void _gno_mine_medium_size_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	gno_mine_medium_size_clicked_cb (self);
}


static void _gno_mine_large_size_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	gno_mine_large_size_clicked_cb (self);
}


static void _gno_mine_show_custom_game_screen_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	gno_mine_show_custom_game_screen (self);
}


static void _gno_mine_xsize_spin_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self) {
	gno_mine_xsize_spin_cb (self, _sender);
}


static void _gno_mine_ysize_spin_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self) {
	gno_mine_ysize_spin_cb (self, _sender);
}


static void _gno_mine_n_mines_spin_cb_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self) {
	gno_mine_n_mines_spin_cb (self, _sender);
}


static void _gno_mine_show_new_game_screen_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	gno_mine_show_new_game_screen (self);
}


static void _gno_mine_custom_size_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	gno_mine_custom_size_clicked_cb (self);
}


static void gno_mine_real_startup (GApplication* base) {
	GnoMine * self;
	const gchar* _tmp0_ = NULL;
	GSettings* _tmp1_;
	GamesScores* _tmp2_;
	GAction* _tmp3_ = NULL;
	GSimpleAction* _tmp4_;
	GSimpleAction* _tmp5_;
	GAction* _tmp6_ = NULL;
	GSimpleAction* _tmp7_;
	GSimpleAction* _tmp8_;
	GAction* _tmp9_ = NULL;
	GSimpleAction* _tmp10_;
	GSimpleAction* _tmp11_;
	GAction* _tmp12_ = NULL;
	GSimpleAction* _tmp13_;
	GSimpleAction* _tmp14_;
	GMenu* _tmp15_;
	GMenu* menu;
	GMenu* _tmp16_;
	GMenu* section;
	GMenu* _tmp17_;
	GMenu* _tmp18_;
	GMenu* _tmp19_;
	const gchar* _tmp20_ = NULL;
	GMenu* _tmp21_;
	const gchar* _tmp22_ = NULL;
	GMenu* _tmp23_;
	const gchar* _tmp24_ = NULL;
	GMenu* _tmp25_;
	const gchar* _tmp26_ = NULL;
	GMenu* _tmp27_;
	const gchar* _tmp28_ = NULL;
	GMenu* _tmp29_;
	const gchar* _tmp30_ = NULL;
	GMenu* _tmp31_;
	const gchar* _tmp32_ = NULL;
	GMenu* _tmp33_;
	GMenu* _tmp34_;
	GMenu* _tmp35_;
	GMenu* _tmp36_;
	const gchar* _tmp37_ = NULL;
	GMenu* _tmp38_;
	const gchar* _tmp39_ = NULL;
	GMenu* _tmp40_;
	GMenu* _tmp41_;
	GMenu* _tmp42_;
	GMenu* _tmp43_;
	const gchar* _tmp44_ = NULL;
	GMenu* _tmp45_;
	GtkApplicationWindow* _tmp46_;
	GtkWindow* _tmp47_;
	const gchar* _tmp48_ = NULL;
	GtkWindow* _tmp49_;
	GtkWindow* _tmp50_;
	GtkWindow* _tmp51_;
	GSettings* _tmp52_;
	gint _tmp53_ = 0;
	GSettings* _tmp54_;
	gint _tmp55_ = 0;
	GSettings* _tmp56_;
	gboolean _tmp57_ = FALSE;
	GtkWindow* _tmp62_;
	GtkBox* _tmp63_;
	GtkBox* main_vbox;
	GtkWindow* _tmp64_;
	GtkBox* _tmp65_;
	GtkBox* status_box;
	GtkLabel* _tmp66_;
	GtkLabel* _tmp67_;
	GtkLabel* _tmp68_;
	GtkLabel* _tmp69_;
	GtkLabel* _tmp70_;
	GtkLabel* _tmp71_;
	GtkImage* _tmp72_ = NULL;
	GtkImage* _tmp73_ = NULL;
	GtkImage* _tmp74_ = NULL;
	GtkImage* _tmp75_ = NULL;
	GtkImage* _tmp76_ = NULL;
	GtkToolbar* _tmp77_;
	GtkToolbar* toolbar;
	GtkStyleContext* _tmp78_ = NULL;
	const gchar* _tmp79_ = NULL;
	GtkToolButton* _tmp80_;
	GtkToolButton* _tmp81_;
	GtkToolButton* _tmp82_;
	GtkToolButton* _tmp83_;
	GtkToolButton* _tmp84_;
	GtkImage* _tmp85_;
	GtkToolButton* _tmp86_;
	GtkToolButton* _tmp87_;
	const gchar* _tmp88_ = NULL;
	GtkToolButton* _tmp89_;
	GtkToolButton* hint_button;
	const gchar* _tmp90_ = NULL;
	GtkToolButton* _tmp91_;
	GtkToolButton* _tmp92_;
	GtkToolButton* _tmp93_;
	GtkToolButton* _tmp94_;
	GtkToolButton* _tmp95_;
	GtkToolButton* _tmp96_;
	const gchar* _tmp97_ = NULL;
	GtkToolButton* _tmp98_;
	GtkToolButton* _tmp99_;
	GtkToolButton* _tmp100_;
	GtkToolButton* _tmp101_;
	GtkToolButton* _tmp102_;
	GtkToolButton* _tmp103_;
	GtkAlignment* _tmp104_;
	GtkAlignment* status_alignment;
	GtkToolItem* _tmp105_;
	GtkToolItem* status_item;
	GtkBox* _tmp106_;
	GtkBox* view_box;
	MinefieldView* _tmp107_;
	MinefieldView* _tmp108_;
	GSettings* _tmp109_;
	gboolean _tmp110_ = FALSE;
	MinefieldView* _tmp111_;
	GSettings* _tmp112_;
	gboolean _tmp113_ = FALSE;
	MinefieldView* _tmp114_;
	GSettings* _tmp115_;
	gboolean _tmp116_ = FALSE;
	MinefieldView* _tmp117_;
	MinefieldView* _tmp118_;
	MinefieldView* _tmp119_;
	MinefieldView* _tmp120_;
	const gchar* _tmp121_ = NULL;
	GtkAspectFrame* _tmp122_;
	GtkAspectFrame* _tmp123_;
	GtkAspectFrame* _tmp124_;
	GtkTable* _tmp125_;
	GtkTable* new_game_table;
	GtkAspectFrame* _tmp126_;
	GtkButton* _tmp127_;
	GtkButton* button_small;
	GtkLabel* _tmp128_;
	GtkLabel* label;
	GtkLabel* _tmp129_;
	gchar* _tmp130_ = NULL;
	gchar* _tmp131_;
	GtkLabel* _tmp132_;
	GtkLabel* _tmp133_;
	GtkButton* _tmp134_;
	GtkButton* button_medium;
	GtkLabel* _tmp135_;
	GtkLabel* _tmp136_;
	gchar* _tmp137_ = NULL;
	gchar* _tmp138_;
	GtkLabel* _tmp139_;
	GtkLabel* _tmp140_;
	GtkButton* _tmp141_;
	GtkButton* button_large;
	GtkLabel* _tmp142_;
	GtkLabel* _tmp143_;
	gchar* _tmp144_ = NULL;
	gchar* _tmp145_;
	GtkLabel* _tmp146_;
	GtkLabel* _tmp147_;
	GtkButton* _tmp148_;
	GtkButton* button_custom;
	GtkButton* _tmp149_;
	GtkButton* _tmp150_;
	GtkLabel* _tmp151_;
	GtkLabel* _tmp152_;
	const gchar* _tmp153_ = NULL;
	gchar* _tmp154_;
	gchar* _tmp155_;
	gchar* _tmp156_;
	gchar* _tmp157_;
	GtkLabel* _tmp158_;
	GtkButton* _tmp159_;
	GtkLabel* _tmp160_;
	GtkAspectFrame* _tmp161_;
	GtkAspectFrame* _tmp162_;
	GtkAspectFrame* _tmp163_;
	GtkAspectFrame* _tmp164_;
	GtkGrid* _tmp165_;
	GtkGrid* custom_field_grid;
	GtkAspectFrame* _tmp166_;
	const gchar* _tmp167_ = NULL;
	GtkLabel* _tmp168_;
	GtkLabel* _tmp169_;
	GtkLabel* _tmp170_;
	GtkSpinButton* _tmp171_;
	GtkSpinButton* field_width_entry;
	GSettings* _tmp172_;
	gint _tmp173_ = 0;
	GtkLabel* _tmp174_;
	const gchar* _tmp175_ = NULL;
	GtkLabel* _tmp176_;
	GtkLabel* _tmp177_;
	GtkLabel* _tmp178_;
	GtkSpinButton* _tmp179_;
	GtkSpinButton* field_height_entry;
	GSettings* _tmp180_;
	gint _tmp181_ = 0;
	GtkLabel* _tmp182_;
	const gchar* _tmp183_ = NULL;
	GtkLabel* _tmp184_;
	GtkLabel* _tmp185_;
	GtkLabel* _tmp186_;
	GtkSpinButton* _tmp187_;
	GtkSpinButton* _tmp188_;
	GtkSpinButton* _tmp189_;
	GSettings* _tmp190_;
	gint _tmp191_ = 0;
	GtkSpinButton* _tmp192_;
	GtkLabel* _tmp193_;
	GtkSpinButton* _tmp194_;
	GtkHBox* _tmp195_;
	GtkHBox* hbox;
	GtkButton* _tmp196_;
	GtkButton* button_back;
	const gchar* _tmp197_ = NULL;
	GtkButton* _tmp198_;
	GtkButton* _tmp199_;
	GtkImage* _tmp200_;
	GtkImage* _tmp201_;
	GtkButton* _tmp202_;
	GtkButton* _tmp203_;
	GtkAspectFrame* _tmp204_;
	GtkAspectFrame* _tmp205_;
	GtkAspectFrame* _tmp206_;
	self = (GnoMine*) base;
	G_APPLICATION_CLASS (gno_mine_parent_class)->startup ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
	_tmp0_ = _ ("Mines");
	g_set_application_name (_tmp0_);
	_tmp1_ = g_settings_new ("org.gnome.gnomine");
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp1_;
	_tmp2_ = games_scores_new ("gnomine", GNO_MINE_scorecats, G_N_ELEMENTS (GNO_MINE_scorecats), "board size", NULL, 0, GAMES_SCORES_STYLE_TIME_ASCENDING);
	_g_object_unref0 (self->priv->highscores);
	self->priv->highscores = _tmp2_;
	gtk_window_set_default_icon_name ("gnome-mines");
	g_action_map_add_action_entries ((GActionMap*) self, (const GActionEntry*) GNO_MINE_action_entries, G_N_ELEMENTS (GNO_MINE_action_entries), self);
	_tmp3_ = g_action_map_lookup_action ((GActionMap*) self, "new-game");
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp3_) : NULL);
	_g_object_unref0 (self->priv->new_game_action);
	self->priv->new_game_action = _tmp4_;
	_tmp5_ = self->priv->new_game_action;
	g_simple_action_set_enabled (_tmp5_, FALSE);
	_tmp6_ = g_action_map_lookup_action ((GActionMap*) self, "repeat-size");
	_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp6_) : NULL);
	_g_object_unref0 (self->priv->repeat_size_action);
	self->priv->repeat_size_action = _tmp7_;
	_tmp8_ = self->priv->repeat_size_action;
	g_simple_action_set_enabled (_tmp8_, FALSE);
	_tmp9_ = g_action_map_lookup_action ((GActionMap*) self, "hint");
	_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp9_) : NULL);
	_g_object_unref0 (self->priv->hint_action);
	self->priv->hint_action = _tmp10_;
	_tmp11_ = self->priv->hint_action;
	g_simple_action_set_enabled (_tmp11_, FALSE);
	_tmp12_ = g_action_map_lookup_action ((GActionMap*) self, "pause");
	_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp12_) : NULL);
	_g_object_unref0 (self->priv->pause_action);
	self->priv->pause_action = _tmp13_;
	_tmp14_ = self->priv->pause_action;
	g_simple_action_set_enabled (_tmp14_, FALSE);
	_tmp15_ = g_menu_new ();
	menu = _tmp15_;
	_tmp16_ = g_menu_new ();
	section = _tmp16_;
	_tmp17_ = menu;
	_tmp18_ = section;
	g_menu_append_section (_tmp17_, NULL, (GMenuModel*) _tmp18_);
	_tmp19_ = section;
	_tmp20_ = _ ("_New Game");
	g_menu_append (_tmp19_, _tmp20_, "app.new-game");
	_tmp21_ = section;
	_tmp22_ = _ ("_Replay Size");
	g_menu_append (_tmp21_, _tmp22_, "app.repeat-size");
	_tmp23_ = section;
	_tmp24_ = _ ("_Hint");
	g_menu_append (_tmp23_, _tmp24_, "app.hint");
	_tmp25_ = section;
	_tmp26_ = _ ("_Pause");
	g_menu_append (_tmp25_, _tmp26_, "app.pause");
	_tmp27_ = section;
	_tmp28_ = _ ("_Fullscreen");
	g_menu_append (_tmp27_, _tmp28_, "app.fullscreen");
	_tmp29_ = section;
	_tmp30_ = _ ("_Scores");
	g_menu_append (_tmp29_, _tmp30_, "app.scores");
	_tmp31_ = section;
	_tmp32_ = _ ("_Preferences");
	g_menu_append (_tmp31_, _tmp32_, "app.preferences");
	_tmp33_ = g_menu_new ();
	_g_object_unref0 (section);
	section = _tmp33_;
	_tmp34_ = menu;
	_tmp35_ = section;
	g_menu_append_section (_tmp34_, NULL, (GMenuModel*) _tmp35_);
	_tmp36_ = section;
	_tmp37_ = _ ("_Help");
	g_menu_append (_tmp36_, _tmp37_, "app.help");
	_tmp38_ = section;
	_tmp39_ = _ ("_About");
	g_menu_append (_tmp38_, _tmp39_, "app.about");
	_tmp40_ = g_menu_new ();
	_g_object_unref0 (section);
	section = _tmp40_;
	_tmp41_ = menu;
	_tmp42_ = section;
	g_menu_append_section (_tmp41_, NULL, (GMenuModel*) _tmp42_);
	_tmp43_ = section;
	_tmp44_ = _ ("_Quit");
	g_menu_append (_tmp43_, _tmp44_, "app.quit");
	_tmp45_ = menu;
	gtk_application_set_app_menu ((GtkApplication*) self, (GMenuModel*) _tmp45_);
	gtk_application_add_accelerator ((GtkApplication*) self, "<Primary>n", "app.new-game", NULL);
	gtk_application_add_accelerator ((GtkApplication*) self, "<Primary>r", "app.repeat-size", NULL);
	gtk_application_add_accelerator ((GtkApplication*) self, "Pause", "app.pause", NULL);
	gtk_application_add_accelerator ((GtkApplication*) self, "F11", "app.fullscreen", NULL);
	gtk_application_add_accelerator ((GtkApplication*) self, "F1", "app.help", NULL);
	gtk_application_add_accelerator ((GtkApplication*) self, "<Primary>w", "app.quit", NULL);
	gtk_application_add_accelerator ((GtkApplication*) self, "<Primary>q", "app.quit", NULL);
	_tmp46_ = (GtkApplicationWindow*) gtk_application_window_new ((GtkApplication*) self);
	g_object_ref_sink (_tmp46_);
	_g_object_unref0 (self->priv->window);
	self->priv->window = (GtkWindow*) _tmp46_;
	_tmp47_ = self->priv->window;
	_tmp48_ = _ ("Mines");
	gtk_window_set_title (_tmp47_, _tmp48_);
	_tmp49_ = self->priv->window;
	g_signal_connect_object ((GtkWidget*) _tmp49_, "configure-event", (GCallback) _gno_mine_window_configure_event_cb_gtk_widget_configure_event, self, 0);
	_tmp50_ = self->priv->window;
	g_signal_connect_object ((GtkWidget*) _tmp50_, "window-state-event", (GCallback) _gno_mine_window_state_event_cb_gtk_widget_window_state_event, self, 0);
	_tmp51_ = self->priv->window;
	_tmp52_ = self->priv->settings;
	_tmp53_ = g_settings_get_int (_tmp52_, "window-width");
	_tmp54_ = self->priv->settings;
	_tmp55_ = g_settings_get_int (_tmp54_, "window-height");
	gtk_window_set_default_size (_tmp51_, _tmp53_, _tmp55_);
	_tmp56_ = self->priv->settings;
	_tmp57_ = g_settings_get_boolean (_tmp56_, "window-is-fullscreen");
	if (_tmp57_) {
		GtkWindow* _tmp58_;
		_tmp58_ = self->priv->window;
		gtk_window_fullscreen (_tmp58_);
	} else {
		GSettings* _tmp59_;
		gboolean _tmp60_ = FALSE;
		_tmp59_ = self->priv->settings;
		_tmp60_ = g_settings_get_boolean (_tmp59_, "window-is-maximized");
		if (_tmp60_) {
			GtkWindow* _tmp61_;
			_tmp61_ = self->priv->window;
			gtk_window_maximize (_tmp61_);
		}
	}
	_tmp62_ = self->priv->window;
	gtk_application_add_window ((GtkApplication*) self, _tmp62_);
	_tmp63_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp63_);
	main_vbox = _tmp63_;
	_tmp64_ = self->priv->window;
	gtk_container_add ((GtkContainer*) _tmp64_, (GtkWidget*) main_vbox);
	gtk_widget_show ((GtkWidget*) main_vbox);
	_tmp65_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp65_);
	status_box = _tmp65_;
	gtk_widget_show ((GtkWidget*) status_box);
	_tmp66_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp66_);
	_g_object_unref0 (self->priv->flag_label);
	self->priv->flag_label = _tmp66_;
	_tmp67_ = self->priv->flag_label;
	gtk_widget_show ((GtkWidget*) _tmp67_);
	_tmp68_ = self->priv->flag_label;
	gtk_box_pack_start (status_box, (GtkWidget*) _tmp68_, FALSE, FALSE, (guint) 0);
	_tmp69_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp69_);
	_g_object_unref0 (self->priv->clock_label);
	self->priv->clock_label = _tmp69_;
	_tmp70_ = self->priv->clock_label;
	gtk_widget_show ((GtkWidget*) _tmp70_);
	_tmp71_ = self->priv->clock_label;
	gtk_box_pack_start (status_box, (GtkWidget*) _tmp71_, FALSE, FALSE, (guint) 0);
	_tmp72_ = gno_mine_load_face_image (self, "face-win.svg");
	_g_object_unref0 (self->priv->win_face_image);
	self->priv->win_face_image = _tmp72_;
	_tmp73_ = gno_mine_load_face_image (self, "face-sad.svg");
	_g_object_unref0 (self->priv->sad_face_image);
	self->priv->sad_face_image = _tmp73_;
	_tmp74_ = gno_mine_load_face_image (self, "face-smile.svg");
	_g_object_unref0 (self->priv->smile_face_image);
	self->priv->smile_face_image = _tmp74_;
	_tmp75_ = gno_mine_load_face_image (self, "face-cool.svg");
	_g_object_unref0 (self->priv->cool_face_image);
	self->priv->cool_face_image = _tmp75_;
	_tmp76_ = gno_mine_load_face_image (self, "face-worried.svg");
	_g_object_unref0 (self->priv->worried_face_image);
	self->priv->worried_face_image = _tmp76_;
	_tmp77_ = (GtkToolbar*) gtk_toolbar_new ();
	g_object_ref_sink (_tmp77_);
	toolbar = _tmp77_;
	gtk_widget_show ((GtkWidget*) toolbar);
	gtk_toolbar_set_show_arrow (toolbar, FALSE);
	_tmp78_ = gtk_widget_get_style_context ((GtkWidget*) toolbar);
	gtk_style_context_add_class (_tmp78_, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
	_tmp79_ = _ ("_New");
	_tmp80_ = (GtkToolButton*) gtk_tool_button_new (NULL, _tmp79_);
	g_object_ref_sink (_tmp80_);
	_g_object_unref0 (self->priv->face_button);
	self->priv->face_button = _tmp80_;
	_tmp81_ = self->priv->face_button;
	gtk_tool_button_set_use_underline (_tmp81_, TRUE);
	_tmp82_ = self->priv->face_button;
	gtk_tool_button_set_icon_name (_tmp82_, "document-new");
	_tmp83_ = self->priv->face_button;
	gtk_actionable_set_action_name ((GtkActionable*) _tmp83_, "app.new-game");
	_tmp84_ = self->priv->face_button;
	gtk_tool_item_set_is_important ((GtkToolItem*) _tmp84_, TRUE);
	_tmp85_ = self->priv->smile_face_image;
	gno_mine_set_face_image (self, _tmp85_);
	_tmp86_ = self->priv->face_button;
	gtk_widget_show ((GtkWidget*) _tmp86_);
	_tmp87_ = self->priv->face_button;
	gtk_toolbar_insert (toolbar, (GtkToolItem*) _tmp87_, -1);
	_tmp88_ = _ ("Hint");
	_tmp89_ = (GtkToolButton*) gtk_tool_button_new (NULL, _tmp88_);
	g_object_ref_sink (_tmp89_);
	hint_button = _tmp89_;
	gtk_tool_button_set_use_underline (hint_button, TRUE);
	gtk_tool_button_set_icon_name (hint_button, "dialog-information");
	gtk_actionable_set_action_name ((GtkActionable*) hint_button, "app.hint");
	gtk_tool_item_set_is_important ((GtkToolItem*) hint_button, TRUE);
	gtk_widget_show ((GtkWidget*) hint_button);
	gtk_toolbar_insert (toolbar, (GtkToolItem*) hint_button, -1);
	_tmp90_ = _ ("_Pause");
	_tmp91_ = (GtkToolButton*) gtk_tool_button_new (NULL, _tmp90_);
	g_object_ref_sink (_tmp91_);
	_g_object_unref0 (self->priv->pause_button);
	self->priv->pause_button = _tmp91_;
	_tmp92_ = self->priv->pause_button;
	gtk_tool_button_set_icon_name (_tmp92_, "media-playback-pause");
	_tmp93_ = self->priv->pause_button;
	gtk_tool_button_set_use_underline (_tmp93_, TRUE);
	_tmp94_ = self->priv->pause_button;
	gtk_actionable_set_action_name ((GtkActionable*) _tmp94_, "app.pause");
	_tmp95_ = self->priv->pause_button;
	gtk_widget_show ((GtkWidget*) _tmp95_);
	_tmp96_ = self->priv->pause_button;
	gtk_toolbar_insert (toolbar, (GtkToolItem*) _tmp96_, -1);
	_tmp97_ = _ ("_Fullscreen");
	_tmp98_ = (GtkToolButton*) gtk_tool_button_new (NULL, _tmp97_);
	g_object_ref_sink (_tmp98_);
	_g_object_unref0 (self->priv->fullscreen_button);
	self->priv->fullscreen_button = _tmp98_;
	_tmp99_ = self->priv->fullscreen_button;
	gtk_tool_button_set_icon_name (_tmp99_, "view-fullscreen");
	_tmp100_ = self->priv->fullscreen_button;
	gtk_tool_button_set_use_underline (_tmp100_, TRUE);
	_tmp101_ = self->priv->fullscreen_button;
	gtk_actionable_set_action_name ((GtkActionable*) _tmp101_, "app.fullscreen");
	_tmp102_ = self->priv->fullscreen_button;
	gtk_widget_show ((GtkWidget*) _tmp102_);
	_tmp103_ = self->priv->fullscreen_button;
	gtk_toolbar_insert (toolbar, (GtkToolItem*) _tmp103_, -1);
	_tmp104_ = (GtkAlignment*) gtk_alignment_new (1.0f, 0.5f, 0.0f, 0.0f);
	g_object_ref_sink (_tmp104_);
	status_alignment = _tmp104_;
	gtk_container_add ((GtkContainer*) status_alignment, (GtkWidget*) status_box);
	gtk_widget_show ((GtkWidget*) status_alignment);
	_tmp105_ = gtk_tool_item_new ();
	g_object_ref_sink (_tmp105_);
	status_item = _tmp105_;
	gtk_tool_item_set_expand (status_item, TRUE);
	gtk_container_add ((GtkContainer*) status_item, (GtkWidget*) status_alignment);
	gtk_widget_show ((GtkWidget*) status_item);
	gtk_toolbar_insert (toolbar, status_item, -1);
	gtk_box_pack_start (main_vbox, (GtkWidget*) toolbar, FALSE, FALSE, (guint) 0);
	_tmp106_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp106_);
	view_box = _tmp106_;
	gtk_container_set_border_width ((GtkContainer*) view_box, (guint) 3);
	gtk_widget_show ((GtkWidget*) view_box);
	gtk_box_pack_start (main_vbox, (GtkWidget*) view_box, TRUE, TRUE, (guint) 0);
	_tmp107_ = minefield_view_new ();
	g_object_ref_sink (_tmp107_);
	_g_object_unref0 (self->priv->minefield_view);
	self->priv->minefield_view = _tmp107_;
	_tmp108_ = self->priv->minefield_view;
	_tmp109_ = self->priv->settings;
	_tmp110_ = g_settings_get_boolean (_tmp109_, GNO_MINE_KEY_USE_QUESTION_MARKS);
	minefield_view_set_use_question_marks (_tmp108_, _tmp110_);
	_tmp111_ = self->priv->minefield_view;
	_tmp112_ = self->priv->settings;
	_tmp113_ = g_settings_get_boolean (_tmp112_, GNO_MINE_KEY_USE_OVERMINE_WARNING);
	minefield_view_set_use_overmine_warning (_tmp111_, _tmp113_);
	_tmp114_ = self->priv->minefield_view;
	_tmp115_ = self->priv->settings;
	_tmp116_ = g_settings_get_boolean (_tmp115_, GNO_MINE_KEY_USE_AUTOFLAG);
	minefield_view_set_use_autoflag (_tmp114_, _tmp116_);
	_tmp117_ = self->priv->minefield_view;
	g_signal_connect_object ((GtkWidget*) _tmp117_, "button-press-event", (GCallback) _gno_mine_view_button_press_event_gtk_widget_button_press_event, self, 0);
	_tmp118_ = self->priv->minefield_view;
	g_signal_connect_object (_tmp118_, "look", (GCallback) _gno_mine_look_cb_minefield_view_look, self, 0);
	_tmp119_ = self->priv->minefield_view;
	g_signal_connect_object (_tmp119_, "unlook", (GCallback) _gno_mine_unlook_cb_minefield_view_unlook, self, 0);
	_tmp120_ = self->priv->minefield_view;
	gtk_box_pack_start (view_box, (GtkWidget*) _tmp120_, TRUE, TRUE, (guint) 0);
	_tmp121_ = _ ("Field Size");
	_tmp122_ = (GtkAspectFrame*) gtk_aspect_frame_new (_tmp121_, 0.5f, 0.5f, 1.0f, FALSE);
	g_object_ref_sink (_tmp122_);
	_g_object_unref0 (self->priv->new_game_screen);
	self->priv->new_game_screen = _tmp122_;
	_tmp123_ = self->priv->new_game_screen;
	gtk_frame_set_shadow_type ((GtkFrame*) _tmp123_, GTK_SHADOW_NONE);
	_tmp124_ = self->priv->new_game_screen;
	gtk_widget_set_size_request ((GtkWidget*) _tmp124_, 200, 200);
	_tmp125_ = (GtkTable*) gtk_table_new ((guint) 2, (guint) 2, TRUE);
	g_object_ref_sink (_tmp125_);
	new_game_table = _tmp125_;
	_tmp126_ = self->priv->new_game_screen;
	gtk_container_add ((GtkContainer*) _tmp126_, (GtkWidget*) new_game_table);
	_tmp127_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp127_);
	button_small = _tmp127_;
	gtk_table_attach_defaults (new_game_table, (GtkWidget*) button_small, (guint) 0, (guint) 1, (guint) 0, (guint) 1);
	g_signal_connect_object (button_small, "clicked", (GCallback) _gno_mine_small_size_clicked_cb_gtk_button_clicked, self, 0);
	_tmp128_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp128_);
	label = _tmp128_;
	_tmp129_ = label;
	_tmp130_ = gno_mine_make_minefield_description (self, "#0000ff", 8, 8, 10);
	_tmp131_ = _tmp130_;
	gtk_label_set_markup (_tmp129_, _tmp131_);
	_g_free0 (_tmp131_);
	_tmp132_ = label;
	gtk_label_set_justify (_tmp132_, GTK_JUSTIFY_CENTER);
	_tmp133_ = label;
	gtk_container_add ((GtkContainer*) button_small, (GtkWidget*) _tmp133_);
	_tmp134_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp134_);
	button_medium = _tmp134_;
	gtk_table_attach_defaults (new_game_table, (GtkWidget*) button_medium, (guint) 1, (guint) 2, (guint) 0, (guint) 1);
	g_signal_connect_object (button_medium, "clicked", (GCallback) _gno_mine_medium_size_clicked_cb_gtk_button_clicked, self, 0);
	_tmp135_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp135_);
	_g_object_unref0 (label);
	label = _tmp135_;
	_tmp136_ = label;
	_tmp137_ = gno_mine_make_minefield_description (self, "#00a000", 16, 16, 40);
	_tmp138_ = _tmp137_;
	gtk_label_set_markup (_tmp136_, _tmp138_);
	_g_free0 (_tmp138_);
	_tmp139_ = label;
	gtk_label_set_justify (_tmp139_, GTK_JUSTIFY_CENTER);
	_tmp140_ = label;
	gtk_container_add ((GtkContainer*) button_medium, (GtkWidget*) _tmp140_);
	_tmp141_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp141_);
	button_large = _tmp141_;
	gtk_table_attach_defaults (new_game_table, (GtkWidget*) button_large, (guint) 0, (guint) 1, (guint) 1, (guint) 2);
	g_signal_connect_object (button_large, "clicked", (GCallback) _gno_mine_large_size_clicked_cb_gtk_button_clicked, self, 0);
	_tmp142_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp142_);
	_g_object_unref0 (label);
	label = _tmp142_;
	_tmp143_ = label;
	_tmp144_ = gno_mine_make_minefield_description (self, "#ff0000", 30, 16, 99);
	_tmp145_ = _tmp144_;
	gtk_label_set_markup (_tmp143_, _tmp145_);
	_g_free0 (_tmp145_);
	_tmp146_ = label;
	gtk_label_set_justify (_tmp146_, GTK_JUSTIFY_CENTER);
	_tmp147_ = label;
	gtk_container_add ((GtkContainer*) button_large, (GtkWidget*) _tmp147_);
	_tmp148_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp148_);
	button_custom = _tmp148_;
	_tmp149_ = button_custom;
	gtk_table_attach_defaults (new_game_table, (GtkWidget*) _tmp149_, (guint) 1, (guint) 2, (guint) 1, (guint) 2);
	_tmp150_ = button_custom;
	g_signal_connect_object (_tmp150_, "clicked", (GCallback) _gno_mine_show_custom_game_screen_gtk_button_clicked, self, 0);
	_tmp151_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp151_);
	_g_object_unref0 (label);
	label = _tmp151_;
	_tmp152_ = label;
	_tmp153_ = g_dpgettext2 (NULL, "board size", "Custom");
	_tmp154_ = g_strconcat ("<span fgcolor='#00007f'><span size='xx-large' weight='heavy'>?</span>\n", _tmp153_, NULL);
	_tmp155_ = _tmp154_;
	_tmp156_ = g_strconcat (_tmp155_, "</span>", NULL);
	_tmp157_ = _tmp156_;
	gtk_label_set_markup_with_mnemonic (_tmp152_, _tmp157_);
	_g_free0 (_tmp157_);
	_g_free0 (_tmp155_);
	_tmp158_ = label;
	gtk_label_set_justify (_tmp158_, GTK_JUSTIFY_CENTER);
	_tmp159_ = button_custom;
	_tmp160_ = label;
	gtk_container_add ((GtkContainer*) _tmp159_, (GtkWidget*) _tmp160_);
	_tmp161_ = self->priv->new_game_screen;
	gtk_widget_show_all ((GtkWidget*) _tmp161_);
	_tmp162_ = self->priv->new_game_screen;
	gtk_box_pack_start (view_box, (GtkWidget*) _tmp162_, TRUE, TRUE, (guint) 0);
	_tmp163_ = (GtkAspectFrame*) gtk_aspect_frame_new ("", 0.5f, 0.5f, 0.0f, TRUE);
	g_object_ref_sink (_tmp163_);
	_g_object_unref0 (self->priv->custom_game_screen);
	self->priv->custom_game_screen = _tmp163_;
	_tmp164_ = self->priv->custom_game_screen;
	gtk_frame_set_shadow_type ((GtkFrame*) _tmp164_, GTK_SHADOW_NONE);
	_tmp165_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp165_);
	custom_field_grid = _tmp165_;
	gtk_grid_set_row_spacing (custom_field_grid, (guint) 6);
	gtk_grid_set_column_spacing (custom_field_grid, (guint) 12);
	_tmp166_ = self->priv->custom_game_screen;
	gtk_container_add ((GtkContainer*) _tmp166_, (GtkWidget*) custom_field_grid);
	_tmp167_ = _ ("H_orizontal:");
	_tmp168_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp167_);
	g_object_ref_sink (_tmp168_);
	_g_object_unref0 (label);
	label = _tmp168_;
	_tmp169_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp169_, (gfloat) 0, 0.5f);
	_tmp170_ = label;
	gtk_grid_attach (custom_field_grid, (GtkWidget*) _tmp170_, 0, 0, 1, 1);
	_tmp171_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) GNO_MINE_XSIZE_MIN, (gdouble) GNO_MINE_XSIZE_MAX, (gdouble) 1);
	g_object_ref_sink (_tmp171_);
	field_width_entry = _tmp171_;
	g_signal_connect_object (field_width_entry, "value-changed", (GCallback) _gno_mine_xsize_spin_cb_gtk_spin_button_value_changed, self, 0);
	_tmp172_ = self->priv->settings;
	_tmp173_ = g_settings_get_int (_tmp172_, GNO_MINE_KEY_XSIZE);
	gtk_spin_button_set_value (field_width_entry, (gdouble) _tmp173_);
	gtk_grid_attach (custom_field_grid, (GtkWidget*) field_width_entry, 1, 0, 1, 1);
	_tmp174_ = label;
	gtk_label_set_mnemonic_widget (_tmp174_, (GtkWidget*) field_width_entry);
	_tmp175_ = _ ("_Vertical:");
	_tmp176_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp175_);
	g_object_ref_sink (_tmp176_);
	_g_object_unref0 (label);
	label = _tmp176_;
	_tmp177_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp177_, (gfloat) 0, 0.5f);
	_tmp178_ = label;
	gtk_grid_attach (custom_field_grid, (GtkWidget*) _tmp178_, 0, 1, 1, 1);
	_tmp179_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) GNO_MINE_YSIZE_MIN, (gdouble) GNO_MINE_YSIZE_MAX, (gdouble) 1);
	g_object_ref_sink (_tmp179_);
	field_height_entry = _tmp179_;
	g_signal_connect_object (field_height_entry, "value-changed", (GCallback) _gno_mine_ysize_spin_cb_gtk_spin_button_value_changed, self, 0);
	_tmp180_ = self->priv->settings;
	_tmp181_ = g_settings_get_int (_tmp180_, GNO_MINE_KEY_YSIZE);
	gtk_spin_button_set_value (field_height_entry, (gdouble) _tmp181_);
	gtk_grid_attach (custom_field_grid, (GtkWidget*) field_height_entry, 1, 1, 1, 1);
	_tmp182_ = label;
	gtk_label_set_mnemonic_widget (_tmp182_, (GtkWidget*) field_height_entry);
	_tmp183_ = _ ("_Number of mines:");
	_tmp184_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp183_);
	g_object_ref_sink (_tmp184_);
	_g_object_unref0 (label);
	label = _tmp184_;
	_tmp185_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp185_, (gfloat) 0, 0.5f);
	_tmp186_ = label;
	gtk_grid_attach (custom_field_grid, (GtkWidget*) _tmp186_, 0, 2, 1, 1);
	_tmp187_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 1, (gdouble) (GNO_MINE_XSIZE_MAX * GNO_MINE_YSIZE_MAX), (gdouble) 1);
	g_object_ref_sink (_tmp187_);
	_g_object_unref0 (self->priv->n_mines_spin);
	self->priv->n_mines_spin = _tmp187_;
	_tmp188_ = self->priv->n_mines_spin;
	g_signal_connect_object (_tmp188_, "value-changed", (GCallback) _gno_mine_n_mines_spin_cb_gtk_spin_button_value_changed, self, 0);
	_tmp189_ = self->priv->n_mines_spin;
	_tmp190_ = self->priv->settings;
	_tmp191_ = g_settings_get_int (_tmp190_, GNO_MINE_KEY_NMINES);
	gtk_spin_button_set_value (_tmp189_, (gdouble) _tmp191_);
	_tmp192_ = self->priv->n_mines_spin;
	gtk_grid_attach (custom_field_grid, (GtkWidget*) _tmp192_, 1, 2, 1, 1);
	gno_mine_set_n_mines_limit (self);
	_tmp193_ = label;
	_tmp194_ = self->priv->n_mines_spin;
	gtk_label_set_mnemonic_widget (_tmp193_, (GtkWidget*) _tmp194_);
	_tmp195_ = (GtkHBox*) gtk_hbox_new (FALSE, 5);
	g_object_ref_sink (_tmp195_);
	hbox = _tmp195_;
	gtk_grid_attach (custom_field_grid, (GtkWidget*) hbox, 0, 3, 2, 1);
	_tmp196_ = (GtkButton*) gtk_button_new_from_stock (GTK_STOCK_CANCEL);
	g_object_ref_sink (_tmp196_);
	button_back = _tmp196_;
	g_signal_connect_object (button_back, "clicked", (GCallback) _gno_mine_show_new_game_screen_gtk_button_clicked, self, 0);
	gtk_box_pack_start ((GtkBox*) hbox, (GtkWidget*) button_back, TRUE, TRUE, (guint) 0);
	_tmp197_ = _ ("_Play Game");
	_tmp198_ = (GtkButton*) gtk_button_new_with_mnemonic (_tmp197_);
	g_object_ref_sink (_tmp198_);
	_g_object_unref0 (button_custom);
	button_custom = _tmp198_;
	_tmp199_ = button_custom;
	_tmp200_ = (GtkImage*) gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp200_);
	_tmp201_ = _tmp200_;
	gtk_button_set_image (_tmp199_, (GtkWidget*) _tmp201_);
	_g_object_unref0 (_tmp201_);
	_tmp202_ = button_custom;
	g_signal_connect_object (_tmp202_, "clicked", (GCallback) _gno_mine_custom_size_clicked_cb_gtk_button_clicked, self, 0);
	_tmp203_ = button_custom;
	gtk_box_pack_start ((GtkBox*) hbox, (GtkWidget*) _tmp203_, TRUE, TRUE, (guint) 0);
	_tmp204_ = self->priv->custom_game_screen;
	gtk_widget_show_all ((GtkWidget*) _tmp204_);
	_tmp205_ = self->priv->custom_game_screen;
	gtk_widget_hide ((GtkWidget*) _tmp205_);
	_tmp206_ = self->priv->custom_game_screen;
	gtk_box_pack_start (view_box, (GtkWidget*) _tmp206_, TRUE, FALSE, (guint) 0);
	gno_mine_tick_cb (self);
	_g_object_unref0 (button_back);
	_g_object_unref0 (hbox);
	_g_object_unref0 (field_height_entry);
	_g_object_unref0 (field_width_entry);
	_g_object_unref0 (custom_field_grid);
	_g_object_unref0 (button_custom);
	_g_object_unref0 (button_large);
	_g_object_unref0 (button_medium);
	_g_object_unref0 (label);
	_g_object_unref0 (button_small);
	_g_object_unref0 (new_game_table);
	_g_object_unref0 (view_box);
	_g_object_unref0 (status_item);
	_g_object_unref0 (status_alignment);
	_g_object_unref0 (hint_button);
	_g_object_unref0 (toolbar);
	_g_object_unref0 (status_box);
	_g_object_unref0 (main_vbox);
	_g_object_unref0 (section);
	_g_object_unref0 (menu);
}


static gboolean gno_mine_window_configure_event_cb (GnoMine* self, GdkEventConfigure* event) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp1_ = self->priv->is_maximized;
	if (!_tmp1_) {
		gboolean _tmp2_;
		_tmp2_ = self->priv->is_fullscreen;
		_tmp0_ = !_tmp2_;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp3_ = _tmp0_;
	if (_tmp3_) {
		GdkEventConfigure _tmp4_;
		gint _tmp5_;
		GdkEventConfigure _tmp6_;
		gint _tmp7_;
		_tmp4_ = *event;
		_tmp5_ = _tmp4_.width;
		self->priv->window_width = _tmp5_;
		_tmp6_ = *event;
		_tmp7_ = _tmp6_.height;
		self->priv->window_height = _tmp7_;
	}
	result = FALSE;
	return result;
}


static gboolean gno_mine_window_state_event_cb (GnoMine* self, GdkEventWindowState* event) {
	gboolean result = FALSE;
	GdkEventWindowState _tmp0_;
	GdkWindowState _tmp1_;
	GdkEventWindowState _tmp4_;
	GdkWindowState _tmp5_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = *event;
	_tmp1_ = _tmp0_.changed_mask;
	if ((_tmp1_ & GDK_WINDOW_STATE_MAXIMIZED) != 0) {
		GdkEventWindowState _tmp2_;
		GdkWindowState _tmp3_;
		_tmp2_ = *event;
		_tmp3_ = _tmp2_.new_window_state;
		self->priv->is_maximized = (_tmp3_ & GDK_WINDOW_STATE_MAXIMIZED) != 0;
	}
	_tmp4_ = *event;
	_tmp5_ = _tmp4_.changed_mask;
	if ((_tmp5_ & GDK_WINDOW_STATE_FULLSCREEN) != 0) {
		GdkEventWindowState _tmp6_;
		GdkWindowState _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = *event;
		_tmp7_ = _tmp6_.new_window_state;
		self->priv->is_fullscreen = (_tmp7_ & GDK_WINDOW_STATE_FULLSCREEN) != 0;
		_tmp8_ = self->priv->is_fullscreen;
		if (_tmp8_) {
			GtkToolButton* _tmp9_;
			const gchar* _tmp10_ = NULL;
			GtkToolButton* _tmp11_;
			_tmp9_ = self->priv->fullscreen_button;
			_tmp10_ = _ ("_Leave Fullscreen");
			gtk_tool_button_set_label (_tmp9_, _tmp10_);
			_tmp11_ = self->priv->fullscreen_button;
			gtk_tool_button_set_icon_name (_tmp11_, "view-restore");
		} else {
			GtkToolButton* _tmp12_;
			const gchar* _tmp13_ = NULL;
			GtkToolButton* _tmp14_;
			_tmp12_ = self->priv->fullscreen_button;
			_tmp13_ = _ ("_Fullscreen");
			gtk_tool_button_set_label (_tmp12_, _tmp13_);
			_tmp14_ = self->priv->fullscreen_button;
			gtk_tool_button_set_icon_name (_tmp14_, "view-fullscreen");
		}
	}
	result = FALSE;
	return result;
}


static gchar* gno_mine_make_minefield_description (GnoMine* self, const gchar* color, gint width, gint height, gint n_mines) {
	gchar* result = NULL;
	gint _tmp0_;
	gint _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* size_label;
	gint _tmp3_;
	const gchar* _tmp4_ = NULL;
	gint _tmp5_;
	gchar* _tmp6_ = NULL;
	gchar* mines_label;
	const gchar* _tmp7_;
	gchar* _tmp8_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (color != NULL, NULL);
	_tmp0_ = width;
	_tmp1_ = height;
	_tmp2_ = g_strdup_printf ("%d × %d", _tmp0_, _tmp1_);
	size_label = _tmp2_;
	_tmp3_ = n_mines;
	_tmp4_ = ngettext ("<b>%d</b> mine", "<b>%d</b> mines", (gulong) _tmp3_);
	_tmp5_ = n_mines;
	_tmp6_ = g_strdup_printf (_tmp4_, _tmp5_);
	mines_label = _tmp6_;
	_tmp7_ = color;
	_tmp8_ = g_strdup_printf ("<span fgcolor='%s'><span size='x-large' weight='ultrabold'>%s</span>\n" \
"%s</span>", _tmp7_, size_label, mines_label);
	result = _tmp8_;
	_g_free0 (mines_label);
	_g_free0 (size_label);
	return result;
}


void gno_mine_start (GnoMine* self) {
	GtkWindow* _tmp0_;
	GtkImage* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->window;
	gtk_widget_show ((GtkWidget*) _tmp0_);
	gno_mine_show_new_game_screen (self);
	_tmp1_ = self->priv->smile_face_image;
	gno_mine_set_face_image (self, _tmp1_);
}


static void gno_mine_real_shutdown (GApplication* base) {
	GnoMine * self;
	GSettings* _tmp0_;
	gint _tmp1_;
	GSettings* _tmp2_;
	gint _tmp3_;
	GSettings* _tmp4_;
	gboolean _tmp5_;
	GSettings* _tmp6_;
	gboolean _tmp7_;
	self = (GnoMine*) base;
	G_APPLICATION_CLASS (gno_mine_parent_class)->shutdown ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
	_tmp0_ = self->priv->settings;
	_tmp1_ = self->priv->window_width;
	g_settings_set_int (_tmp0_, "window-width", _tmp1_);
	_tmp2_ = self->priv->settings;
	_tmp3_ = self->priv->window_height;
	g_settings_set_int (_tmp2_, "window-height", _tmp3_);
	_tmp4_ = self->priv->settings;
	_tmp5_ = self->priv->is_maximized;
	g_settings_set_boolean (_tmp4_, "window-is-maximized", _tmp5_);
	_tmp6_ = self->priv->settings;
	_tmp7_ = self->priv->is_fullscreen;
	g_settings_set_boolean (_tmp6_, "window-is-fullscreen", _tmp7_);
}


static void gno_mine_real_activate (GApplication* base) {
	GnoMine * self;
	GtkWindow* _tmp0_;
	self = (GnoMine*) base;
	_tmp0_ = self->priv->window;
	gtk_widget_show ((GtkWidget*) _tmp0_);
}


static GtkImage* gno_mine_load_face_image (GnoMine* self, const gchar* name) {
	GtkImage* result = NULL;
	GtkImage* _tmp0_;
	GtkImage* image;
	const gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* filename;
	const gchar* _tmp3_;
	GtkImage* _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp0_);
	image = _tmp0_;
	_tmp1_ = name;
	_tmp2_ = g_build_filename (DATA_DIRECTORY, _tmp1_, NULL);
	filename = _tmp2_;
	_tmp3_ = filename;
	if (_tmp3_ != NULL) {
		GtkImage* _tmp4_;
		const gchar* _tmp5_;
		_tmp4_ = image;
		_tmp5_ = filename;
		gtk_image_set_from_file (_tmp4_, _tmp5_);
	}
	_tmp6_ = image;
	gtk_widget_show ((GtkWidget*) _tmp6_);
	result = image;
	_g_free0 (filename);
	return result;
}


static void gno_mine_set_face_image (GnoMine* self, GtkImage* face_image) {
	GtkToolButton* _tmp0_;
	GtkImage* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (face_image != NULL);
	_tmp0_ = self->priv->face_button;
	_tmp1_ = face_image;
	gtk_tool_button_set_icon_widget (_tmp0_, (GtkWidget*) _tmp1_);
}


static gboolean gno_mine_view_button_press_event (GnoMine* self, GtkWidget* widget, GdkEventButton* event) {
	gboolean result = FALSE;
	MinefieldView* _tmp0_;
	Minefield* _tmp1_;
	Minefield* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = self->priv->minefield_view;
	_tmp1_ = minefield_view_get_minefield (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = minefield_get_paused (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		MinefieldView* _tmp5_;
		Minefield* _tmp6_;
		Minefield* _tmp7_;
		_tmp5_ = self->priv->minefield_view;
		_tmp6_ = minefield_view_get_minefield (_tmp5_);
		_tmp7_ = _tmp6_;
		minefield_set_paused (_tmp7_, FALSE);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}


static void gno_mine_quit_cb (GnoMine* self) {
	GtkWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->window;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}


static void gno_mine_update_flag_label (GnoMine* self) {
	GtkLabel* _tmp0_;
	const gchar* _tmp1_ = NULL;
	Minefield* _tmp2_;
	guint _tmp3_;
	guint _tmp4_;
	Minefield* _tmp5_;
	guint _tmp6_;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->flag_label;
	_tmp1_ = _ ("Flags: %u/%u");
	_tmp2_ = self->priv->minefield;
	_tmp3_ = minefield_get_n_flags (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->minefield;
	_tmp6_ = _tmp5_->n_mines;
	_tmp7_ = g_strdup_printf (_tmp1_, _tmp4_, _tmp6_);
	_tmp8_ = _tmp7_;
	gtk_label_set_text (_tmp0_, _tmp8_);
	_g_free0 (_tmp8_);
}


static gint gno_mine_show_scores (GnoMine* self, gint pos, gboolean endofgame) {
	gint result = 0;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp3_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp1_ = endofgame;
	if (_tmp1_) {
		gint _tmp2_;
		_tmp2_ = pos;
		_tmp0_ = _tmp2_ <= 0;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp3_ = _tmp0_;
	if (_tmp3_) {
		GtkWindow* _tmp4_;
		const gchar* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		GtkMessageDialog* _tmp7_;
		GtkMessageDialog* dialog;
		GtkMessageDialog* _tmp8_;
		const gchar* _tmp9_ = NULL;
		GtkMessageDialog* _tmp10_;
		GtkMessageDialog* _tmp11_;
		GtkMessageDialog* _tmp12_;
		gint _tmp13_ = 0;
		gint _result_;
		GtkMessageDialog* _tmp14_;
		_tmp4_ = self->priv->window;
		_tmp5_ = _ ("The Mines Have Been Cleared!");
		_tmp6_ = _ ("Great work, but unfortunately your score did not make the top ten.");
		_tmp7_ = (GtkMessageDialog*) gtk_message_dialog_new_with_markup (_tmp4_, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_NONE, "<b>%s</b>\n%s", _tmp5_, _tmp6_);
		g_object_ref_sink (_tmp7_);
		dialog = _tmp7_;
		_tmp8_ = dialog;
		_tmp9_ = _ ("_New Game");
		gtk_dialog_add_buttons ((GtkDialog*) _tmp8_, GTK_STOCK_QUIT, GTK_RESPONSE_REJECT, _tmp9_, GTK_RESPONSE_ACCEPT, NULL, NULL);
		_tmp10_ = dialog;
		gtk_dialog_set_default_response ((GtkDialog*) _tmp10_, (gint) GTK_RESPONSE_ACCEPT);
		_tmp11_ = dialog;
		gtk_window_set_title ((GtkWindow*) _tmp11_, "");
		_tmp12_ = dialog;
		_tmp13_ = gtk_dialog_run ((GtkDialog*) _tmp12_);
		_result_ = _tmp13_;
		_tmp14_ = dialog;
		gtk_widget_destroy ((GtkWidget*) _tmp14_);
		result = _result_;
		_g_object_unref0 (dialog);
		return result;
	} else {
		GtkWindow* _tmp15_;
		GamesScores* _tmp16_;
		const gchar* _tmp17_ = NULL;
		GamesScoresDialog* _tmp18_;
		GamesScoresDialog* dialog;
		GamesScoresDialog* _tmp19_;
		const gchar* _tmp20_ = NULL;
		gint _tmp21_;
		gboolean _tmp34_;
		GamesScoresDialog* _tmp37_;
		gint _tmp38_ = 0;
		gint _result_;
		GamesScoresDialog* _tmp39_;
		_tmp15_ = self->priv->window;
		_tmp16_ = self->priv->highscores;
		_tmp17_ = _ ("Mines Scores");
		_tmp18_ = games_scores_dialog_new (_tmp15_, _tmp16_, _tmp17_);
		g_object_ref_sink (_tmp18_);
		dialog = _tmp18_;
		_tmp19_ = dialog;
		_tmp20_ = _ ("Size:");
		games_scores_dialog_set_category_description (_tmp19_, _tmp20_);
		_tmp21_ = pos;
		if (_tmp21_ > 0) {
			GamesScoresDialog* _tmp22_;
			gint _tmp23_;
			const gchar* _tmp24_ = NULL;
			gint _tmp25_;
			const gchar* _tmp28_ = NULL;
			const gchar* _tmp29_;
			gchar* _tmp30_ = NULL;
			gchar* message;
			GamesScoresDialog* _tmp31_;
			const gchar* _tmp32_;
			_tmp22_ = dialog;
			_tmp23_ = pos;
			games_scores_dialog_set_hilight (_tmp22_, (guint) _tmp23_);
			_tmp25_ = pos;
			if (_tmp25_ == 1) {
				const gchar* _tmp26_ = NULL;
				_tmp26_ = _ ("Your score is the best!");
				_tmp24_ = _tmp26_;
			} else {
				const gchar* _tmp27_ = NULL;
				_tmp27_ = _ ("Your score has made the top ten.");
				_tmp24_ = _tmp27_;
			}
			_tmp28_ = _ ("Congratulations!");
			_tmp29_ = _tmp24_;
			_tmp30_ = g_strdup_printf ("<b>%s</b>\n\n%s", _tmp28_, _tmp29_);
			message = _tmp30_;
			_tmp31_ = dialog;
			_tmp32_ = message;
			games_scores_dialog_set_message (_tmp31_, _tmp32_);
			_g_free0 (message);
		} else {
			GamesScoresDialog* _tmp33_;
			_tmp33_ = dialog;
			games_scores_dialog_set_message (_tmp33_, NULL);
		}
		_tmp34_ = endofgame;
		if (_tmp34_) {
			GamesScoresDialog* _tmp35_;
			_tmp35_ = dialog;
			games_scores_dialog_set_buttons (_tmp35_, (guint) (GAMES_SCORES_QUIT_BUTTON | GAMES_SCORES_NEW_GAME_BUTTON));
		} else {
			GamesScoresDialog* _tmp36_;
			_tmp36_ = dialog;
			games_scores_dialog_set_buttons (_tmp36_, (guint) 0);
		}
		_tmp37_ = dialog;
		_tmp38_ = gtk_dialog_run ((GtkDialog*) _tmp37_);
		_result_ = _tmp38_;
		_tmp39_ = dialog;
		gtk_widget_destroy ((GtkWidget*) _tmp39_);
		result = _result_;
		_g_object_unref0 (dialog);
		return result;
	}
}


static void gno_mine_fullscreen_cb (GnoMine* self) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->is_fullscreen;
	if (_tmp0_) {
		GtkWindow* _tmp1_;
		_tmp1_ = self->priv->window;
		gtk_window_unfullscreen (_tmp1_);
	} else {
		GtkWindow* _tmp2_;
		_tmp2_ = self->priv->window;
		gtk_window_fullscreen (_tmp2_);
	}
}


static void gno_mine_scores_cb (GnoMine* self) {
	g_return_if_fail (self != NULL);
	gno_mine_show_scores (self, 0, FALSE);
}


static void gno_mine_show_custom_game_screen (GnoMine* self) {
	GtkAspectFrame* _tmp0_;
	MinefieldView* _tmp1_;
	GtkAspectFrame* _tmp2_;
	g_return_if_fail (self != NULL);
	self->priv->is_new_game_screen = FALSE;
	_tmp0_ = self->priv->custom_game_screen;
	gtk_widget_show ((GtkWidget*) _tmp0_);
	_tmp1_ = self->priv->minefield_view;
	gtk_widget_hide ((GtkWidget*) _tmp1_);
	_tmp2_ = self->priv->new_game_screen;
	gtk_widget_hide ((GtkWidget*) _tmp2_);
}


static gboolean gno_mine_can_start_new_game (GnoMine* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	Minefield* _tmp3_;
	gboolean _tmp7_;
	gboolean _tmp10_;
	gboolean _tmp14_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp3_ = self->priv->minefield;
	if (_tmp3_ != NULL) {
		Minefield* _tmp4_;
		guint _tmp5_;
		guint _tmp6_;
		_tmp4_ = self->priv->minefield;
		_tmp5_ = minefield_get_n_cleared (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp2_ = _tmp6_ > ((guint) 0);
	} else {
		_tmp2_ = FALSE;
	}
	_tmp7_ = _tmp2_;
	if (_tmp7_) {
		Minefield* _tmp8_;
		gboolean _tmp9_;
		_tmp8_ = self->priv->minefield;
		_tmp9_ = _tmp8_->exploded;
		_tmp1_ = !_tmp9_;
	} else {
		_tmp1_ = FALSE;
	}
	_tmp10_ = _tmp1_;
	if (_tmp10_) {
		Minefield* _tmp11_;
		gboolean _tmp12_;
		gboolean _tmp13_;
		_tmp11_ = self->priv->minefield;
		_tmp12_ = minefield_get_is_complete (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp0_ = !_tmp13_;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp14_ = _tmp0_;
	if (_tmp14_) {
		GtkWindow* _tmp15_;
		const gchar* _tmp16_ = NULL;
		GtkMessageDialog* _tmp17_;
		GtkMessageDialog* dialog;
		GtkMessageDialog* _tmp18_;
		const gchar* _tmp19_ = NULL;
		GtkMessageDialog* _tmp20_;
		const gchar* _tmp21_ = NULL;
		const gchar* _tmp22_ = NULL;
		GtkMessageDialog* _tmp23_;
		gint _tmp24_ = 0;
		gint _result_;
		GtkMessageDialog* _tmp25_;
		gint _tmp26_;
		gno_mine_toggle_pause_cb (self);
		_tmp15_ = self->priv->window;
		_tmp16_ = _ ("Do you want to start a new game?");
		_tmp17_ = (GtkMessageDialog*) gtk_message_dialog_new (_tmp15_, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", _tmp16_);
		g_object_ref_sink (_tmp17_);
		dialog = _tmp17_;
		_tmp18_ = dialog;
		_tmp19_ = _ ("If you start a new game, your current progress will be lost.");
		g_object_set (_tmp18_, "secondary-text", _tmp19_, NULL);
		_tmp20_ = dialog;
		_tmp21_ = _ ("Keep Current Game");
		_tmp22_ = _ ("Start New Game");
		gtk_dialog_add_buttons ((GtkDialog*) _tmp20_, _tmp21_, GTK_RESPONSE_DELETE_EVENT, _tmp22_, GTK_RESPONSE_ACCEPT, NULL, NULL);
		_tmp23_ = dialog;
		_tmp24_ = gtk_dialog_run ((GtkDialog*) _tmp23_);
		_result_ = _tmp24_;
		_tmp25_ = dialog;
		gtk_widget_destroy ((GtkWidget*) _tmp25_);
		_tmp26_ = _result_;
		if (_tmp26_ != ((gint) GTK_RESPONSE_ACCEPT)) {
			gno_mine_toggle_pause_cb (self);
			result = FALSE;
			_g_object_unref0 (dialog);
			return result;
		}
		_g_object_unref0 (dialog);
	}
	result = TRUE;
	return result;
}


static void gno_mine_show_new_game_screen (GnoMine* self) {
	gboolean _tmp0_;
	Minefield* _tmp1_;
	GtkAspectFrame* _tmp3_;
	MinefieldView* _tmp4_;
	GtkAspectFrame* _tmp5_;
	GtkLabel* _tmp6_;
	GtkImage* _tmp7_;
	GSimpleAction* _tmp8_;
	GSimpleAction* _tmp9_;
	GSimpleAction* _tmp10_;
	GSimpleAction* _tmp11_;
	MinefieldView* _tmp12_;
	Minefield* _tmp13_;
	Minefield* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->is_new_game_screen;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->priv->minefield;
	if (_tmp1_ != NULL) {
		Minefield* _tmp2_;
		_tmp2_ = self->priv->minefield;
		g_signal_handlers_disconnect_by_func (_tmp2_, NULL, self);
	}
	_minefield_unref0 (self->priv->minefield);
	self->priv->minefield = NULL;
	self->priv->is_new_game_screen = TRUE;
	_tmp3_ = self->priv->custom_game_screen;
	gtk_widget_hide ((GtkWidget*) _tmp3_);
	_tmp4_ = self->priv->minefield_view;
	gtk_widget_hide ((GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->new_game_screen;
	gtk_widget_show ((GtkWidget*) _tmp5_);
	_tmp6_ = self->priv->flag_label;
	gtk_label_set_text (_tmp6_, "");
	_tmp7_ = self->priv->smile_face_image;
	gno_mine_set_face_image (self, _tmp7_);
	_tmp8_ = self->priv->new_game_action;
	g_simple_action_set_enabled (_tmp8_, FALSE);
	_tmp9_ = self->priv->repeat_size_action;
	g_simple_action_set_enabled (_tmp9_, FALSE);
	_tmp10_ = self->priv->hint_action;
	g_simple_action_set_enabled (_tmp10_, FALSE);
	_tmp11_ = self->priv->pause_action;
	g_simple_action_set_enabled (_tmp11_, FALSE);
	_tmp12_ = self->priv->minefield_view;
	_tmp13_ = minefield_view_get_minefield (_tmp12_);
	_tmp14_ = _tmp13_;
	minefield_set_paused (_tmp14_, FALSE);
}


static void _gno_mine_marks_changed_cb_minefield_marks_changed (Minefield* _sender, gpointer self) {
	gno_mine_marks_changed_cb (self, _sender);
}


static void _gno_mine_explode_cb_minefield_explode (Minefield* _sender, gpointer self) {
	gno_mine_explode_cb (self, _sender);
}


static void _gno_mine_cleared_cb_minefield_cleared (Minefield* _sender, gpointer self) {
	gno_mine_cleared_cb (self, _sender);
}


static void _gno_mine_tick_cb_minefield_tick (Minefield* _sender, gpointer self) {
	gno_mine_tick_cb (self);
}


static void gno_mine_start_game (GnoMine* self) {
	GtkAspectFrame* _tmp0_;
	MinefieldView* _tmp1_;
	GtkAspectFrame* _tmp2_;
	GtkImage* _tmp3_;
	gint x = 0;
	gint y = 0;
	gint n = 0;
	gchar* _tmp4_;
	gchar* score_key;
	GSettings* _tmp5_;
	gint _tmp6_ = 0;
	GamesScores* _tmp22_;
	const gchar* _tmp23_;
	Minefield* _tmp24_;
	gint _tmp26_;
	gint _tmp27_;
	gint _tmp28_;
	Minefield* _tmp29_;
	Minefield* _tmp30_;
	Minefield* _tmp31_;
	Minefield* _tmp32_;
	Minefield* _tmp33_;
	MinefieldView* _tmp34_;
	Minefield* _tmp35_;
	GSimpleAction* _tmp36_;
	GSimpleAction* _tmp37_;
	GSimpleAction* _tmp38_;
	GSimpleAction* _tmp39_;
	MinefieldView* _tmp40_;
	Minefield* _tmp41_;
	Minefield* _tmp42_;
	g_return_if_fail (self != NULL);
	self->priv->is_new_game_screen = FALSE;
	_tmp0_ = self->priv->custom_game_screen;
	gtk_widget_hide ((GtkWidget*) _tmp0_);
	_tmp1_ = self->priv->minefield_view;
	gtk_widget_show ((GtkWidget*) _tmp1_);
	_tmp2_ = self->priv->new_game_screen;
	gtk_widget_hide ((GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->smile_face_image;
	gno_mine_set_face_image (self, _tmp3_);
	_tmp4_ = g_strdup ("");
	score_key = _tmp4_;
	_tmp5_ = self->priv->settings;
	_tmp6_ = g_settings_get_int (_tmp5_, GNO_MINE_KEY_MODE);
	switch (_tmp6_) {
		case 0:
		{
			gchar* _tmp7_;
			x = 8;
			y = 8;
			n = 10;
			_tmp7_ = g_strdup ("Small");
			_g_free0 (score_key);
			score_key = _tmp7_;
			break;
		}
		case 1:
		{
			gchar* _tmp8_;
			x = 16;
			y = 16;
			n = 40;
			_tmp8_ = g_strdup ("Medium");
			_g_free0 (score_key);
			score_key = _tmp8_;
			break;
		}
		case 2:
		{
			gchar* _tmp9_;
			x = 30;
			y = 16;
			n = 99;
			_tmp9_ = g_strdup ("Large");
			_g_free0 (score_key);
			score_key = _tmp9_;
			break;
		}
		default:
		case 3:
		{
			GSettings* _tmp10_;
			gint _tmp11_ = 0;
			gint _tmp12_ = 0;
			GSettings* _tmp13_;
			gint _tmp14_ = 0;
			gint _tmp15_ = 0;
			GSettings* _tmp16_;
			gint _tmp17_ = 0;
			gint _tmp18_;
			gint _tmp19_;
			gint _tmp20_ = 0;
			gchar* _tmp21_;
			_tmp10_ = self->priv->settings;
			_tmp11_ = g_settings_get_int (_tmp10_, GNO_MINE_KEY_XSIZE);
			_tmp12_ = CLAMP (_tmp11_, GNO_MINE_XSIZE_MIN, GNO_MINE_XSIZE_MAX);
			x = _tmp12_;
			_tmp13_ = self->priv->settings;
			_tmp14_ = g_settings_get_int (_tmp13_, GNO_MINE_KEY_YSIZE);
			_tmp15_ = CLAMP (_tmp14_, GNO_MINE_YSIZE_MIN, GNO_MINE_YSIZE_MAX);
			y = _tmp15_;
			_tmp16_ = self->priv->settings;
			_tmp17_ = g_settings_get_int (_tmp16_, GNO_MINE_KEY_NMINES);
			_tmp18_ = x;
			_tmp19_ = y;
			_tmp20_ = CLAMP (_tmp17_, 1, (_tmp18_ * _tmp19_) - 10);
			n = _tmp20_;
			_tmp21_ = g_strdup ("Custom");
			_g_free0 (score_key);
			score_key = _tmp21_;
			break;
		}
	}
	_tmp22_ = self->priv->highscores;
	_tmp23_ = score_key;
	games_scores_set_category (_tmp22_, _tmp23_);
	_tmp24_ = self->priv->minefield;
	if (_tmp24_ != NULL) {
		Minefield* _tmp25_;
		_tmp25_ = self->priv->minefield;
		g_signal_handlers_disconnect_by_func (_tmp25_, NULL, self);
	}
	_tmp26_ = x;
	_tmp27_ = y;
	_tmp28_ = n;
	_tmp29_ = minefield_new ((guint) _tmp26_, (guint) _tmp27_, (guint) _tmp28_);
	_minefield_unref0 (self->priv->minefield);
	self->priv->minefield = _tmp29_;
	_tmp30_ = self->priv->minefield;
	g_signal_connect_object (_tmp30_, "marks-changed", (GCallback) _gno_mine_marks_changed_cb_minefield_marks_changed, self, 0);
	_tmp31_ = self->priv->minefield;
	g_signal_connect_object (_tmp31_, "explode", (GCallback) _gno_mine_explode_cb_minefield_explode, self, 0);
	_tmp32_ = self->priv->minefield;
	g_signal_connect_object (_tmp32_, "cleared", (GCallback) _gno_mine_cleared_cb_minefield_cleared, self, 0);
	_tmp33_ = self->priv->minefield;
	g_signal_connect_object (_tmp33_, "tick", (GCallback) _gno_mine_tick_cb_minefield_tick, self, 0);
	_tmp34_ = self->priv->minefield_view;
	_tmp35_ = self->priv->minefield;
	minefield_view_set_minefield (_tmp34_, _tmp35_);
	gno_mine_update_flag_label (self);
	_tmp36_ = self->priv->new_game_action;
	g_simple_action_set_enabled (_tmp36_, TRUE);
	_tmp37_ = self->priv->repeat_size_action;
	g_simple_action_set_enabled (_tmp37_, TRUE);
	_tmp38_ = self->priv->hint_action;
	g_simple_action_set_enabled (_tmp38_, TRUE);
	_tmp39_ = self->priv->pause_action;
	g_simple_action_set_enabled (_tmp39_, TRUE);
	_tmp40_ = self->priv->minefield_view;
	_tmp41_ = minefield_view_get_minefield (_tmp40_);
	_tmp42_ = _tmp41_;
	minefield_set_paused (_tmp42_, FALSE);
	_g_free0 (score_key);
}


static void gno_mine_hint_cb (GnoMine* self) {
	Minefield* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->minefield;
	minefield_hint (_tmp0_);
}


static void gno_mine_new_game_cb (GnoMine* self) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = gno_mine_can_start_new_game (self);
	if (_tmp0_) {
		gno_mine_show_new_game_screen (self);
	}
}


static void gno_mine_repeat_size_cb (GnoMine* self) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = gno_mine_can_start_new_game (self);
	if (_tmp0_) {
		gno_mine_start_game (self);
	}
}


static void gno_mine_toggle_pause_cb (GnoMine* self) {
	MinefieldView* _tmp0_;
	Minefield* _tmp1_;
	Minefield* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->minefield_view;
	_tmp1_ = minefield_view_get_minefield (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = minefield_get_paused (_tmp2_);
	_tmp4_ = _tmp3_;
	if (!_tmp4_) {
		MinefieldView* _tmp5_;
		Minefield* _tmp6_;
		Minefield* _tmp7_;
		GSimpleAction* _tmp8_;
		GtkToolButton* _tmp9_;
		GtkToolButton* _tmp10_;
		const gchar* _tmp11_ = NULL;
		_tmp5_ = self->priv->minefield_view;
		_tmp6_ = minefield_view_get_minefield (_tmp5_);
		_tmp7_ = _tmp6_;
		minefield_set_paused (_tmp7_, TRUE);
		_tmp8_ = self->priv->hint_action;
		g_simple_action_set_enabled (_tmp8_, FALSE);
		_tmp9_ = self->priv->pause_button;
		gtk_tool_button_set_icon_name (_tmp9_, "media-playback-start");
		_tmp10_ = self->priv->pause_button;
		_tmp11_ = _ ("Res_ume");
		gtk_tool_button_set_label (_tmp10_, _tmp11_);
	} else {
		MinefieldView* _tmp12_;
		Minefield* _tmp13_;
		Minefield* _tmp14_;
		GSimpleAction* _tmp15_;
		GtkToolButton* _tmp16_;
		GtkToolButton* _tmp17_;
		const gchar* _tmp18_ = NULL;
		_tmp12_ = self->priv->minefield_view;
		_tmp13_ = minefield_view_get_minefield (_tmp12_);
		_tmp14_ = _tmp13_;
		minefield_set_paused (_tmp14_, FALSE);
		_tmp15_ = self->priv->hint_action;
		g_simple_action_set_enabled (_tmp15_, TRUE);
		_tmp16_ = self->priv->pause_button;
		gtk_tool_button_set_icon_name (_tmp16_, "media-playback-pause");
		_tmp17_ = self->priv->pause_button;
		_tmp18_ = _ ("_Pause");
		gtk_tool_button_set_label (_tmp17_, _tmp18_);
	}
}


static void gno_mine_marks_changed_cb (GnoMine* self, Minefield* minefield) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (minefield != NULL);
	gno_mine_update_flag_label (self);
}


static void gno_mine_explode_cb (GnoMine* self, Minefield* minefield) {
	GtkImage* _tmp0_;
	GSimpleAction* _tmp1_;
	GSimpleAction* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (minefield != NULL);
	_tmp0_ = self->priv->sad_face_image;
	gno_mine_set_face_image (self, _tmp0_);
	_tmp1_ = self->priv->hint_action;
	g_simple_action_set_enabled (_tmp1_, FALSE);
	_tmp2_ = self->priv->pause_action;
	g_simple_action_set_enabled (_tmp2_, FALSE);
}


static void gno_mine_cleared_cb (GnoMine* self, Minefield* minefield) {
	GtkImage* _tmp0_;
	Minefield* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gint seconds;
	GamesScores* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gint _tmp7_ = 0;
	gint pos;
	gint _tmp8_;
	gint _tmp9_ = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (minefield != NULL);
	_tmp0_ = self->priv->win_face_image;
	gno_mine_set_face_image (self, _tmp0_);
	_tmp1_ = minefield;
	_tmp2_ = minefield_get_elapsed (_tmp1_);
	_tmp3_ = _tmp2_;
	seconds = (gint) (_tmp3_ + 0.5);
	_tmp4_ = self->priv->highscores;
	_tmp5_ = seconds;
	_tmp6_ = seconds;
	_tmp7_ = games_scores_add_time_score (_tmp4_, (gdouble) (((gfloat) (_tmp5_ / 60)) + (((gfloat) (_tmp6_ % 60)) / 100)));
	pos = _tmp7_;
	_tmp8_ = pos;
	_tmp9_ = gno_mine_show_scores (self, _tmp8_, TRUE);
	if (_tmp9_ == ((gint) GTK_RESPONSE_REJECT)) {
		GtkWindow* _tmp10_;
		_tmp10_ = self->priv->window;
		gtk_widget_destroy ((GtkWidget*) _tmp10_);
	} else {
		gno_mine_show_new_game_screen (self);
	}
}


static void gno_mine_tick_cb (GnoMine* self) {
	gint elapsed;
	Minefield* _tmp0_;
	gint _tmp4_;
	gint hours;
	gint _tmp5_;
	gint minutes;
	gint _tmp6_;
	gint seconds;
	GtkLabel* _tmp7_;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_;
	g_return_if_fail (self != NULL);
	elapsed = 0;
	_tmp0_ = self->priv->minefield;
	if (_tmp0_ != NULL) {
		Minefield* _tmp1_;
		gdouble _tmp2_;
		gdouble _tmp3_;
		_tmp1_ = self->priv->minefield;
		_tmp2_ = minefield_get_elapsed (_tmp1_);
		_tmp3_ = _tmp2_;
		elapsed = (gint) (_tmp3_ + 0.5);
	}
	_tmp4_ = elapsed;
	hours = _tmp4_ / 3600;
	_tmp5_ = elapsed;
	minutes = (_tmp5_ - (hours * 3600)) / 60;
	_tmp6_ = elapsed;
	seconds = (_tmp6_ - (hours * 3600)) - (minutes * 60);
	_tmp7_ = self->priv->clock_label;
	_tmp8_ = _ ("Time");
	_tmp9_ = g_strdup_printf ("%s: %02d:%02d:%02d", _tmp8_, hours, minutes, seconds);
	_tmp10_ = _tmp9_;
	gtk_label_set_text (_tmp7_, _tmp10_);
	_g_free0 (_tmp10_);
}


static void gno_mine_look_cb (GnoMine* self, MinefieldView* minefield_view) {
	GtkImage* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (minefield_view != NULL);
	_tmp0_ = self->priv->worried_face_image;
	gno_mine_set_face_image (self, _tmp0_);
}


static void gno_mine_unlook_cb (GnoMine* self, MinefieldView* minefield_view) {
	GtkImage* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (minefield_view != NULL);
	_tmp0_ = self->priv->cool_face_image;
	gno_mine_set_face_image (self, _tmp0_);
}


static void gno_mine_about_cb (GnoMine* self) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_ = NULL;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar** _tmp14_ = NULL;
	gchar** authors;
	gint authors_length1;
	gint _authors_size_;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	const gchar* _tmp20_ = NULL;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar** _tmp23_ = NULL;
	gchar** artists;
	gint artists_length1;
	gint _artists_size_;
	gchar* _tmp24_;
	gchar** _tmp25_ = NULL;
	gchar** documenters;
	gint documenters_length1;
	gint _documenters_size_;
	gchar* _tmp26_;
	gchar* license;
	GtkWindow* _tmp27_;
	const gchar* _tmp28_ = NULL;
	const gchar* _tmp29_ = NULL;
	const gchar* _tmp30_ = NULL;
	const gchar* _tmp31_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = _ ("Main game:");
	_tmp1_ = g_strdup (_tmp0_);
	_tmp2_ = g_strdup ("Pista");
	_tmp3_ = g_strdup ("Szekeres Istvan");
	_tmp4_ = g_strdup ("Robert Ancell");
	_tmp5_ = g_strdup ("");
	_tmp6_ = _ ("Score:");
	_tmp7_ = g_strdup (_tmp6_);
	_tmp8_ = g_strdup ("Horacio J. Peña");
	_tmp9_ = g_strdup ("");
	_tmp10_ = _ ("Resizing and SVG support:");
	_tmp11_ = g_strdup (_tmp10_);
	_tmp12_ = g_strdup ("Steve Chaplin");
	_tmp13_ = g_strdup ("Callum McKenzie");
	_tmp14_ = g_new0 (gchar*, 12 + 1);
	_tmp14_[0] = _tmp1_;
	_tmp14_[1] = _tmp2_;
	_tmp14_[2] = _tmp3_;
	_tmp14_[3] = _tmp4_;
	_tmp14_[4] = _tmp5_;
	_tmp14_[5] = _tmp7_;
	_tmp14_[6] = _tmp8_;
	_tmp14_[7] = _tmp9_;
	_tmp14_[8] = _tmp11_;
	_tmp14_[9] = _tmp12_;
	_tmp14_[10] = _tmp13_;
	_tmp14_[11] = NULL;
	authors = _tmp14_;
	authors_length1 = 12;
	_authors_size_ = authors_length1;
	_tmp15_ = _ ("Faces:");
	_tmp16_ = g_strdup (_tmp15_);
	_tmp17_ = g_strdup ("tigert");
	_tmp18_ = g_strdup ("Lapo Calamandrei and Ulisse Perusin");
	_tmp19_ = g_strdup ("");
	_tmp20_ = _ ("Graphics:");
	_tmp21_ = g_strdup (_tmp20_);
	_tmp22_ = g_strdup ("Richard Hoelscher");
	_tmp23_ = g_new0 (gchar*, 7 + 1);
	_tmp23_[0] = _tmp16_;
	_tmp23_[1] = _tmp17_;
	_tmp23_[2] = _tmp18_;
	_tmp23_[3] = _tmp19_;
	_tmp23_[4] = _tmp21_;
	_tmp23_[5] = _tmp22_;
	_tmp23_[6] = NULL;
	artists = _tmp23_;
	artists_length1 = 7;
	_artists_size_ = artists_length1;
	_tmp24_ = g_strdup ("Callum McKenzie");
	_tmp25_ = g_new0 (gchar*, 2 + 1);
	_tmp25_[0] = _tmp24_;
	_tmp25_[1] = NULL;
	documenters = _tmp25_;
	documenters_length1 = 2;
	_documenters_size_ = documenters_length1;
	_tmp26_ = g_strdup ("Mines 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 opti" \
"on) any later version.\n" \
"\n" \
"Mines is distributed in the hope that it will be useful, but WITHOUT A" \
"NY WARRANTY; without even the implied warranty of MERCHANTABILITY or F" \
"ITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License fo" \
"r more details.\n" \
"\n" \
"You should have received a copy of the GNU General Public License alon" \
"g with Mines; if not, write to the Free Software Foundation, Inc., 51 " \
"Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA");
	license = _tmp26_;
	_tmp27_ = self->priv->window;
	_tmp28_ = _ ("Mines");
	_tmp29_ = _ ("The popular logic puzzle minesweeper. Clear mines from a board using h" \
"ints from squares you have already uncovered.\n" \
"\n" \
"Mines is a part of GNOME Games.");
	_tmp30_ = _ ("translator-credits");
	_tmp31_ = _ ("GNOME Games web site");
	gtk_show_about_dialog (_tmp27_, "name", _tmp28_, "version", VERSION, "comments", _tmp29_, "copyright", "Copyright \xc2\xa9 1997-2008 Free Software Foundation, Inc.", "license", license, "authors", authors, "artists", artists, "documenters", documenters, "translator-credits", _tmp30_, "logo-icon-name", "gnomine", "website", "http://www.gnome.org/projects/gnome-games/", "website-label", _tmp31_, "wrap-license", TRUE, NULL, NULL);
	_g_free0 (license);
	documenters = (_vala_array_free (documenters, documenters_length1, (GDestroyNotify) g_free), NULL);
	artists = (_vala_array_free (artists, artists_length1, (GDestroyNotify) g_free), NULL);
	authors = (_vala_array_free (authors, authors_length1, (GDestroyNotify) g_free), NULL);
}


static void gno_mine_set_n_mines_limit (GnoMine* self) {
	GSettings* _tmp0_;
	gint _tmp1_ = 0;
	GSettings* _tmp2_;
	gint _tmp3_ = 0;
	gint max_mines;
	GSettings* _tmp4_;
	gint _tmp5_ = 0;
	gint _tmp6_;
	GtkSpinButton* _tmp11_;
	gint _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->settings;
	_tmp1_ = g_settings_get_int (_tmp0_, GNO_MINE_KEY_XSIZE);
	_tmp2_ = self->priv->settings;
	_tmp3_ = g_settings_get_int (_tmp2_, GNO_MINE_KEY_YSIZE);
	max_mines = (_tmp1_ * _tmp3_) - 10;
	_tmp4_ = self->priv->settings;
	_tmp5_ = g_settings_get_int (_tmp4_, GNO_MINE_KEY_NMINES);
	_tmp6_ = max_mines;
	if (_tmp5_ > _tmp6_) {
		GSettings* _tmp7_;
		gint _tmp8_;
		GtkSpinButton* _tmp9_;
		gint _tmp10_;
		_tmp7_ = self->priv->settings;
		_tmp8_ = max_mines;
		g_settings_set_int (_tmp7_, GNO_MINE_KEY_NMINES, _tmp8_);
		_tmp9_ = self->priv->n_mines_spin;
		_tmp10_ = max_mines;
		gtk_spin_button_set_value (_tmp9_, (gdouble) _tmp10_);
	}
	_tmp11_ = self->priv->n_mines_spin;
	_tmp12_ = max_mines;
	gtk_spin_button_set_range (_tmp11_, (gdouble) 1, (gdouble) _tmp12_);
}


static void gno_mine_xsize_spin_cb (GnoMine* self, GtkSpinButton* spin) {
	GtkSpinButton* _tmp0_;
	gint _tmp1_ = 0;
	gint xsize;
	gint _tmp2_;
	GSettings* _tmp3_;
	gint _tmp4_ = 0;
	GSettings* _tmp5_;
	gint _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (spin != NULL);
	_tmp0_ = spin;
	_tmp1_ = gtk_spin_button_get_value_as_int (_tmp0_);
	xsize = _tmp1_;
	_tmp2_ = xsize;
	_tmp3_ = self->priv->settings;
	_tmp4_ = g_settings_get_int (_tmp3_, GNO_MINE_KEY_XSIZE);
	if (_tmp2_ == _tmp4_) {
		return;
	}
	_tmp5_ = self->priv->settings;
	_tmp6_ = xsize;
	g_settings_set_int (_tmp5_, GNO_MINE_KEY_XSIZE, _tmp6_);
	gno_mine_set_n_mines_limit (self);
}


static void gno_mine_ysize_spin_cb (GnoMine* self, GtkSpinButton* spin) {
	GtkSpinButton* _tmp0_;
	gint _tmp1_ = 0;
	gint ysize;
	gint _tmp2_;
	GSettings* _tmp3_;
	gint _tmp4_ = 0;
	GSettings* _tmp5_;
	gint _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (spin != NULL);
	_tmp0_ = spin;
	_tmp1_ = gtk_spin_button_get_value_as_int (_tmp0_);
	ysize = _tmp1_;
	_tmp2_ = ysize;
	_tmp3_ = self->priv->settings;
	_tmp4_ = g_settings_get_int (_tmp3_, GNO_MINE_KEY_YSIZE);
	if (_tmp2_ == _tmp4_) {
		return;
	}
	_tmp5_ = self->priv->settings;
	_tmp6_ = ysize;
	g_settings_set_int (_tmp5_, GNO_MINE_KEY_YSIZE, _tmp6_);
	gno_mine_set_n_mines_limit (self);
}


static void gno_mine_n_mines_spin_cb (GnoMine* self, GtkSpinButton* spin) {
	GtkSpinButton* _tmp0_;
	gint _tmp1_ = 0;
	gint n_mines;
	gint _tmp2_;
	GSettings* _tmp3_;
	gint _tmp4_ = 0;
	GSettings* _tmp5_;
	gint _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (spin != NULL);
	_tmp0_ = spin;
	_tmp1_ = gtk_spin_button_get_value_as_int (_tmp0_);
	n_mines = _tmp1_;
	_tmp2_ = n_mines;
	_tmp3_ = self->priv->settings;
	_tmp4_ = g_settings_get_int (_tmp3_, GNO_MINE_KEY_NMINES);
	if (_tmp2_ == _tmp4_) {
		return;
	}
	_tmp5_ = self->priv->settings;
	_tmp6_ = n_mines;
	g_settings_set_int (_tmp5_, GNO_MINE_KEY_NMINES, _tmp6_);
}


static void gno_mine_use_question_toggle_cb (GnoMine* self, GtkToggleButton* button) {
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean use_question_marks;
	GSettings* _tmp2_;
	MinefieldView* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = button;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	use_question_marks = _tmp1_;
	_tmp2_ = self->priv->settings;
	g_settings_set_boolean (_tmp2_, GNO_MINE_KEY_USE_QUESTION_MARKS, use_question_marks);
	_tmp3_ = self->priv->minefield_view;
	minefield_view_set_use_question_marks (_tmp3_, use_question_marks);
}


static void gno_mine_use_overmine_toggle_cb (GnoMine* self, GtkToggleButton* button) {
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean use_overmine_warning;
	GSettings* _tmp2_;
	MinefieldView* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = button;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	use_overmine_warning = _tmp1_;
	_tmp2_ = self->priv->settings;
	g_settings_set_boolean (_tmp2_, GNO_MINE_KEY_USE_OVERMINE_WARNING, use_overmine_warning);
	_tmp3_ = self->priv->minefield_view;
	minefield_view_set_use_overmine_warning (_tmp3_, use_overmine_warning);
}


static void _gno_mine_pref_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
	gno_mine_pref_response_cb (self, _sender, response_id);
}


static gboolean _gno_mine_pref_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) {
	gboolean result;
	result = gno_mine_pref_delete_event_cb (self, _sender, event);
	return result;
}


static void _gno_mine_use_question_toggle_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	gno_mine_use_question_toggle_cb (self, _sender);
}


static void _gno_mine_use_overmine_toggle_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	gno_mine_use_overmine_toggle_cb (self, _sender);
}


static GtkDialog* gno_mine_create_preferences (GnoMine* self) {
	GtkDialog* result = NULL;
	const gchar* _tmp0_ = NULL;
	GtkWindow* _tmp1_;
	GtkDialog* _tmp2_;
	GtkDialog* dialog;
	GtkBox* _tmp3_ = NULL;
	GtkBox* _tmp4_;
	GtkBox* box;
	GtkGrid* _tmp5_;
	GtkGrid* grid;
	const gchar* _tmp6_ = NULL;
	GtkCheckButton* _tmp7_;
	GtkCheckButton* question_toggle;
	GSettings* _tmp8_;
	gboolean _tmp9_ = FALSE;
	const gchar* _tmp10_ = NULL;
	GtkCheckButton* _tmp11_;
	GtkCheckButton* overmine_toggle;
	GSettings* _tmp12_;
	gboolean _tmp13_ = FALSE;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = _ ("Mines Preferences");
	_tmp1_ = self->priv->window;
	_tmp2_ = (GtkDialog*) gtk_dialog_new_with_buttons (_tmp0_, _tmp1_, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL, NULL);
	g_object_ref_sink (_tmp2_);
	dialog = _tmp2_;
	g_signal_connect_object (dialog, "response", (GCallback) _gno_mine_pref_response_cb_gtk_dialog_response, self, 0);
	g_signal_connect_object ((GtkWidget*) dialog, "delete-event", (GCallback) _gno_mine_pref_delete_event_cb_gtk_widget_delete_event, self, 0);
	gtk_container_set_border_width ((GtkContainer*) dialog, (guint) 5);
	gtk_window_set_resizable ((GtkWindow*) dialog, FALSE);
	_tmp3_ = gtk_dialog_get_content_area (dialog);
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GTK_TYPE_BOX, GtkBox));
	box = _tmp4_;
	_tmp5_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp5_);
	grid = _tmp5_;
	gtk_widget_show ((GtkWidget*) grid);
	gtk_container_set_border_width ((GtkContainer*) grid, (guint) 6);
	gtk_grid_set_row_spacing (grid, (guint) 6);
	gtk_grid_set_column_spacing (grid, (guint) 18);
	gtk_container_add ((GtkContainer*) box, (GtkWidget*) grid);
	_tmp6_ = _ ("_Use \"I'm not sure\" flags");
	_tmp7_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp6_);
	g_object_ref_sink (_tmp7_);
	question_toggle = _tmp7_;
	gtk_widget_show ((GtkWidget*) question_toggle);
	g_signal_connect_object ((GtkToggleButton*) question_toggle, "toggled", (GCallback) _gno_mine_use_question_toggle_cb_gtk_toggle_button_toggled, self, 0);
	_tmp8_ = self->priv->settings;
	_tmp9_ = g_settings_get_boolean (_tmp8_, GNO_MINE_KEY_USE_QUESTION_MARKS);
	gtk_toggle_button_set_active ((GtkToggleButton*) question_toggle, _tmp9_);
	gtk_grid_attach (grid, (GtkWidget*) question_toggle, 0, 0, 1, 1);
	_tmp10_ = _ ("_Warn if too many flags have been placed");
	_tmp11_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp10_);
	g_object_ref_sink (_tmp11_);
	overmine_toggle = _tmp11_;
	gtk_widget_show ((GtkWidget*) overmine_toggle);
	g_signal_connect_object ((GtkToggleButton*) overmine_toggle, "toggled", (GCallback) _gno_mine_use_overmine_toggle_cb_gtk_toggle_button_toggled, self, 0);
	_tmp12_ = self->priv->settings;
	_tmp13_ = g_settings_get_boolean (_tmp12_, GNO_MINE_KEY_USE_OVERMINE_WARNING);
	gtk_toggle_button_set_active ((GtkToggleButton*) overmine_toggle, _tmp13_);
	gtk_grid_attach (grid, (GtkWidget*) overmine_toggle, 0, 1, 1, 1);
	result = dialog;
	_g_object_unref0 (overmine_toggle);
	_g_object_unref0 (question_toggle);
	_g_object_unref0 (grid);
	_g_object_unref0 (box);
	return result;
}


static void gno_mine_set_mode (GnoMine* self, gint mode) {
	gint _tmp0_;
	GSettings* _tmp1_;
	gint _tmp2_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = mode;
	_tmp1_ = self->priv->settings;
	_tmp2_ = g_settings_get_int (_tmp1_, GNO_MINE_KEY_MODE);
	if (_tmp0_ != _tmp2_) {
		GSettings* _tmp3_;
		gint _tmp4_;
		_tmp3_ = self->priv->settings;
		_tmp4_ = mode;
		g_settings_set_int (_tmp3_, GNO_MINE_KEY_MODE, _tmp4_);
	}
	gno_mine_start_game (self);
}


static void gno_mine_small_size_clicked_cb (GnoMine* self) {
	g_return_if_fail (self != NULL);
	gno_mine_set_mode (self, 0);
}


static void gno_mine_medium_size_clicked_cb (GnoMine* self) {
	g_return_if_fail (self != NULL);
	gno_mine_set_mode (self, 1);
}


static void gno_mine_large_size_clicked_cb (GnoMine* self) {
	g_return_if_fail (self != NULL);
	gno_mine_set_mode (self, 2);
}


static void gno_mine_custom_size_clicked_cb (GnoMine* self) {
	g_return_if_fail (self != NULL);
	gno_mine_set_mode (self, 3);
}


static void gno_mine_pref_response_cb (GnoMine* self, GtkDialog* dialog, gint response_id) {
	GtkDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dialog != NULL);
	_tmp0_ = self->priv->pref_dialog;
	gtk_widget_hide ((GtkWidget*) _tmp0_);
}


static gboolean gno_mine_pref_delete_event_cb (GnoMine* self, GtkWidget* widget, GdkEventAny* event) {
	gboolean result = FALSE;
	GtkDialog* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = self->priv->pref_dialog;
	gtk_widget_hide ((GtkWidget*) _tmp0_);
	result = TRUE;
	return result;
}


static void gno_mine_preferences_cb (GnoMine* self) {
	GtkDialog* _tmp0_;
	GtkDialog* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->pref_dialog;
	if (_tmp0_ == NULL) {
		GtkDialog* _tmp1_ = NULL;
		_tmp1_ = gno_mine_create_preferences (self);
		_g_object_unref0 (self->priv->pref_dialog);
		self->priv->pref_dialog = _tmp1_;
	}
	_tmp2_ = self->priv->pref_dialog;
	gtk_window_present ((GtkWindow*) _tmp2_);
}


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


gint gno_mine_main (gchar** args, int args_length1) {
	gint result = 0;
	GOptionContext* _tmp0_;
	GOptionContext* context;
	GOptionContext* _tmp1_;
	GOptionContext* _tmp2_;
	GOptionGroup* _tmp3_ = NULL;
	GnoMine* _tmp8_;
	GnoMine* app;
	GnoMine* _tmp9_;
	gint _tmp10_ = 0;
	GError * _inner_error_ = NULL;
	setlocale (LC_ALL, "");
	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
	games_scores_startup ();
	_tmp0_ = g_option_context_new ("");
	context = _tmp0_;
	_tmp1_ = context;
	g_option_context_set_translation_domain (_tmp1_, GETTEXT_PACKAGE);
	_tmp2_ = context;
	_tmp3_ = gtk_get_option_group (TRUE);
	g_option_context_add_group (_tmp2_, _tmp3_);
	{
		GOptionContext* _tmp4_;
		_tmp4_ = context;
		g_option_context_parse (_tmp4_, &args_length1, &args, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		FILE* _tmp5_;
		GError* _tmp6_;
		const gchar* _tmp7_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp5_ = stderr;
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		fprintf (_tmp5_, "%s\n", _tmp7_);
		result = EXIT_FAILURE;
		_g_error_free0 (e);
		_g_option_context_free0 (context);
		return result;
	}
	__finally1:
	if (_inner_error_ != NULL) {
		_g_option_context_free0 (context);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp8_ = gno_mine_new ();
	app = _tmp8_;
	_tmp9_ = app;
	_tmp10_ = g_application_run ((GApplication*) _tmp9_, 0, NULL);
	result = _tmp10_;
	_g_object_unref0 (app);
	_g_option_context_free0 (context);
	return result;
}


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


static void gno_mine_class_init (GnoMineClass * klass) {
	gno_mine_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GnoMinePrivate));
	G_APPLICATION_CLASS (klass)->startup = gno_mine_real_startup;
	G_APPLICATION_CLASS (klass)->shutdown = gno_mine_real_shutdown;
	G_APPLICATION_CLASS (klass)->activate = gno_mine_real_activate;
	G_OBJECT_CLASS (klass)->finalize = gno_mine_finalize;
}


static void gno_mine_instance_init (GnoMine * self) {
	self->priv = GNO_MINE_GET_PRIVATE (self);
	self->priv->pref_dialog = NULL;
}


static void gno_mine_finalize (GObject* obj) {
	GnoMine * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_GNO_MINE, GnoMine);
	_g_object_unref0 (self->priv->settings);
	_g_object_unref0 (self->priv->face_button);
	_g_object_unref0 (self->priv->win_face_image);
	_g_object_unref0 (self->priv->sad_face_image);
	_g_object_unref0 (self->priv->smile_face_image);
	_g_object_unref0 (self->priv->cool_face_image);
	_g_object_unref0 (self->priv->worried_face_image);
	_g_object_unref0 (self->priv->fullscreen_button);
	_g_object_unref0 (self->priv->pause_button);
	_g_object_unref0 (self->priv->window);
	_minefield_unref0 (self->priv->minefield);
	_g_object_unref0 (self->priv->minefield_view);
	_g_object_unref0 (self->priv->pref_dialog);
	_g_object_unref0 (self->priv->flag_label);
	_g_object_unref0 (self->priv->n_mines_spin);
	_g_object_unref0 (self->priv->clock_label);
	_g_object_unref0 (self->priv->new_game_action);
	_g_object_unref0 (self->priv->repeat_size_action);
	_g_object_unref0 (self->priv->pause_action);
	_g_object_unref0 (self->priv->hint_action);
	_g_object_unref0 (self->priv->new_game_screen);
	_g_object_unref0 (self->priv->custom_game_screen);
	_g_object_unref0 (self->priv->highscores);
	G_OBJECT_CLASS (gno_mine_parent_class)->finalize (obj);
}


GType gno_mine_get_type (void) {
	static volatile gsize gno_mine_type_id__volatile = 0;
	if (g_once_init_enter (&gno_mine_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GnoMineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gno_mine_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnoMine), 0, (GInstanceInitFunc) gno_mine_instance_init, NULL };
		GType gno_mine_type_id;
		gno_mine_type_id = g_type_register_static (GTK_TYPE_APPLICATION, "GnoMine", &g_define_type_info, 0);
		g_once_init_leave (&gno_mine_type_id__volatile, gno_mine_type_id);
	}
	return gno_mine_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);
}



