/* midori-dialog.c generated by valac 0.38.8, 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;
enum  {
	MIDORI_TEST_JOB_0_PROPERTY,
	MIDORI_TEST_JOB_NUM_PROPERTIES
};
static GParamSpec* midori_test_job_properties[MIDORI_TEST_JOB_NUM_PROPERTIES];
#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;
enum  {
	MIDORI_FILE_CHOOSER_DIALOG_0_PROPERTY,
	MIDORI_FILE_CHOOSER_DIALOG_NUM_PROPERTIES
};
static GParamSpec* midori_file_chooser_dialog_properties[MIDORI_FILE_CHOOSER_DIALOG_NUM_PROPERTIES];
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (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_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	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 __lambda10_ (const gchar* domain, GLogLevelFlags log_levels, const gchar* message);
static void ___lambda10__glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
void midori_test_grab_max_timeout (void);
static gboolean __lambda11_ (void);
static gboolean ___lambda11__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))
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_async_ready_wrapper (GObject *source_object, GAsyncResult *res, void *user_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 __lambda12_ (const gchar* domain, GLogLevelFlags log_levels, const gchar* message);
static gboolean ___lambda12__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 ___lambda13_ (Block4Data* _data4_, gint response);
static void ____lambda13__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
GType midori_file_chooser_dialog_get_type (void) G_GNUC_CONST;
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_;
	guint _tmp3_;
	GSourceFunc _tmp4_;
	void* _tmp4__target;
	guint _tmp5_;
#line 15 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp0_ = midori_test_test_idle_timeouts;
#line 15 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_tmp0_) {
#line 175 "midori-dialog.c"
		GSourceFunc _tmp1_;
		void* _tmp1__target;
		guint _tmp2_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp1_ = function;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp1__target = function_target;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		result = _tmp2_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		function = NULL;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		function_target = NULL;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		function_target_destroy_notify = NULL;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		return result;
#line 197 "midori-dialog.c"
	}
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp3_ = interval;
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp4_ = function;
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp4__target = function_target;
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	result = _tmp5_;
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	function = NULL;
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	function_target = NULL;
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	function_target_destroy_notify = NULL;
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	return result;
#line 219 "midori-dialog.c"
}


guint midori_timeout_add (guint interval, GSourceFunc function, void* function_target, GDestroyNotify function_target_destroy_notify) {
	guint result = 0U;
	gboolean _tmp0_;
	guint _tmp3_;
	GSourceFunc _tmp4_;
	void* _tmp4__target;
	guint _tmp5_;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp0_ = midori_test_test_idle_timeouts;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_tmp0_) {
#line 234 "midori-dialog.c"
		GSourceFunc _tmp1_;
		void* _tmp1__target;
		guint _tmp2_;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp1_ = function;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp1__target = function_target;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		result = _tmp2_;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		function = NULL;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		function_target = NULL;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		function_target_destroy_notify = NULL;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		return result;
#line 256 "midori-dialog.c"
	}
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp3_ = interval;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp4_ = function;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp4__target = function_target;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	result = _tmp5_;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	function = NULL;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	function_target = NULL;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	function_target_destroy_notify = NULL;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	return result;
#line 278 "midori-dialog.c"
}


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


static void ___lambda10__glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	__lambda10_ (log_domain, log_levels, message);
#line 300 "midori-dialog.c"
}


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


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


static gboolean ___lambda11__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda11_ ();
#line 43 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	return result;
#line 374 "midori-dialog.c"
}


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


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


void midori_test_idle_timeouts (void) {
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	midori_test_test_idle_timeouts = TRUE;
#line 451 "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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	MIDORI_TEST_JOB_GET_CLASS (self)->run (self, cancellable, _callback_, _user_data_);
#line 458 "midori-dialog.c"
}


void midori_test_job_run_finish (MidoriTestJob* self, GAsyncResult* _res_, GError** error) {
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	MIDORI_TEST_JOB_GET_CLASS (self)->run_finish (self, _res_, error);
#line 465 "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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_g_object_unref0 (_data_->cancellable);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_g_object_unref0 (_data_->self);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_slice_free (MidoriTestJobRunWrappedData, _data_);
#line 478 "midori-dialog.c"
}


static void midori_test_job_run_wrapped_async_ready_wrapper (GObject *source_object, GAsyncResult *res, void *user_data) {
	MidoriTestJobRunWrappedData* _task_data_;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_task_data_ = g_task_get_task_data (G_TASK (res));
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_task_data_->_callback_ != NULL) {
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_task_data_->_callback_ (source_object, res, user_data);
#line 490 "midori-dialog.c"
	}
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_task_data_->_task_complete_ = TRUE;
#line 494 "midori-dialog.c"
}


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


static void midori_test_job_run_wrapped (MidoriTestJob* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MidoriTestJobRunWrappedData* _data_;
	MidoriTestJob* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_ = g_slice_new0 (MidoriTestJobRunWrappedData);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_->_callback_ = _callback_;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, midori_test_job_run_wrapped_async_ready_wrapper, _user_data_);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_callback_ == NULL) {
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_data_->_task_complete_ = TRUE;
#line 520 "midori-dialog.c"
	}
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_task_set_task_data (_data_->_async_result, _data_, midori_test_job_run_wrapped_data_free);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_->self = _tmp0_;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp1_ = cancellable;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_g_object_unref0 (_data_->cancellable);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_->cancellable = _tmp2_;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	midori_test_job_run_wrapped_co (_data_);
#line 538 "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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (NULL == _data_) {
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		return;
#line 550 "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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_ = _user_data_;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_->_source_object_ = source_object;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_->_res_ = _res_;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_->_task_complete_ = TRUE;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	midori_test_job_run_wrapped_co (_data_);
#line 567 "midori-dialog.c"
}


static gboolean midori_test_job_run_wrapped_co (MidoriTestJobRunWrappedData* _data_) {
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	switch (_data_->_state_) {
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		case 0:
#line 576 "midori-dialog.c"
		goto _state_0;
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		case 1:
#line 580 "midori-dialog.c"
		goto _state_1;
		default:
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		g_assert_not_reached ();
#line 585 "midori-dialog.c"
	}
	_state_0:
	{
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_data_->_tmp0_ = _data_->cancellable;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_data_->_state_ = 1;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		return FALSE;
#line 597 "midori-dialog.c"
		_state_1:
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 603 "midori-dialog.c"
			goto __catch15_g_error;
		}
	}
	goto __finally15;
	__catch15_g_error:
	{
#line 68 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 68 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_data_->_inner_error_ = NULL;
#line 71 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_data_->_tmp1_ = _data_->_error_->message;
#line 71 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		g_error ("midori-dialog.vala:71: %s", _data_->_tmp1_);
#line 68 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_g_error_free0 (_data_->_error_);
#line 620 "midori-dialog.c"
	}
	__finally15:
#line 68 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 68 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		g_clear_error (&_data_->_inner_error_);
#line 68 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		g_object_unref (_data_->_async_result);
#line 68 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		return FALSE;
#line 633 "midori-dialog.c"
	}
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data_->self->priv->done = TRUE;
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_data_->_state_ != 0) {
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		while (_data_->_task_complete_ != TRUE) {
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 645 "midori-dialog.c"
		}
	}
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_object_unref (_data_->_async_result);
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	return FALSE;
#line 652 "midori-dialog.c"
}


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


void midori_test_job_run_sync (MidoriTestJob* self) {
	GMainContext* loop = NULL;
	GMainContext* _tmp0_;
	GMainContext* _tmp1_;
	GCancellable* cancellable = NULL;
	GCancellable* _tmp2_;
	GCancellable* _tmp3_;
#line 75 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_return_if_fail (self != NULL);
#line 76 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp0_ = g_main_context_default ();
#line 76 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp1_ = _g_main_context_ref0 (_tmp0_);
#line 76 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	loop = _tmp1_;
#line 77 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp2_ = g_cancellable_new ();
#line 77 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	cancellable = _tmp2_;
#line 78 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	self->priv->done = FALSE;
#line 79 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp3_ = cancellable;
#line 79 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	midori_test_job_run_wrapped (self, _tmp3_, NULL, NULL);
#line 688 "midori-dialog.c"
	{
		gboolean _tmp4_ = FALSE;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp4_ = TRUE;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		while (TRUE) {
#line 695 "midori-dialog.c"
			GMainContext* _tmp6_;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			if (!_tmp4_) {
#line 699 "midori-dialog.c"
				gboolean _tmp5_;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
				_tmp5_ = self->priv->done;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
				if (!(!_tmp5_)) {
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
					break;
#line 707 "midori-dialog.c"
				}
			}
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			_tmp4_ = FALSE;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			_tmp6_ = loop;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			g_main_context_iteration (_tmp6_, TRUE);
#line 716 "midori-dialog.c"
		}
	}
#line 75 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_g_object_unref0 (cancellable);
#line 75 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_g_main_context_unref0 (loop);
#line 723 "midori-dialog.c"
}


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


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


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


static void midori_test_job_finalize (GObject * obj) {
	MidoriTestJob * self;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	G_OBJECT_CLASS (midori_test_job_parent_class)->finalize (obj);
#line 761 "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_;
	gchar* _tmp1_;
#line 1411 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1411 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 793 "midori-dialog.c"
}


static gboolean __lambda12_ (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_;
	gboolean _tmp5_;
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_return_val_if_fail (message != NULL, FALSE);
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp4_ = message;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp5_ = string_contains (_tmp4_, "Error loading theme icon");
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (!_tmp5_) {
#line 813 "midori-dialog.c"
		const gchar* _tmp6_;
		gboolean _tmp7_;
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp6_ = message;
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp7_ = string_contains (_tmp6_, "Could not find the icon");
#line 87 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp3_ = !_tmp7_;
#line 822 "midori-dialog.c"
	} else {
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp3_ = FALSE;
#line 826 "midori-dialog.c"
	}
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_tmp3_) {
#line 830 "midori-dialog.c"
		const gchar* _tmp8_;
		gboolean _tmp9_;
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp8_ = message;
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp9_ = string_contains (_tmp8_, "Junk at end of value");
#line 88 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp2_ = !_tmp9_;
#line 839 "midori-dialog.c"
	} else {
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp2_ = FALSE;
#line 843 "midori-dialog.c"
	}
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_tmp2_) {
#line 847 "midori-dialog.c"
		const gchar* _tmp10_;
		gboolean _tmp11_;
#line 89 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp10_ = message;
#line 89 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp1_ = !_tmp11_;
#line 856 "midori-dialog.c"
	} else {
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp1_ = FALSE;
#line 860 "midori-dialog.c"
	}
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_tmp1_) {
#line 864 "midori-dialog.c"
		const gchar* _tmp12_;
		gboolean _tmp13_;
#line 90 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp12_ = message;
#line 90 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp0_ = !_tmp13_;
#line 873 "midori-dialog.c"
	} else {
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp0_ = FALSE;
#line 877 "midori-dialog.c"
	}
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	result = _tmp0_;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	return result;
#line 883 "midori-dialog.c"
}


static gboolean ___lambda12__glog_fatal_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
	gboolean result;
	result = __lambda12_ (log_domain, log_levels, message);
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	return result;
#line 892 "midori-dialog.c"
}


void midori_test_log_set_fatal_handler_for_icons (void) {
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_test_log_set_fatal_handler (___lambda12__glog_fatal_func, NULL);
#line 899 "midori-dialog.c"
}


void midori_test_set_dialog_response (GtkResponseType response) {
	GtkResponseType _tmp0_;
#line 97 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp0_ = response;
#line 97 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	midori_test_test_response = _tmp0_;
#line 909 "midori-dialog.c"
}


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


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


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


static void ___lambda13_ (Block4Data* _data4_, gint response) {
	GtkMessageDialog* _tmp0_;
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp0_ = _data4_->dialog;
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	gtk_object_destroy ((GtkObject*) _tmp0_);
#line 959 "midori-dialog.c"
}


static void ____lambda13__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	___lambda13_ (self, response_id);
#line 966 "midori-dialog.c"
}


void midori_show_message_dialog (GtkMessageType type, const gchar* _short_, const gchar* detailed, gboolean modal) {
	Block4Data* _data4_;
	GtkMessageType _tmp0_;
	const gchar* _tmp1_;
	GtkMessageDialog* _tmp2_;
	GtkMessageDialog* _tmp3_;
	const gchar* _tmp4_;
	gboolean _tmp5_;
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_return_if_fail (_short_ != NULL);
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_return_if_fail (detailed != NULL);
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data4_ = g_slice_new0 (Block4Data);
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data4_->_ref_count_ = 1;
#line 107 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp0_ = type;
#line 107 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp1_ = _short_;
#line 107 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_object_ref_sink (_tmp2_);
#line 107 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data4_->dialog = _tmp2_;
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp3_ = _data4_->dialog;
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp4_ = detailed;
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	gtk_message_dialog_format_secondary_text (_tmp3_, "%s", _tmp4_);
#line 109 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp5_ = modal;
#line 109 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_tmp5_) {
#line 1006 "midori-dialog.c"
		GtkMessageDialog* _tmp6_;
		GtkMessageDialog* _tmp7_;
#line 110 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp6_ = _data4_->dialog;
#line 110 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		gtk_dialog_run ((GtkDialog*) _tmp6_);
#line 111 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp7_ = _data4_->dialog;
#line 111 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		gtk_object_destroy ((GtkObject*) _tmp7_);
#line 1017 "midori-dialog.c"
	} else {
		GtkMessageDialog* _tmp8_;
		GtkMessageDialog* _tmp9_;
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp8_ = _data4_->dialog;
#line 113 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		g_signal_connect_data ((GtkDialog*) _tmp8_, "response", (GCallback) ____lambda13__gtk_dialog_response, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0);
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp9_ = _data4_->dialog;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		gtk_widget_show ((GtkWidget*) _tmp9_);
#line 1029 "midori-dialog.c"
	}
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	block4_data_unref (_data4_);
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_data4_ = NULL;
#line 1035 "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_;
	const gchar* _tmp1_;
	GtkWindow* _tmp2_;
	GtkFileChooserAction _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
#line 121 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_return_val_if_fail (title != NULL, NULL);
#line 121 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	self = (MidoriFileChooserDialog*) g_object_new (object_type, NULL);
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	stock_id = GTK_STOCK_OPEN;
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp0_ = action;
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_tmp0_ == GTK_FILE_CHOOSER_ACTION_SAVE) {
#line 126 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		stock_id = GTK_STOCK_SAVE;
#line 1060 "midori-dialog.c"
	}
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp1_ = title;
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	gtk_window_set_title ((GtkWindow*) self, _tmp1_);
#line 128 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp2_ = window;
#line 128 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	gtk_window_set_transient_for ((GtkWindow*) self, _tmp2_);
#line 129 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp3_ = action;
#line 129 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	gtk_file_chooser_set_action ((GtkFileChooser*) self, _tmp3_);
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp4_ = stock_id;
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp5_ = stock_id;
#line 132 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	gtk_window_set_icon_name ((GtkWindow*) self, _tmp5_);
#line 121 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	return self;
#line 1084 "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.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	return midori_file_chooser_dialog_construct (MIDORI_TYPE_FILE_CHOOSER_DIALOG, title, window, action);
#line 1091 "midori-dialog.c"
}


static void midori_file_chooser_dialog_class_init (MidoriFileChooserDialogClass * klass) {
#line 120 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	midori_file_chooser_dialog_parent_class = g_type_class_peek_parent (klass);
#line 1098 "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_;
	GtkDialog* _tmp7_;
	gint _tmp8_;
#line 137 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	g_return_val_if_fail (dialog != NULL, 0);
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp0_ = midori_test_test_response;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	if (_tmp0_ != GTK_RESPONSE_NONE) {
#line 1129 "midori-dialog.c"
		gboolean _tmp1_ = FALSE;
		const gchar* _tmp2_;
		GtkResponseType _tmp6_;
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp2_ = midori_test_test_filename;
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		if (_tmp2_ != NULL) {
#line 1137 "midori-dialog.c"
			GtkDialog* _tmp3_;
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			_tmp3_ = dialog;
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GTK_TYPE_FILE_CHOOSER);
#line 1143 "midori-dialog.c"
		} else {
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			_tmp1_ = FALSE;
#line 1147 "midori-dialog.c"
		}
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		if (_tmp1_) {
#line 1151 "midori-dialog.c"
			GtkDialog* _tmp4_;
			const gchar* _tmp5_;
#line 140 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			_tmp4_ = dialog;
#line 140 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			_tmp5_ = midori_test_test_filename;
#line 140 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
			gtk_file_chooser_set_filename (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GTK_TYPE_FILE_CHOOSER) ? ((GtkFileChooser*) _tmp4_) : NULL, _tmp5_);
#line 1160 "midori-dialog.c"
		}
#line 141 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		_tmp6_ = midori_test_test_response;
#line 141 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		result = (gint) _tmp6_;
#line 141 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
		return result;
#line 1168 "midori-dialog.c"
	}
#line 143 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp7_ = dialog;
#line 143 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	_tmp8_ = gtk_dialog_run (_tmp7_);
#line 143 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	result = _tmp8_;
#line 143 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/midori/midori-dialog.vala"
	return result;
#line 1178 "midori-dialog.c"
}



