/* midori-dialog.c generated by valac 0.26.2, the Vala compiler
 * generated from midori-dialog.vala, do not modify */

/*
 Copyright (C) 2011-2013 Christian Dywan <christian@twotoats.de>

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 See the file COPYING for the full license text.
*/

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <gio/gio.h>
#include <gtk/gtk.h>

#define _g_free0(var) (var = (g_free (var), NULL))

#define MIDORI_TEST_TYPE_JOB (midori_test_job_get_type ())
#define MIDORI_TEST_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TEST_TYPE_JOB, MidoriTestJob))
#define MIDORI_TEST_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TEST_TYPE_JOB, MidoriTestJobClass))
#define MIDORI_TEST_IS_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TEST_TYPE_JOB))
#define MIDORI_TEST_IS_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TEST_TYPE_JOB))
#define MIDORI_TEST_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TEST_TYPE_JOB, MidoriTestJobClass))

typedef struct _MidoriTestJob MidoriTestJob;
typedef struct _MidoriTestJobClass MidoriTestJobClass;
typedef struct _MidoriTestJobPrivate MidoriTestJobPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _MidoriTestJobRunWrappedData MidoriTestJobRunWrappedData;
#define _g_main_context_unref0(var) ((var == NULL) ? NULL : (var = (g_main_context_unref (var), NULL)))
typedef struct _Block4Data Block4Data;

#define MIDORI_TYPE_FILE_CHOOSER_DIALOG (midori_file_chooser_dialog_get_type ())
#define MIDORI_FILE_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_FILE_CHOOSER_DIALOG, MidoriFileChooserDialog))
#define MIDORI_FILE_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_FILE_CHOOSER_DIALOG, MidoriFileChooserDialogClass))
#define MIDORI_IS_FILE_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_FILE_CHOOSER_DIALOG))
#define MIDORI_IS_FILE_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_FILE_CHOOSER_DIALOG))
#define MIDORI_FILE_CHOOSER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_FILE_CHOOSER_DIALOG, MidoriFileChooserDialogClass))

typedef struct _MidoriFileChooserDialog MidoriFileChooserDialog;
typedef struct _MidoriFileChooserDialogClass MidoriFileChooserDialogClass;
typedef struct _MidoriFileChooserDialogPrivate MidoriFileChooserDialogPrivate;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _MidoriTestJob {
	GObject parent_instance;
	MidoriTestJobPrivate * priv;
};

struct _MidoriTestJobClass {
	GObjectClass parent_class;
	void (*run) (MidoriTestJob* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*run_finish) (MidoriTestJob* self, GAsyncResult* _res_, GError** error);
};

struct _MidoriTestJobPrivate {
	gboolean done;
};

struct _MidoriTestJobRunWrappedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MidoriTestJob* self;
	GCancellable* cancellable;
	GCancellable* _tmp0_;
	GError* _error_;
	const gchar* _tmp1_;
	GError * _inner_error_;
};

struct _Block4Data {
	int _ref_count_;
	GtkMessageDialog* dialog;
};

struct _MidoriFileChooserDialog {
	GtkFileChooserDialog parent_instance;
	MidoriFileChooserDialogPrivate * priv;
};

struct _MidoriFileChooserDialogClass {
	GtkFileChooserDialogClass parent_class;
};


extern gboolean midori_test_test_idle_timeouts;
extern guint midori_test_test_max_timeout;
guint midori_test_test_max_timeout = (guint) 0;
extern gchar* midori_test_test_first_try;
gchar* midori_test_test_first_try = NULL;
gboolean midori_test_test_idle_timeouts = FALSE;
static gpointer midori_test_job_parent_class = NULL;
extern GtkResponseType midori_test_test_response;
GtkResponseType midori_test_test_response = GTK_RESPONSE_NONE;
extern gchar* midori_test_test_filename;
gchar* midori_test_test_filename = NULL;
static gpointer midori_file_chooser_dialog_parent_class = NULL;

guint midori_timeout_add_seconds (guint interval, GSourceFunc function, void* function_target, GDestroyNotify function_target_destroy_notify);
guint midori_timeout_add (guint interval, GSourceFunc function, void* function_target, GDestroyNotify function_target_destroy_notify);
void midori_test_init (int* args_length1, gchar*** args);
static void __lambda9_ (const gchar* domain, GLogLevelFlags log_levels, const gchar* message);
static void ___lambda9__glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
void midori_test_grab_max_timeout (void);
static gboolean __lambda10_ (void);
static gboolean ___lambda10__gsource_func (gpointer self);
void midori_test_release_max_timeout (void);
void midori_test_idle_timeouts (void);
GType midori_test_job_get_type (void) G_GNUC_CONST;
#define MIDORI_TEST_JOB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MIDORI_TEST_TYPE_JOB, MidoriTestJobPrivate))
enum  {
	MIDORI_TEST_JOB_DUMMY_PROPERTY
};
void midori_test_job_run (MidoriTestJob* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void midori_test_job_run_finish (MidoriTestJob* self, GAsyncResult* _res_, GError** error);
static void midori_test_job_run_wrapped_data_free (gpointer _data);
static void midori_test_job_run_wrapped (MidoriTestJob* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void midori_test_job_run_wrapped_finish (MidoriTestJob* self, GAsyncResult* _res_);
static gboolean midori_test_job_run_wrapped_co (MidoriTestJobRunWrappedData* _data_);
static void midori_test_job_run_wrapped_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void midori_test_job_run_sync (MidoriTestJob* self);
MidoriTestJob* midori_test_job_construct (GType object_type);
static void midori_test_job_finalize (GObject* obj);
void midori_test_log_set_fatal_handler_for_icons (void);
static gboolean __lambda11_ (const gchar* domain, GLogLevelFlags log_levels, const gchar* message);
static gboolean ___lambda11__glog_fatal_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
void midori_test_set_dialog_response (GtkResponseType response);
void midori_test_set_file_chooser_filename (const gchar* filename);
void midori_show_message_dialog (GtkMessageType type, const gchar* _short_, const gchar* detailed, gboolean modal);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static void ___lambda12_ (Block4Data* _data4_, gint response);
static void ____lambda12__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
GType midori_file_chooser_dialog_get_type (void) G_GNUC_CONST;
enum  {
	MIDORI_FILE_CHOOSER_DIALOG_DUMMY_PROPERTY
};
MidoriFileChooserDialog* midori_file_chooser_dialog_new (const gchar* title, GtkWindow* window, GtkFileChooserAction action);
MidoriFileChooserDialog* midori_file_chooser_dialog_construct (GType object_type, const gchar* title, GtkWindow* window, GtkFileChooserAction action);
gint midori_dialog_run (GtkDialog* dialog);


guint midori_timeout_add_seconds (guint interval, GSourceFunc function, void* function_target, GDestroyNotify function_target_destroy_notify) {
	guint result = 0U;
	gboolean _tmp0_ = FALSE;
	guint _tmp3_ = 0U;
	GSourceFunc _tmp4_ = NULL;
	void* _tmp4__target = NULL;
	guint _tmp5_ = 0U;
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = midori_test_test_idle_timeouts;
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp0_) {
#line 165 "midori-dialog.c"
		GSourceFunc _tmp1_ = NULL;
		void* _tmp1__target = NULL;
		guint _tmp2_ = 0U;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp1_ = function;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp1__target = function_target;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp2_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp1_, _tmp1__target, NULL);
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		result = _tmp2_;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		(function_target_destroy_notify == NULL) ? NULL : (function_target_destroy_notify (function_target), NULL);
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		function = NULL;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		function_target = NULL;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		function_target_destroy_notify = NULL;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		return result;
#line 187 "midori-dialog.c"
	}
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp3_ = interval;
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp4_ = function;
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp4__target = function_target;
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp5_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, _tmp3_, _tmp4_, _tmp4__target, NULL);
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	result = _tmp5_;
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	(function_target_destroy_notify == NULL) ? NULL : (function_target_destroy_notify (function_target), NULL);
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	function = NULL;
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	function_target = NULL;
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	function_target_destroy_notify = NULL;
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return result;
#line 209 "midori-dialog.c"
}


guint midori_timeout_add (guint interval, GSourceFunc function, void* function_target, GDestroyNotify function_target_destroy_notify) {
	guint result = 0U;
	gboolean _tmp0_ = FALSE;
	guint _tmp3_ = 0U;
	GSourceFunc _tmp4_ = NULL;
	void* _tmp4__target = NULL;
	guint _tmp5_ = 0U;
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = midori_test_test_idle_timeouts;
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp0_) {
#line 224 "midori-dialog.c"
		GSourceFunc _tmp1_ = NULL;
		void* _tmp1__target = NULL;
		guint _tmp2_ = 0U;
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp1_ = function;
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp1__target = function_target;
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp2_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp1_, _tmp1__target, NULL);
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		result = _tmp2_;
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		(function_target_destroy_notify == NULL) ? NULL : (function_target_destroy_notify (function_target), NULL);
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		function = NULL;
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		function_target = NULL;
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		function_target_destroy_notify = NULL;
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		return result;
#line 246 "midori-dialog.c"
	}
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp3_ = interval;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp4_ = function;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp4__target = function_target;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp5_ = g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, _tmp4_, _tmp4__target, NULL);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	result = _tmp5_;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	(function_target_destroy_notify == NULL) ? NULL : (function_target_destroy_notify (function_target), NULL);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	function = NULL;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	function_target = NULL;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	function_target_destroy_notify = NULL;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return result;
#line 268 "midori-dialog.c"
}


static void __lambda9_ (const gchar* domain, GLogLevelFlags log_levels, const gchar* message) {
	FILE* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_return_if_fail (message != NULL);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = stderr;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp1_ = message;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	fprintf (_tmp0_, "** %s\n", _tmp1_);
#line 283 "midori-dialog.c"
}


static void ___lambda9__glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	__lambda9_ (log_domain, log_levels, message);
#line 290 "midori-dialog.c"
}


void midori_test_init (int* args_length1, gchar*** args) {
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_test_init (args_length1, args, NULL);
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_log_set_handler (NULL, (G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL) | G_LOG_FLAG_RECURSION, ___lambda9__glog_func, NULL);
#line 299 "midori-dialog.c"
}


static gboolean __lambda10_ (void) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	GMainContext* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	FILE* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	GMainContext* _tmp7_ = NULL;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp1_ = g_main_context_default ();
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp2_ = g_main_context_pending (_tmp1_);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp2_) {
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp0_ = " (loop)";
#line 321 "midori-dialog.c"
	} else {
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp0_ = "";
#line 325 "midori-dialog.c"
	}
#line 44 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp3_ = stderr;
#line 44 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp4_ = midori_test_test_first_try;
#line 44 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	fprintf (_tmp3_, "Timed out %s%s\n", _tmp4_, _tmp0_);
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp5_ = midori_test_test_first_try;
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (g_strcmp0 (_tmp5_, "twice") == 0) {
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		exit (0);
#line 339 "midori-dialog.c"
	}
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp6_ = g_strdup ("twice");
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_g_free0 (midori_test_test_first_try);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_test_first_try = _tmp6_;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp7_ = g_main_context_default ();
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_main_context_wakeup (_tmp7_);
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	result = TRUE;
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return result;
#line 355 "midori-dialog.c"
}


static gboolean ___lambda10__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda10_ ();
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return result;
#line 364 "midori-dialog.c"
}


void midori_test_grab_max_timeout (void) {
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gint seconds = 0;
	gint _tmp2_ = 0;
	gchar* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	guint _tmp7_ = 0U;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp1_ = g_getenv ("MIDORI_TIMEOUT");
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = _tmp1_;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp0_ == NULL) {
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp0_ = "42";
#line 385 "midori-dialog.c"
	}
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp2_ = atoi (_tmp0_);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	seconds = _tmp2_;
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp3_ = g_strdup ("once");
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_g_free0 (midori_test_test_first_try);
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_test_first_try = _tmp3_;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp5_ = seconds;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp5_ > 0) {
#line 401 "midori-dialog.c"
		gint _tmp6_ = 0;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp6_ = seconds;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp4_ = _tmp6_ / 2;
#line 407 "midori-dialog.c"
	} else {
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp4_ = 0;
#line 411 "midori-dialog.c"
	}
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp7_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) _tmp4_, ___lambda10__gsource_func, NULL, NULL);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_test_max_timeout = _tmp7_;
#line 417 "midori-dialog.c"
}


void midori_test_release_max_timeout (void) {
	guint _tmp0_ = 0U;
	guint _tmp1_ = 0U;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = midori_test_test_max_timeout;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_vala_assert (_tmp0_ > ((guint) 0), "test_max_timeout > 0");
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp1_ = midori_test_test_max_timeout;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_source_remove (_tmp1_);
#line 56 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_test_max_timeout = (guint) 0;
#line 434 "midori-dialog.c"
}


void midori_test_idle_timeouts (void) {
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_test_idle_timeouts = TRUE;
#line 441 "midori-dialog.c"
}


void midori_test_job_run (MidoriTestJob* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	MIDORI_TEST_JOB_GET_CLASS (self)->run (self, cancellable, _callback_, _user_data_);
#line 448 "midori-dialog.c"
}


void midori_test_job_run_finish (MidoriTestJob* self, GAsyncResult* _res_, GError** error) {
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	MIDORI_TEST_JOB_GET_CLASS (self)->run_finish (self, _res_, error);
#line 455 "midori-dialog.c"
}


static void midori_test_job_run_wrapped_data_free (gpointer _data) {
	MidoriTestJobRunWrappedData* _data_;
	_data_ = _data;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_g_object_unref0 (_data_->cancellable);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_g_object_unref0 (_data_->self);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_slice_free (MidoriTestJobRunWrappedData, _data_);
#line 468 "midori-dialog.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return self ? g_object_ref (self) : NULL;
#line 475 "midori-dialog.c"
}


static void midori_test_job_run_wrapped (MidoriTestJob* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MidoriTestJobRunWrappedData* _data_;
	MidoriTestJob* _tmp0_ = NULL;
	GCancellable* _tmp1_ = NULL;
	GCancellable* _tmp2_ = NULL;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data_ = g_slice_new0 (MidoriTestJobRunWrappedData);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, midori_test_job_run_wrapped);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, midori_test_job_run_wrapped_data_free);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data_->self = _tmp0_;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp1_ = cancellable;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_g_object_unref0 (_data_->cancellable);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data_->cancellable = _tmp2_;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_job_run_wrapped_co (_data_);
#line 504 "midori-dialog.c"
}


static void midori_test_job_run_wrapped_finish (MidoriTestJob* self, GAsyncResult* _res_) {
	MidoriTestJobRunWrappedData* _data_;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 512 "midori-dialog.c"
}


static void midori_test_job_run_wrapped_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MidoriTestJobRunWrappedData* _data_;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data_ = _user_data_;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data_->_source_object_ = source_object;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data_->_res_ = _res_;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_job_run_wrapped_co (_data_);
#line 526 "midori-dialog.c"
}


static gboolean midori_test_job_run_wrapped_co (MidoriTestJobRunWrappedData* _data_) {
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	switch (_data_->_state_) {
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		case 0:
#line 535 "midori-dialog.c"
		goto _state_0;
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		case 1:
#line 539 "midori-dialog.c"
		goto _state_1;
		default:
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		g_assert_not_reached ();
#line 544 "midori-dialog.c"
	}
	_state_0:
	{
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_data_->_tmp0_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_data_->_tmp0_ = _data_->cancellable;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_data_->_state_ = 1;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		midori_test_job_run (_data_->self, _data_->_tmp0_, midori_test_job_run_wrapped_ready, _data_);
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		return FALSE;
#line 558 "midori-dialog.c"
		_state_1:
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		midori_test_job_run_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 564 "midori-dialog.c"
			goto __catch15_g_error;
		}
	}
	goto __finally15;
	__catch15_g_error:
	{
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_data_->_inner_error_ = NULL;
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_data_->_tmp1_ = NULL;
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_data_->_tmp1_ = _data_->_error_->message;
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		g_error ("midori-dialog.vala:71: %s", _data_->_tmp1_);
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_g_error_free0 (_data_->_error_);
#line 583 "midori-dialog.c"
	}
	__finally15:
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		g_clear_error (&_data_->_inner_error_);
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		return FALSE;
#line 594 "midori-dialog.c"
	}
#line 73 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data_->self->priv->done = TRUE;
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_data_->_state_ == 0) {
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 602 "midori-dialog.c"
	} else {
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 606 "midori-dialog.c"
	}
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_object_unref (_data_->_async_result);
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return FALSE;
#line 612 "midori-dialog.c"
}


static gpointer _g_main_context_ref0 (gpointer self) {
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return self ? g_main_context_ref (self) : NULL;
#line 619 "midori-dialog.c"
}


void midori_test_job_run_sync (MidoriTestJob* self) {
	GMainContext* loop = NULL;
	GMainContext* _tmp0_ = NULL;
	GMainContext* _tmp1_ = NULL;
	GCancellable* cancellable = NULL;
	GCancellable* _tmp2_ = NULL;
	GCancellable* _tmp3_ = NULL;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_return_if_fail (self != NULL);
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = g_main_context_default ();
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp1_ = _g_main_context_ref0 (_tmp0_);
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	loop = _tmp1_;
#line 77 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp2_ = g_cancellable_new ();
#line 77 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	cancellable = _tmp2_;
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	self->priv->done = FALSE;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp3_ = cancellable;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_job_run_wrapped (self, _tmp3_, NULL, NULL);
#line 648 "midori-dialog.c"
	{
		gboolean _tmp4_ = FALSE;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp4_ = TRUE;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		while (TRUE) {
#line 655 "midori-dialog.c"
			GMainContext* _tmp6_ = NULL;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			if (!_tmp4_) {
#line 659 "midori-dialog.c"
				gboolean _tmp5_ = FALSE;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
				_tmp5_ = self->priv->done;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
				if (!(!_tmp5_)) {
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
					break;
#line 667 "midori-dialog.c"
				}
			}
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			_tmp4_ = FALSE;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			_tmp6_ = loop;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			g_main_context_iteration (_tmp6_, TRUE);
#line 676 "midori-dialog.c"
		}
	}
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_g_object_unref0 (cancellable);
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_g_main_context_unref0 (loop);
#line 683 "midori-dialog.c"
}


MidoriTestJob* midori_test_job_construct (GType object_type) {
	MidoriTestJob * self = NULL;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	self = (MidoriTestJob*) g_object_new (object_type, NULL);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return self;
#line 693 "midori-dialog.c"
}


static void midori_test_job_class_init (MidoriTestJobClass * klass) {
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_job_parent_class = g_type_class_peek_parent (klass);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_type_class_add_private (klass, sizeof (MidoriTestJobPrivate));
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	G_OBJECT_CLASS (klass)->finalize = midori_test_job_finalize;
#line 704 "midori-dialog.c"
}


static void midori_test_job_instance_init (MidoriTestJob * self) {
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	self->priv = MIDORI_TEST_JOB_GET_PRIVATE (self);
#line 711 "midori-dialog.c"
}


static void midori_test_job_finalize (GObject* obj) {
	MidoriTestJob * self;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_TEST_TYPE_JOB, MidoriTestJob);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	G_OBJECT_CLASS (midori_test_job_parent_class)->finalize (obj);
#line 721 "midori-dialog.c"
}


GType midori_test_job_get_type (void) {
	static volatile gsize midori_test_job_type_id__volatile = 0;
	if (g_once_init_enter (&midori_test_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriTestJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_test_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriTestJob), 0, (GInstanceInitFunc) midori_test_job_instance_init, NULL };
		GType midori_test_job_type_id;
		midori_test_job_type_id = g_type_register_static (G_TYPE_OBJECT, "MidoriTestJob", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&midori_test_job_type_id__volatile, midori_test_job_type_id);
	}
	return midori_test_job_type_id__volatile;
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 1278 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1278 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 753 "midori-dialog.c"
}


static gboolean __lambda11_ (const gchar* domain, GLogLevelFlags log_levels, const gchar* message) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_return_val_if_fail (message != NULL, FALSE);
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp4_ = message;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp5_ = string_contains (_tmp4_, "Error loading theme icon");
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (!_tmp5_) {
#line 773 "midori-dialog.c"
		const gchar* _tmp6_ = NULL;
		gboolean _tmp7_ = FALSE;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp6_ = message;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp7_ = string_contains (_tmp6_, "Could not find the icon");
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp3_ = !_tmp7_;
#line 782 "midori-dialog.c"
	} else {
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp3_ = FALSE;
#line 786 "midori-dialog.c"
	}
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp3_) {
#line 790 "midori-dialog.c"
		const gchar* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp8_ = message;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp9_ = string_contains (_tmp8_, "Junk at end of value");
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp2_ = !_tmp9_;
#line 799 "midori-dialog.c"
	} else {
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp2_ = FALSE;
#line 803 "midori-dialog.c"
	}
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp2_) {
#line 807 "midori-dialog.c"
		const gchar* _tmp10_ = NULL;
		gboolean _tmp11_ = FALSE;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp10_ = message;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp11_ = string_contains (_tmp10_, "gtk_notebook_get_tab_label: assertion `GTK_IS_WIDGET (child)' failed");
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp1_ = !_tmp11_;
#line 816 "midori-dialog.c"
	} else {
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp1_ = FALSE;
#line 820 "midori-dialog.c"
	}
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp1_) {
#line 824 "midori-dialog.c"
		const gchar* _tmp12_ = NULL;
		gboolean _tmp13_ = FALSE;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp12_ = message;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp13_ = string_contains (_tmp12_, "get_column_number: assertion `i < gtk_tree_view_get_n_columns (treevie" \
"w)' failed");
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp0_ = !_tmp13_;
#line 833 "midori-dialog.c"
	} else {
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp0_ = FALSE;
#line 837 "midori-dialog.c"
	}
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	result = _tmp0_;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return result;
#line 843 "midori-dialog.c"
}


static gboolean ___lambda11__glog_fatal_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
	gboolean result;
	result = __lambda11_ (log_domain, log_levels, message);
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return result;
#line 852 "midori-dialog.c"
}


void midori_test_log_set_fatal_handler_for_icons (void) {
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_test_log_set_fatal_handler (___lambda11__glog_fatal_func, NULL);
#line 859 "midori-dialog.c"
}


void midori_test_set_dialog_response (GtkResponseType response) {
	GtkResponseType _tmp0_ = 0;
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = response;
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_test_response = _tmp0_;
#line 869 "midori-dialog.c"
}


void midori_test_set_file_chooser_filename (const gchar* filename) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_return_if_fail (filename != NULL);
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = filename;
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_g_free0 (midori_test_test_filename);
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_test_test_filename = _tmp1_;
#line 886 "midori-dialog.c"
}


static Block4Data* block4_data_ref (Block4Data* _data4_) {
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_atomic_int_inc (&_data4_->_ref_count_);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return _data4_;
#line 895 "midori-dialog.c"
}


static void block4_data_unref (void * _userdata_) {
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_g_object_unref0 (_data4_->dialog);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		g_slice_free (Block4Data, _data4_);
#line 908 "midori-dialog.c"
	}
}


static void ___lambda12_ (Block4Data* _data4_, gint response) {
	GtkMessageDialog* _tmp0_ = NULL;
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = _data4_->dialog;
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	gtk_object_destroy ((GtkObject*) _tmp0_);
#line 919 "midori-dialog.c"
}


static void ____lambda12__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	___lambda12_ (self, response_id);
#line 926 "midori-dialog.c"
}


void midori_show_message_dialog (GtkMessageType type, const gchar* _short_, const gchar* detailed, gboolean modal) {
	Block4Data* _data4_;
	GtkMessageType _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	GtkMessageDialog* _tmp2_ = NULL;
	GtkMessageDialog* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_return_if_fail (_short_ != NULL);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_return_if_fail (detailed != NULL);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data4_ = g_slice_new0 (Block4Data);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data4_->_ref_count_ = 1;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = type;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp1_ = _short_;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp2_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, 0, _tmp0_, GTK_BUTTONS_OK, "%s", _tmp1_);
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_object_ref_sink (_tmp2_);
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data4_->dialog = _tmp2_;
#line 108 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp3_ = _data4_->dialog;
#line 108 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp4_ = detailed;
#line 108 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	gtk_message_dialog_format_secondary_text (_tmp3_, "%s", _tmp4_);
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp5_ = modal;
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp5_) {
#line 966 "midori-dialog.c"
		GtkMessageDialog* _tmp6_ = NULL;
		GtkMessageDialog* _tmp7_ = NULL;
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp6_ = _data4_->dialog;
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		gtk_dialog_run ((GtkDialog*) _tmp6_);
#line 111 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp7_ = _data4_->dialog;
#line 111 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		gtk_object_destroy ((GtkObject*) _tmp7_);
#line 977 "midori-dialog.c"
	} else {
		GtkMessageDialog* _tmp8_ = NULL;
		GtkMessageDialog* _tmp9_ = NULL;
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp8_ = _data4_->dialog;
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		g_signal_connect_data ((GtkDialog*) _tmp8_, "response", (GCallback) ____lambda12__gtk_dialog_response, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0);
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp9_ = _data4_->dialog;
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		gtk_widget_show ((GtkWidget*) _tmp9_);
#line 989 "midori-dialog.c"
	}
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	block4_data_unref (_data4_);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_data4_ = NULL;
#line 995 "midori-dialog.c"
}


MidoriFileChooserDialog* midori_file_chooser_dialog_construct (GType object_type, const gchar* title, GtkWindow* window, GtkFileChooserAction action) {
	MidoriFileChooserDialog * self = NULL;
	const gchar* stock_id = NULL;
	GtkFileChooserAction _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	GtkWindow* _tmp2_ = NULL;
	GtkFileChooserAction _tmp3_ = 0;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_return_val_if_fail (title != NULL, NULL);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	self = (MidoriFileChooserDialog*) g_object_new (object_type, NULL);
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	stock_id = GTK_STOCK_OPEN;
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = action;
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp0_ == GTK_FILE_CHOOSER_ACTION_SAVE) {
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		stock_id = GTK_STOCK_SAVE;
#line 1020 "midori-dialog.c"
	}
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp1_ = title;
#line 127 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	gtk_window_set_title ((GtkWindow*) self, _tmp1_);
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp2_ = window;
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	gtk_window_set_transient_for ((GtkWindow*) self, _tmp2_);
#line 129 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp3_ = action;
#line 129 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	gtk_file_chooser_set_action ((GtkFileChooser*) self, _tmp3_);
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp4_ = stock_id;
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	gtk_dialog_add_buttons ((GtkDialog*) self, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _tmp4_, GTK_RESPONSE_OK, NULL);
#line 132 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp5_ = stock_id;
#line 132 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	gtk_window_set_icon_name ((GtkWindow*) self, _tmp5_);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return self;
#line 1044 "midori-dialog.c"
}


MidoriFileChooserDialog* midori_file_chooser_dialog_new (const gchar* title, GtkWindow* window, GtkFileChooserAction action) {
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return midori_file_chooser_dialog_construct (MIDORI_TYPE_FILE_CHOOSER_DIALOG, title, window, action);
#line 1051 "midori-dialog.c"
}


static void midori_file_chooser_dialog_class_init (MidoriFileChooserDialogClass * klass) {
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	midori_file_chooser_dialog_parent_class = g_type_class_peek_parent (klass);
#line 1058 "midori-dialog.c"
}


static void midori_file_chooser_dialog_instance_init (MidoriFileChooserDialog * self) {
}


GType midori_file_chooser_dialog_get_type (void) {
	static volatile gsize midori_file_chooser_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&midori_file_chooser_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriFileChooserDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_file_chooser_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriFileChooserDialog), 0, (GInstanceInitFunc) midori_file_chooser_dialog_instance_init, NULL };
		GType midori_file_chooser_dialog_type_id;
		midori_file_chooser_dialog_type_id = g_type_register_static (GTK_TYPE_FILE_CHOOSER_DIALOG, "MidoriFileChooserDialog", &g_define_type_info, 0);
		g_once_init_leave (&midori_file_chooser_dialog_type_id__volatile, midori_file_chooser_dialog_type_id);
	}
	return midori_file_chooser_dialog_type_id__volatile;
}


gint midori_dialog_run (GtkDialog* dialog) {
	gint result = 0;
	GtkResponseType _tmp0_ = 0;
	GtkDialog* _tmp7_ = NULL;
	gint _tmp8_ = 0;
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	g_return_val_if_fail (dialog != NULL, 0);
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp0_ = midori_test_test_response;
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	if (_tmp0_ != GTK_RESPONSE_NONE) {
#line 1089 "midori-dialog.c"
		gboolean _tmp1_ = FALSE;
		const gchar* _tmp2_ = NULL;
		GtkResponseType _tmp6_ = 0;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp2_ = midori_test_test_filename;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		if (_tmp2_ != NULL) {
#line 1097 "midori-dialog.c"
			GtkDialog* _tmp3_ = NULL;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			_tmp3_ = dialog;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GTK_TYPE_FILE_CHOOSER);
#line 1103 "midori-dialog.c"
		} else {
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			_tmp1_ = FALSE;
#line 1107 "midori-dialog.c"
		}
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		if (_tmp1_) {
#line 1111 "midori-dialog.c"
			GtkDialog* _tmp4_ = NULL;
			const gchar* _tmp5_ = NULL;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			_tmp4_ = dialog;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			_tmp5_ = midori_test_test_filename;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
			gtk_file_chooser_set_filename (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GTK_TYPE_FILE_CHOOSER) ? ((GtkFileChooser*) _tmp4_) : NULL, _tmp5_);
#line 1120 "midori-dialog.c"
		}
#line 141 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		_tmp6_ = midori_test_test_response;
#line 141 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		result = (gint) _tmp6_;
#line 141 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
		return result;
#line 1128 "midori-dialog.c"
	}
#line 143 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp7_ = dialog;
#line 143 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	_tmp8_ = gtk_dialog_run (_tmp7_);
#line 143 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	result = _tmp8_;
#line 143 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-dialog.vala"
	return result;
#line 1138 "midori-dialog.c"
}



