/* exportable.c generated by valac 0.20.1.64-fa28c, the Vala compiler
 * generated from exportable.vala, do not modify */

/*
 * Seahorse
 *
 * Copyright (C) 2004,2005 Stefan Walter
 * Copyright (C) 2011 Collabora Ltd.
 * Copyright (C) 2012 Stefan Walter
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the
 * Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#include <glib.h>
#include <glib-object.h>
#include "seahorse-internal.h"
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>

typedef struct _Block3Data Block3Data;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block4Data Block4Data;
typedef struct _Block5Data Block5Data;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _Block6Data Block6Data;

struct _Block3Data {
	int _ref_count_;
	GMainLoop* loop;
	GAsyncResult* _result_;
};

struct _Block4Data {
	int _ref_count_;
	GMainLoop* loop;
	GAsyncResult* _result_;
};

struct _Block5Data {
	int _ref_count_;
	GMainLoop* loop;
	GAsyncResult* _result_;
};

struct _Block6Data {
	int _ref_count_;
	GtkFileChooserDialog* chooser;
	GHashTable* filters;
};



static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void ____lambda2_ (Block3Data* _data3_, GObject* obj, GAsyncResult* res);
static void _____lambda2__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static void ___lambda3_ (Block4Data* _data4_, GObject* obj, GAsyncResult* res);
static void ____lambda3__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
static void ____lambda5_ (Block5Data* _data5_, GObject* obj, GAsyncResult* res);
static void _____lambda5__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static gchar* seahorse_exportable_calculate_basename (GFile* file, const gchar* extension);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static void __lambda4_ (Block6Data* _data6_, GObject* obj, GParamSpec* prop);
static void ___lambda4__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);


GList* seahorse_exportable_create_exporters (SeahorseExportable* self, SeahorseExporterType type) {
#line 29 "/data/projects/seahorse/common/exportable.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 29 "/data/projects/seahorse/common/exportable.vala"
	return SEAHORSE_EXPORTABLE_GET_INTERFACE (self)->create_exporters (self, type);
#line 99 "exportable.c"
}


gboolean seahorse_exportable_can_export (GObject* object) {
	gboolean result = FALSE;
	GObject* _tmp0_ = NULL;
#line 31 "/data/projects/seahorse/common/exportable.vala"
	g_return_val_if_fail (object != NULL, FALSE);
#line 32 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = object;
#line 32 "/data/projects/seahorse/common/exportable.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, SEAHORSE_TYPE_EXPORTABLE)) {
#line 112 "exportable.c"
		GObject* _tmp1_ = NULL;
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
#line 33 "/data/projects/seahorse/common/exportable.vala"
		_tmp1_ = object;
#line 33 "/data/projects/seahorse/common/exportable.vala"
		_tmp2_ = seahorse_exportable_get_exportable (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SEAHORSE_TYPE_EXPORTABLE, SeahorseExportable));
#line 33 "/data/projects/seahorse/common/exportable.vala"
		_tmp3_ = _tmp2_;
#line 33 "/data/projects/seahorse/common/exportable.vala"
		result = _tmp3_;
#line 33 "/data/projects/seahorse/common/exportable.vala"
		return result;
#line 126 "exportable.c"
	}
#line 34 "/data/projects/seahorse/common/exportable.vala"
	result = FALSE;
#line 34 "/data/projects/seahorse/common/exportable.vala"
	return result;
#line 132 "exportable.c"
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
#line 37 "/data/projects/seahorse/common/exportable.vala"
	g_atomic_int_inc (&_data3_->_ref_count_);
#line 37 "/data/projects/seahorse/common/exportable.vala"
	return _data3_;
#line 141 "exportable.c"
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
#line 37 "/data/projects/seahorse/common/exportable.vala"
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
#line 37 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (_data3_->_result_);
#line 37 "/data/projects/seahorse/common/exportable.vala"
		_g_main_loop_unref0 (_data3_->loop);
#line 37 "/data/projects/seahorse/common/exportable.vala"
		g_slice_free (Block3Data, _data3_);
#line 156 "exportable.c"
	}
}


static gpointer _g_object_ref0 (gpointer self) {
#line 43 "/data/projects/seahorse/common/exportable.vala"
	return self ? g_object_ref (self) : NULL;
#line 164 "exportable.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 49 "/data/projects/seahorse/common/exportable.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 171 "exportable.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 49 "/data/projects/seahorse/common/exportable.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 49 "/data/projects/seahorse/common/exportable.vala"
	g_list_free (self);
#line 180 "exportable.c"
}


static void ____lambda2_ (Block3Data* _data3_, GObject* obj, GAsyncResult* res) {
	GAsyncResult* _tmp0_ = NULL;
	GAsyncResult* _tmp1_ = NULL;
	GMainLoop* _tmp2_ = NULL;
#line 55 "/data/projects/seahorse/common/exportable.vala"
	g_return_if_fail (res != NULL);
#line 56 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = res;
#line 56 "/data/projects/seahorse/common/exportable.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 56 "/data/projects/seahorse/common/exportable.vala"
	_g_object_unref0 (_data3_->_result_);
#line 56 "/data/projects/seahorse/common/exportable.vala"
	_data3_->_result_ = _tmp1_;
#line 57 "/data/projects/seahorse/common/exportable.vala"
	_tmp2_ = _data3_->loop;
#line 57 "/data/projects/seahorse/common/exportable.vala"
	g_main_loop_quit (_tmp2_);
#line 202 "exportable.c"
}


static void _____lambda2__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 55 "/data/projects/seahorse/common/exportable.vala"
	____lambda2_ (self, source_object, res);
#line 55 "/data/projects/seahorse/common/exportable.vala"
	block3_data_unref (self);
#line 211 "exportable.c"
}


gint seahorse_exportable_export_to_directory_wait (GList* objects, const gchar* directory, GError** error) {
	gint result = 0;
	Block3Data* _data3_;
	GMainLoop* _tmp0_ = NULL;
	gint count = 0;
	GList* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 37 "/data/projects/seahorse/common/exportable.vala"
	g_return_val_if_fail (directory != NULL, 0);
#line 37 "/data/projects/seahorse/common/exportable.vala"
	_data3_ = g_slice_new0 (Block3Data);
#line 37 "/data/projects/seahorse/common/exportable.vala"
	_data3_->_ref_count_ = 1;
#line 39 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 39 "/data/projects/seahorse/common/exportable.vala"
	_data3_->loop = _tmp0_;
#line 40 "/data/projects/seahorse/common/exportable.vala"
	_data3_->_result_ = NULL;
#line 41 "/data/projects/seahorse/common/exportable.vala"
	count = 0;
#line 43 "/data/projects/seahorse/common/exportable.vala"
	_tmp1_ = objects;
#line 238 "exportable.c"
	{
		GList* object_collection = NULL;
		GList* object_it = NULL;
#line 43 "/data/projects/seahorse/common/exportable.vala"
		object_collection = _tmp1_;
#line 43 "/data/projects/seahorse/common/exportable.vala"
		for (object_it = object_collection; object_it != NULL; object_it = object_it->next) {
#line 246 "exportable.c"
			GObject* _tmp2_ = NULL;
			GObject* object = NULL;
#line 43 "/data/projects/seahorse/common/exportable.vala"
			_tmp2_ = _g_object_ref0 ((GObject*) object_it->data);
#line 43 "/data/projects/seahorse/common/exportable.vala"
			object = _tmp2_;
#line 253 "exportable.c"
			{
				GObject* _tmp3_ = NULL;
				gboolean _tmp4_ = FALSE;
				GList* exporters = NULL;
				GObject* _tmp5_ = NULL;
				GList* _tmp6_ = NULL;
				GList* _tmp7_ = NULL;
				SeahorseExporter* exporter = NULL;
				GList* _tmp8_ = NULL;
				gconstpointer _tmp9_ = NULL;
				SeahorseExporter* _tmp10_ = NULL;
				gchar* filename = NULL;
				const gchar* _tmp11_ = NULL;
				SeahorseExporter* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
				gchar* _tmp14_ = NULL;
				gchar* _tmp15_ = NULL;
				gchar* _tmp16_ = NULL;
				gchar* _tmp17_ = NULL;
				GFile* file = NULL;
				const gchar* _tmp18_ = NULL;
				GFile* _tmp19_ = NULL;
				SeahorseExporter* _tmp20_ = NULL;
				GFile* _tmp21_ = NULL;
				GMainLoop* _tmp22_ = NULL;
				SeahorseExporter* _tmp23_ = NULL;
				GAsyncResult* _tmp24_ = NULL;
				gint _tmp25_ = 0;
#line 44 "/data/projects/seahorse/common/exportable.vala"
				_tmp3_ = object;
#line 44 "/data/projects/seahorse/common/exportable.vala"
				_tmp4_ = seahorse_exportable_can_export (_tmp3_);
#line 44 "/data/projects/seahorse/common/exportable.vala"
				if (!_tmp4_) {
#line 45 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (object);
#line 45 "/data/projects/seahorse/common/exportable.vala"
					continue;
#line 292 "exportable.c"
				}
#line 47 "/data/projects/seahorse/common/exportable.vala"
				_tmp5_ = object;
#line 47 "/data/projects/seahorse/common/exportable.vala"
				_tmp6_ = seahorse_exportable_create_exporters (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SEAHORSE_TYPE_EXPORTABLE, SeahorseExportable), SEAHORSE_EXPORTER_TYPE_ANY);
#line 47 "/data/projects/seahorse/common/exportable.vala"
				exporters = _tmp6_;
#line 48 "/data/projects/seahorse/common/exportable.vala"
				_tmp7_ = exporters;
#line 48 "/data/projects/seahorse/common/exportable.vala"
				if (_tmp7_ == NULL) {
#line 49 "/data/projects/seahorse/common/exportable.vala"
					__g_list_free__g_object_unref0_0 (exporters);
#line 49 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (object);
#line 49 "/data/projects/seahorse/common/exportable.vala"
					continue;
#line 310 "exportable.c"
				}
#line 51 "/data/projects/seahorse/common/exportable.vala"
				_tmp8_ = exporters;
#line 51 "/data/projects/seahorse/common/exportable.vala"
				_tmp9_ = _tmp8_->data;
#line 51 "/data/projects/seahorse/common/exportable.vala"
				_tmp10_ = _g_object_ref0 ((SeahorseExporter*) _tmp9_);
#line 51 "/data/projects/seahorse/common/exportable.vala"
				exporter = _tmp10_;
#line 52 "/data/projects/seahorse/common/exportable.vala"
				_tmp11_ = directory;
#line 52 "/data/projects/seahorse/common/exportable.vala"
				_tmp12_ = exporter;
#line 52 "/data/projects/seahorse/common/exportable.vala"
				_tmp13_ = seahorse_exporter_get_filename (_tmp12_);
#line 52 "/data/projects/seahorse/common/exportable.vala"
				_tmp14_ = _tmp13_;
#line 52 "/data/projects/seahorse/common/exportable.vala"
				_tmp15_ = _tmp14_;
#line 52 "/data/projects/seahorse/common/exportable.vala"
				_tmp16_ = g_build_filename (_tmp11_, _tmp15_, NULL, NULL);
#line 52 "/data/projects/seahorse/common/exportable.vala"
				_tmp17_ = _tmp16_;
#line 52 "/data/projects/seahorse/common/exportable.vala"
				_g_free0 (_tmp15_);
#line 52 "/data/projects/seahorse/common/exportable.vala"
				filename = _tmp17_;
#line 53 "/data/projects/seahorse/common/exportable.vala"
				_tmp18_ = filename;
#line 53 "/data/projects/seahorse/common/exportable.vala"
				_tmp19_ = g_file_new_for_uri (_tmp18_);
#line 53 "/data/projects/seahorse/common/exportable.vala"
				file = _tmp19_;
#line 55 "/data/projects/seahorse/common/exportable.vala"
				_tmp20_ = exporter;
#line 55 "/data/projects/seahorse/common/exportable.vala"
				_tmp21_ = file;
#line 55 "/data/projects/seahorse/common/exportable.vala"
				seahorse_exporter_export_to_file (_tmp20_, _tmp21_, FALSE, NULL, _____lambda2__gasync_ready_callback, block3_data_ref (_data3_));
#line 60 "/data/projects/seahorse/common/exportable.vala"
				_tmp22_ = _data3_->loop;
#line 60 "/data/projects/seahorse/common/exportable.vala"
				g_main_loop_run (_tmp22_);
#line 62 "/data/projects/seahorse/common/exportable.vala"
				_tmp23_ = exporter;
#line 62 "/data/projects/seahorse/common/exportable.vala"
				_tmp24_ = _data3_->_result_;
#line 62 "/data/projects/seahorse/common/exportable.vala"
				seahorse_exporter_export_to_file_finish (_tmp23_, _tmp24_, &_inner_error_);
#line 62 "/data/projects/seahorse/common/exportable.vala"
				if (_inner_error_ != NULL) {
#line 62 "/data/projects/seahorse/common/exportable.vala"
					g_propagate_error (error, _inner_error_);
#line 62 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (file);
#line 62 "/data/projects/seahorse/common/exportable.vala"
					_g_free0 (filename);
#line 62 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (exporter);
#line 62 "/data/projects/seahorse/common/exportable.vala"
					__g_list_free__g_object_unref0_0 (exporters);
#line 62 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (object);
#line 62 "/data/projects/seahorse/common/exportable.vala"
					block3_data_unref (_data3_);
#line 62 "/data/projects/seahorse/common/exportable.vala"
					_data3_ = NULL;
#line 62 "/data/projects/seahorse/common/exportable.vala"
					return 0;
#line 380 "exportable.c"
				}
#line 64 "/data/projects/seahorse/common/exportable.vala"
				_tmp25_ = count;
#line 64 "/data/projects/seahorse/common/exportable.vala"
				count = _tmp25_ + 1;
#line 43 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (file);
#line 43 "/data/projects/seahorse/common/exportable.vala"
				_g_free0 (filename);
#line 43 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (exporter);
#line 43 "/data/projects/seahorse/common/exportable.vala"
				__g_list_free__g_object_unref0_0 (exporters);
#line 43 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (object);
#line 396 "exportable.c"
			}
		}
	}
#line 67 "/data/projects/seahorse/common/exportable.vala"
	result = count;
#line 67 "/data/projects/seahorse/common/exportable.vala"
	block3_data_unref (_data3_);
#line 67 "/data/projects/seahorse/common/exportable.vala"
	_data3_ = NULL;
#line 67 "/data/projects/seahorse/common/exportable.vala"
	return result;
#line 408 "exportable.c"
}


static Block4Data* block4_data_ref (Block4Data* _data4_) {
#line 100 "/data/projects/seahorse/common/exportable.vala"
	g_atomic_int_inc (&_data4_->_ref_count_);
#line 100 "/data/projects/seahorse/common/exportable.vala"
	return _data4_;
#line 417 "exportable.c"
}


static void block4_data_unref (void * _userdata_) {
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
#line 100 "/data/projects/seahorse/common/exportable.vala"
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
#line 100 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (_data4_->_result_);
#line 100 "/data/projects/seahorse/common/exportable.vala"
		_g_main_loop_unref0 (_data4_->loop);
#line 100 "/data/projects/seahorse/common/exportable.vala"
		g_slice_free (Block4Data, _data4_);
#line 432 "exportable.c"
	}
}


static void ___lambda3_ (Block4Data* _data4_, GObject* obj, GAsyncResult* res) {
	GAsyncResult* _tmp0_ = NULL;
	GAsyncResult* _tmp1_ = NULL;
	GMainLoop* _tmp2_ = NULL;
#line 104 "/data/projects/seahorse/common/exportable.vala"
	g_return_if_fail (res != NULL);
#line 105 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = res;
#line 105 "/data/projects/seahorse/common/exportable.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 105 "/data/projects/seahorse/common/exportable.vala"
	_g_object_unref0 (_data4_->_result_);
#line 105 "/data/projects/seahorse/common/exportable.vala"
	_data4_->_result_ = _tmp1_;
#line 106 "/data/projects/seahorse/common/exportable.vala"
	_tmp2_ = _data4_->loop;
#line 106 "/data/projects/seahorse/common/exportable.vala"
	g_main_loop_quit (_tmp2_);
#line 455 "exportable.c"
}


static void ____lambda3__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 104 "/data/projects/seahorse/common/exportable.vala"
	___lambda3_ (self, source_object, res);
#line 104 "/data/projects/seahorse/common/exportable.vala"
	block4_data_unref (self);
#line 464 "exportable.c"
}


guint seahorse_exportable_export_to_text_wait (GList* objects, guint8** output, size_t* output_length1, GError** error) {
	guint8* _vala_output = NULL;
	int _vala_output_length1 = 0;
	guint result = 0U;
	GList* exporters = NULL;
	GList* _tmp0_ = NULL;
	SeahorseExporter* chosen = NULL;
	guint total = 0U;
	GList* _tmp11_ = NULL;
	SeahorseExporter* _tmp21_ = NULL;
	guint8* _tmp30_ = NULL;
	GError * _inner_error_ = NULL;
#line 72 "/data/projects/seahorse/common/exportable.vala"
	exporters = NULL;
#line 74 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = objects;
#line 484 "exportable.c"
	{
		GList* object_collection = NULL;
		GList* object_it = NULL;
#line 74 "/data/projects/seahorse/common/exportable.vala"
		object_collection = _tmp0_;
#line 74 "/data/projects/seahorse/common/exportable.vala"
		for (object_it = object_collection; object_it != NULL; object_it = object_it->next) {
#line 492 "exportable.c"
			GObject* _tmp1_ = NULL;
			GObject* object = NULL;
#line 74 "/data/projects/seahorse/common/exportable.vala"
			_tmp1_ = _g_object_ref0 ((GObject*) object_it->data);
#line 74 "/data/projects/seahorse/common/exportable.vala"
			object = _tmp1_;
#line 499 "exportable.c"
			{
				GObject* _tmp2_ = NULL;
				gboolean _tmp3_ = FALSE;
				GList* _tmp4_ = NULL;
#line 75 "/data/projects/seahorse/common/exportable.vala"
				_tmp2_ = object;
#line 75 "/data/projects/seahorse/common/exportable.vala"
				_tmp3_ = seahorse_exportable_can_export (_tmp2_);
#line 75 "/data/projects/seahorse/common/exportable.vala"
				if (!_tmp3_) {
#line 76 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (object);
#line 76 "/data/projects/seahorse/common/exportable.vala"
					continue;
#line 514 "exportable.c"
				}
#line 79 "/data/projects/seahorse/common/exportable.vala"
				_tmp4_ = exporters;
#line 79 "/data/projects/seahorse/common/exportable.vala"
				if (_tmp4_ != NULL) {
#line 520 "exportable.c"
					GList* _tmp5_ = NULL;
#line 80 "/data/projects/seahorse/common/exportable.vala"
					_tmp5_ = exporters;
#line 524 "exportable.c"
					{
						GList* exporter_collection = NULL;
						GList* exporter_it = NULL;
#line 80 "/data/projects/seahorse/common/exportable.vala"
						exporter_collection = _tmp5_;
#line 80 "/data/projects/seahorse/common/exportable.vala"
						for (exporter_it = exporter_collection; exporter_it != NULL; exporter_it = exporter_it->next) {
#line 532 "exportable.c"
							SeahorseExporter* _tmp6_ = NULL;
							SeahorseExporter* exporter = NULL;
#line 80 "/data/projects/seahorse/common/exportable.vala"
							_tmp6_ = _g_object_ref0 ((SeahorseExporter*) exporter_it->data);
#line 80 "/data/projects/seahorse/common/exportable.vala"
							exporter = _tmp6_;
#line 539 "exportable.c"
							{
								SeahorseExporter* _tmp7_ = NULL;
								GObject* _tmp8_ = NULL;
#line 81 "/data/projects/seahorse/common/exportable.vala"
								_tmp7_ = exporter;
#line 81 "/data/projects/seahorse/common/exportable.vala"
								_tmp8_ = object;
#line 81 "/data/projects/seahorse/common/exportable.vala"
								seahorse_exporter_add_object (_tmp7_, _tmp8_);
#line 80 "/data/projects/seahorse/common/exportable.vala"
								_g_object_unref0 (exporter);
#line 551 "exportable.c"
							}
						}
					}
				} else {
					GObject* _tmp9_ = NULL;
					GList* _tmp10_ = NULL;
#line 85 "/data/projects/seahorse/common/exportable.vala"
					_tmp9_ = object;
#line 85 "/data/projects/seahorse/common/exportable.vala"
					_tmp10_ = seahorse_exportable_create_exporters (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, SEAHORSE_TYPE_EXPORTABLE, SeahorseExportable), SEAHORSE_EXPORTER_TYPE_TEXTUAL);
#line 85 "/data/projects/seahorse/common/exportable.vala"
					__g_list_free__g_object_unref0_0 (exporters);
#line 85 "/data/projects/seahorse/common/exportable.vala"
					exporters = _tmp10_;
#line 566 "exportable.c"
				}
#line 74 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (object);
#line 570 "exportable.c"
			}
		}
	}
#line 90 "/data/projects/seahorse/common/exportable.vala"
	chosen = NULL;
#line 91 "/data/projects/seahorse/common/exportable.vala"
	total = (guint) 0;
#line 92 "/data/projects/seahorse/common/exportable.vala"
	_tmp11_ = exporters;
#line 580 "exportable.c"
	{
		GList* exporter_collection = NULL;
		GList* exporter_it = NULL;
#line 92 "/data/projects/seahorse/common/exportable.vala"
		exporter_collection = _tmp11_;
#line 92 "/data/projects/seahorse/common/exportable.vala"
		for (exporter_it = exporter_collection; exporter_it != NULL; exporter_it = exporter_it->next) {
#line 588 "exportable.c"
			SeahorseExporter* _tmp12_ = NULL;
			SeahorseExporter* exporter = NULL;
#line 92 "/data/projects/seahorse/common/exportable.vala"
			_tmp12_ = _g_object_ref0 ((SeahorseExporter*) exporter_it->data);
#line 92 "/data/projects/seahorse/common/exportable.vala"
			exporter = _tmp12_;
#line 595 "exportable.c"
			{
				guint count = 0U;
				SeahorseExporter* _tmp13_ = NULL;
				GList* _tmp14_ = NULL;
				guint _tmp15_ = 0U;
				guint _tmp16_ = 0U;
				guint _tmp17_ = 0U;
#line 93 "/data/projects/seahorse/common/exportable.vala"
				_tmp13_ = exporter;
#line 93 "/data/projects/seahorse/common/exportable.vala"
				_tmp14_ = seahorse_exporter_get_objects (_tmp13_);
#line 93 "/data/projects/seahorse/common/exportable.vala"
				_tmp15_ = g_list_length (_tmp14_);
#line 93 "/data/projects/seahorse/common/exportable.vala"
				count = _tmp15_;
#line 94 "/data/projects/seahorse/common/exportable.vala"
				_tmp16_ = count;
#line 94 "/data/projects/seahorse/common/exportable.vala"
				_tmp17_ = total;
#line 94 "/data/projects/seahorse/common/exportable.vala"
				if (_tmp16_ > _tmp17_) {
#line 617 "exportable.c"
					guint _tmp18_ = 0U;
					SeahorseExporter* _tmp19_ = NULL;
					SeahorseExporter* _tmp20_ = NULL;
#line 95 "/data/projects/seahorse/common/exportable.vala"
					_tmp18_ = count;
#line 95 "/data/projects/seahorse/common/exportable.vala"
					total = _tmp18_;
#line 96 "/data/projects/seahorse/common/exportable.vala"
					_tmp19_ = exporter;
#line 96 "/data/projects/seahorse/common/exportable.vala"
					_tmp20_ = _g_object_ref0 (_tmp19_);
#line 96 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (chosen);
#line 96 "/data/projects/seahorse/common/exportable.vala"
					chosen = _tmp20_;
#line 633 "exportable.c"
				}
#line 92 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (exporter);
#line 637 "exportable.c"
			}
		}
	}
#line 100 "/data/projects/seahorse/common/exportable.vala"
	_tmp21_ = chosen;
#line 100 "/data/projects/seahorse/common/exportable.vala"
	if (_tmp21_ != NULL) {
#line 645 "exportable.c"
		Block4Data* _data4_;
		GMainLoop* _tmp22_ = NULL;
		SeahorseExporter* _tmp23_ = NULL;
		GMainLoop* _tmp24_ = NULL;
		guint8* _tmp25_ = NULL;
		SeahorseExporter* _tmp26_ = NULL;
		GAsyncResult* _tmp27_ = NULL;
		size_t _tmp28_;
		guint8* _tmp29_ = NULL;
		gint _tmp25__length1 = 0;
		gint __tmp25__size_ = 0;
#line 100 "/data/projects/seahorse/common/exportable.vala"
		_data4_ = g_slice_new0 (Block4Data);
#line 100 "/data/projects/seahorse/common/exportable.vala"
		_data4_->_ref_count_ = 1;
#line 101 "/data/projects/seahorse/common/exportable.vala"
		_tmp22_ = g_main_loop_new (NULL, FALSE);
#line 101 "/data/projects/seahorse/common/exportable.vala"
		_data4_->loop = _tmp22_;
#line 102 "/data/projects/seahorse/common/exportable.vala"
		_data4_->_result_ = NULL;
#line 104 "/data/projects/seahorse/common/exportable.vala"
		_tmp23_ = chosen;
#line 104 "/data/projects/seahorse/common/exportable.vala"
		seahorse_exporter_export (_tmp23_, NULL, ____lambda3__gasync_ready_callback, block4_data_ref (_data4_));
#line 109 "/data/projects/seahorse/common/exportable.vala"
		_tmp24_ = _data4_->loop;
#line 109 "/data/projects/seahorse/common/exportable.vala"
		g_main_loop_run (_tmp24_);
#line 111 "/data/projects/seahorse/common/exportable.vala"
		_tmp26_ = chosen;
#line 111 "/data/projects/seahorse/common/exportable.vala"
		_tmp27_ = _data4_->_result_;
#line 111 "/data/projects/seahorse/common/exportable.vala"
		_tmp29_ = seahorse_exporter_export_finish (_tmp26_, _tmp27_, &_tmp28_, &_inner_error_);
#line 111 "/data/projects/seahorse/common/exportable.vala"
		_tmp25_ = _tmp29_;
#line 111 "/data/projects/seahorse/common/exportable.vala"
		_tmp25__length1 = _tmp28_;
#line 111 "/data/projects/seahorse/common/exportable.vala"
		__tmp25__size_ = _tmp25__length1;
#line 111 "/data/projects/seahorse/common/exportable.vala"
		if (_inner_error_ != NULL) {
#line 111 "/data/projects/seahorse/common/exportable.vala"
			g_propagate_error (error, _inner_error_);
#line 111 "/data/projects/seahorse/common/exportable.vala"
			block4_data_unref (_data4_);
#line 111 "/data/projects/seahorse/common/exportable.vala"
			_data4_ = NULL;
#line 111 "/data/projects/seahorse/common/exportable.vala"
			_g_object_unref0 (chosen);
#line 111 "/data/projects/seahorse/common/exportable.vala"
			__g_list_free__g_object_unref0_0 (exporters);
#line 111 "/data/projects/seahorse/common/exportable.vala"
			return 0U;
#line 701 "exportable.c"
		}
#line 111 "/data/projects/seahorse/common/exportable.vala"
		_vala_output = (g_free (_vala_output), NULL);
#line 111 "/data/projects/seahorse/common/exportable.vala"
		_vala_output = _tmp25_;
#line 111 "/data/projects/seahorse/common/exportable.vala"
		_vala_output_length1 = _tmp25__length1;
#line 112 "/data/projects/seahorse/common/exportable.vala"
		result = total;
#line 112 "/data/projects/seahorse/common/exportable.vala"
		block4_data_unref (_data4_);
#line 112 "/data/projects/seahorse/common/exportable.vala"
		_data4_ = NULL;
#line 112 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (chosen);
#line 112 "/data/projects/seahorse/common/exportable.vala"
		__g_list_free__g_object_unref0_0 (exporters);
#line 112 "/data/projects/seahorse/common/exportable.vala"
		if (output) {
#line 112 "/data/projects/seahorse/common/exportable.vala"
			*output = _vala_output;
#line 723 "exportable.c"
		} else {
#line 112 "/data/projects/seahorse/common/exportable.vala"
			_vala_output = (g_free (_vala_output), NULL);
#line 727 "exportable.c"
		}
#line 112 "/data/projects/seahorse/common/exportable.vala"
		if (output_length1) {
#line 112 "/data/projects/seahorse/common/exportable.vala"
			*output_length1 = _vala_output_length1;
#line 733 "exportable.c"
		}
#line 112 "/data/projects/seahorse/common/exportable.vala"
		return result;
#line 737 "exportable.c"
	}
#line 115 "/data/projects/seahorse/common/exportable.vala"
	_tmp30_ = g_new0 (guint8, 0);
#line 115 "/data/projects/seahorse/common/exportable.vala"
	_vala_output = (g_free (_vala_output), NULL);
#line 115 "/data/projects/seahorse/common/exportable.vala"
	_vala_output = _tmp30_;
#line 115 "/data/projects/seahorse/common/exportable.vala"
	_vala_output_length1 = 0;
#line 116 "/data/projects/seahorse/common/exportable.vala"
	result = (guint) 0;
#line 116 "/data/projects/seahorse/common/exportable.vala"
	_g_object_unref0 (chosen);
#line 116 "/data/projects/seahorse/common/exportable.vala"
	__g_list_free__g_object_unref0_0 (exporters);
#line 116 "/data/projects/seahorse/common/exportable.vala"
	if (output) {
#line 116 "/data/projects/seahorse/common/exportable.vala"
		*output = _vala_output;
#line 757 "exportable.c"
	} else {
#line 116 "/data/projects/seahorse/common/exportable.vala"
		_vala_output = (g_free (_vala_output), NULL);
#line 761 "exportable.c"
	}
#line 116 "/data/projects/seahorse/common/exportable.vala"
	if (output_length1) {
#line 116 "/data/projects/seahorse/common/exportable.vala"
		*output_length1 = _vala_output_length1;
#line 767 "exportable.c"
	}
#line 116 "/data/projects/seahorse/common/exportable.vala"
	return result;
#line 771 "exportable.c"
}


static Block5Data* block5_data_ref (Block5Data* _data5_) {
#line 127 "/data/projects/seahorse/common/exportable.vala"
	g_atomic_int_inc (&_data5_->_ref_count_);
#line 127 "/data/projects/seahorse/common/exportable.vala"
	return _data5_;
#line 780 "exportable.c"
}


static void block5_data_unref (void * _userdata_) {
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
#line 127 "/data/projects/seahorse/common/exportable.vala"
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
#line 127 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (_data5_->_result_);
#line 127 "/data/projects/seahorse/common/exportable.vala"
		_g_main_loop_unref0 (_data5_->loop);
#line 127 "/data/projects/seahorse/common/exportable.vala"
		g_slice_free (Block5Data, _data5_);
#line 795 "exportable.c"
	}
}


static void ____lambda5_ (Block5Data* _data5_, GObject* obj, GAsyncResult* res) {
	GAsyncResult* _tmp0_ = NULL;
	GAsyncResult* _tmp1_ = NULL;
	GMainLoop* _tmp2_ = NULL;
#line 162 "/data/projects/seahorse/common/exportable.vala"
	g_return_if_fail (res != NULL);
#line 163 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = res;
#line 163 "/data/projects/seahorse/common/exportable.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 163 "/data/projects/seahorse/common/exportable.vala"
	_g_object_unref0 (_data5_->_result_);
#line 163 "/data/projects/seahorse/common/exportable.vala"
	_data5_->_result_ = _tmp1_;
#line 164 "/data/projects/seahorse/common/exportable.vala"
	_tmp2_ = _data5_->loop;
#line 164 "/data/projects/seahorse/common/exportable.vala"
	g_main_loop_quit (_tmp2_);
#line 818 "exportable.c"
}


static void _____lambda5__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 162 "/data/projects/seahorse/common/exportable.vala"
	____lambda5_ (self, source_object, res);
#line 162 "/data/projects/seahorse/common/exportable.vala"
	block5_data_unref (self);
#line 827 "exportable.c"
}


gint seahorse_exportable_export_to_prompt_wait (GList* objects, GtkWindow* parent, GError** error) {
	gint result = 0;
	gint count = 0;
	GHashTable* pending = NULL;
	GHashFunc _tmp0_ = NULL;
	GEqualFunc _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
	GList* _tmp7_ = NULL;
	GError * _inner_error_ = NULL;
#line 121 "/data/projects/seahorse/common/exportable.vala"
	count = 0;
#line 123 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = g_direct_hash;
#line 123 "/data/projects/seahorse/common/exportable.vala"
	_tmp1_ = g_direct_equal;
#line 123 "/data/projects/seahorse/common/exportable.vala"
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, NULL, NULL);
#line 123 "/data/projects/seahorse/common/exportable.vala"
	pending = _tmp2_;
#line 124 "/data/projects/seahorse/common/exportable.vala"
	_tmp3_ = objects;
#line 853 "exportable.c"
	{
		GList* object_collection = NULL;
		GList* object_it = NULL;
#line 124 "/data/projects/seahorse/common/exportable.vala"
		object_collection = _tmp3_;
#line 124 "/data/projects/seahorse/common/exportable.vala"
		for (object_it = object_collection; object_it != NULL; object_it = object_it->next) {
#line 861 "exportable.c"
			GObject* _tmp4_ = NULL;
			GObject* object = NULL;
#line 124 "/data/projects/seahorse/common/exportable.vala"
			_tmp4_ = _g_object_ref0 ((GObject*) object_it->data);
#line 124 "/data/projects/seahorse/common/exportable.vala"
			object = _tmp4_;
#line 868 "exportable.c"
			{
				GHashTable* _tmp5_ = NULL;
				GObject* _tmp6_ = NULL;
#line 125 "/data/projects/seahorse/common/exportable.vala"
				_tmp5_ = pending;
#line 125 "/data/projects/seahorse/common/exportable.vala"
				_tmp6_ = object;
#line 125 "/data/projects/seahorse/common/exportable.vala"
				g_hash_table_add (_tmp5_, _tmp6_);
#line 124 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (object);
#line 880 "exportable.c"
			}
		}
	}
#line 127 "/data/projects/seahorse/common/exportable.vala"
	_tmp7_ = objects;
#line 886 "exportable.c"
	{
		GList* object_collection = NULL;
		GList* object_it = NULL;
#line 127 "/data/projects/seahorse/common/exportable.vala"
		object_collection = _tmp7_;
#line 127 "/data/projects/seahorse/common/exportable.vala"
		for (object_it = object_collection; object_it != NULL; object_it = object_it->next) {
#line 894 "exportable.c"
			GObject* _tmp8_ = NULL;
			GObject* object = NULL;
#line 127 "/data/projects/seahorse/common/exportable.vala"
			_tmp8_ = _g_object_ref0 ((GObject*) object_it->data);
#line 127 "/data/projects/seahorse/common/exportable.vala"
			object = _tmp8_;
#line 901 "exportable.c"
			{
				Block5Data* _data5_;
				GHashTable* _tmp9_ = NULL;
				GObject* _tmp10_ = NULL;
				gconstpointer _tmp11_ = NULL;
				GObject* _tmp12_ = NULL;
				gboolean _tmp13_ = FALSE;
				GList* exporters = NULL;
				GObject* _tmp16_ = NULL;
				GList* _tmp17_ = NULL;
				GList* _tmp18_ = NULL;
				GList* _tmp19_ = NULL;
				gchar* directory = NULL;
				GFile* file = NULL;
				SeahorseExporter* exporter = NULL;
				gboolean ret = FALSE;
				GList* _tmp30_ = NULL;
				GtkWindow* _tmp31_ = NULL;
				GFile* _tmp32_ = NULL;
				SeahorseExporter* _tmp33_ = NULL;
				gboolean _tmp34_ = FALSE;
				gboolean _tmp35_ = FALSE;
				GMainLoop* _tmp36_ = NULL;
				SeahorseExporter* _tmp37_ = NULL;
				GFile* _tmp38_ = NULL;
				GMainLoop* _tmp39_ = NULL;
				SeahorseExporter* _tmp40_ = NULL;
				GAsyncResult* _tmp41_ = NULL;
				SeahorseExporter* _tmp42_ = NULL;
				GList* _tmp43_ = NULL;
#line 127 "/data/projects/seahorse/common/exportable.vala"
				_data5_ = g_slice_new0 (Block5Data);
#line 127 "/data/projects/seahorse/common/exportable.vala"
				_data5_->_ref_count_ = 1;
#line 128 "/data/projects/seahorse/common/exportable.vala"
				_tmp9_ = pending;
#line 128 "/data/projects/seahorse/common/exportable.vala"
				_tmp10_ = object;
#line 128 "/data/projects/seahorse/common/exportable.vala"
				_tmp11_ = g_hash_table_lookup (_tmp9_, _tmp10_);
#line 128 "/data/projects/seahorse/common/exportable.vala"
				if (((GObject*) _tmp11_) == NULL) {
#line 129 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (object);
#line 129 "/data/projects/seahorse/common/exportable.vala"
					block5_data_unref (_data5_);
#line 129 "/data/projects/seahorse/common/exportable.vala"
					_data5_ = NULL;
#line 129 "/data/projects/seahorse/common/exportable.vala"
					continue;
#line 952 "exportable.c"
				}
#line 131 "/data/projects/seahorse/common/exportable.vala"
				_tmp12_ = object;
#line 131 "/data/projects/seahorse/common/exportable.vala"
				_tmp13_ = seahorse_exportable_can_export (_tmp12_);
#line 131 "/data/projects/seahorse/common/exportable.vala"
				if (!_tmp13_) {
#line 960 "exportable.c"
					GHashTable* _tmp14_ = NULL;
					GObject* _tmp15_ = NULL;
#line 132 "/data/projects/seahorse/common/exportable.vala"
					_tmp14_ = pending;
#line 132 "/data/projects/seahorse/common/exportable.vala"
					_tmp15_ = object;
#line 132 "/data/projects/seahorse/common/exportable.vala"
					g_hash_table_remove (_tmp14_, _tmp15_);
#line 133 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (object);
#line 133 "/data/projects/seahorse/common/exportable.vala"
					block5_data_unref (_data5_);
#line 133 "/data/projects/seahorse/common/exportable.vala"
					_data5_ = NULL;
#line 133 "/data/projects/seahorse/common/exportable.vala"
					continue;
#line 977 "exportable.c"
				}
#line 136 "/data/projects/seahorse/common/exportable.vala"
				_tmp16_ = object;
#line 136 "/data/projects/seahorse/common/exportable.vala"
				_tmp17_ = seahorse_exportable_create_exporters (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, SEAHORSE_TYPE_EXPORTABLE, SeahorseExportable), SEAHORSE_EXPORTER_TYPE_ANY);
#line 136 "/data/projects/seahorse/common/exportable.vala"
				exporters = _tmp17_;
#line 137 "/data/projects/seahorse/common/exportable.vala"
				_tmp18_ = exporters;
#line 137 "/data/projects/seahorse/common/exportable.vala"
				if (_tmp18_ == NULL) {
#line 138 "/data/projects/seahorse/common/exportable.vala"
					__g_list_free__g_object_unref0_0 (exporters);
#line 138 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (object);
#line 138 "/data/projects/seahorse/common/exportable.vala"
					block5_data_unref (_data5_);
#line 138 "/data/projects/seahorse/common/exportable.vala"
					_data5_ = NULL;
#line 138 "/data/projects/seahorse/common/exportable.vala"
					continue;
#line 999 "exportable.c"
				}
#line 140 "/data/projects/seahorse/common/exportable.vala"
				_tmp19_ = objects;
#line 1003 "exportable.c"
				{
					GList* x_collection = NULL;
					GList* x_it = NULL;
#line 140 "/data/projects/seahorse/common/exportable.vala"
					x_collection = _tmp19_;
#line 140 "/data/projects/seahorse/common/exportable.vala"
					for (x_it = x_collection; x_it != NULL; x_it = x_it->next) {
#line 1011 "exportable.c"
						GObject* _tmp20_ = NULL;
						GObject* x = NULL;
#line 140 "/data/projects/seahorse/common/exportable.vala"
						_tmp20_ = _g_object_ref0 ((GObject*) x_it->data);
#line 140 "/data/projects/seahorse/common/exportable.vala"
						x = _tmp20_;
#line 1018 "exportable.c"
						{
							GObject* _tmp21_ = NULL;
							GObject* _tmp22_ = NULL;
							GHashTable* _tmp23_ = NULL;
							GObject* _tmp24_ = NULL;
							gconstpointer _tmp25_ = NULL;
#line 141 "/data/projects/seahorse/common/exportable.vala"
							_tmp21_ = x;
#line 141 "/data/projects/seahorse/common/exportable.vala"
							_tmp22_ = object;
#line 141 "/data/projects/seahorse/common/exportable.vala"
							if (_tmp21_ == _tmp22_) {
#line 142 "/data/projects/seahorse/common/exportable.vala"
								_g_object_unref0 (x);
#line 142 "/data/projects/seahorse/common/exportable.vala"
								continue;
#line 1035 "exportable.c"
							}
#line 143 "/data/projects/seahorse/common/exportable.vala"
							_tmp23_ = pending;
#line 143 "/data/projects/seahorse/common/exportable.vala"
							_tmp24_ = x;
#line 143 "/data/projects/seahorse/common/exportable.vala"
							_tmp25_ = g_hash_table_lookup (_tmp23_, _tmp24_);
#line 143 "/data/projects/seahorse/common/exportable.vala"
							if (((GObject*) _tmp25_) != NULL) {
#line 1045 "exportable.c"
								GList* _tmp26_ = NULL;
#line 144 "/data/projects/seahorse/common/exportable.vala"
								_tmp26_ = exporters;
#line 1049 "exportable.c"
								{
									GList* exporter_collection = NULL;
									GList* exporter_it = NULL;
#line 144 "/data/projects/seahorse/common/exportable.vala"
									exporter_collection = _tmp26_;
#line 144 "/data/projects/seahorse/common/exportable.vala"
									for (exporter_it = exporter_collection; exporter_it != NULL; exporter_it = exporter_it->next) {
#line 1057 "exportable.c"
										SeahorseExporter* _tmp27_ = NULL;
										SeahorseExporter* exporter = NULL;
#line 144 "/data/projects/seahorse/common/exportable.vala"
										_tmp27_ = _g_object_ref0 ((SeahorseExporter*) exporter_it->data);
#line 144 "/data/projects/seahorse/common/exportable.vala"
										exporter = _tmp27_;
#line 1064 "exportable.c"
										{
											SeahorseExporter* _tmp28_ = NULL;
											GObject* _tmp29_ = NULL;
#line 145 "/data/projects/seahorse/common/exportable.vala"
											_tmp28_ = exporter;
#line 145 "/data/projects/seahorse/common/exportable.vala"
											_tmp29_ = x;
#line 145 "/data/projects/seahorse/common/exportable.vala"
											seahorse_exporter_add_object (_tmp28_, _tmp29_);
#line 144 "/data/projects/seahorse/common/exportable.vala"
											_g_object_unref0 (exporter);
#line 1076 "exportable.c"
										}
									}
								}
							}
#line 140 "/data/projects/seahorse/common/exportable.vala"
							_g_object_unref0 (x);
#line 1083 "exportable.c"
						}
					}
				}
#line 149 "/data/projects/seahorse/common/exportable.vala"
				directory = NULL;
#line 154 "/data/projects/seahorse/common/exportable.vala"
				_tmp30_ = exporters;
#line 154 "/data/projects/seahorse/common/exportable.vala"
				_tmp31_ = parent;
#line 154 "/data/projects/seahorse/common/exportable.vala"
				_tmp34_ = seahorse_exportable_prompt (_tmp30_, _tmp31_, &directory, &_tmp32_, &_tmp33_);
#line 154 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (file);
#line 154 "/data/projects/seahorse/common/exportable.vala"
				file = _tmp32_;
#line 154 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (exporter);
#line 154 "/data/projects/seahorse/common/exportable.vala"
				exporter = _tmp33_;
#line 154 "/data/projects/seahorse/common/exportable.vala"
				ret = _tmp34_;
#line 156 "/data/projects/seahorse/common/exportable.vala"
				_tmp35_ = ret;
#line 156 "/data/projects/seahorse/common/exportable.vala"
				if (!_tmp35_) {
#line 157 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (exporter);
#line 157 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (file);
#line 157 "/data/projects/seahorse/common/exportable.vala"
					_g_free0 (directory);
#line 157 "/data/projects/seahorse/common/exportable.vala"
					__g_list_free__g_object_unref0_0 (exporters);
#line 157 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (object);
#line 157 "/data/projects/seahorse/common/exportable.vala"
					block5_data_unref (_data5_);
#line 157 "/data/projects/seahorse/common/exportable.vala"
					_data5_ = NULL;
#line 157 "/data/projects/seahorse/common/exportable.vala"
					break;
#line 1125 "exportable.c"
				}
#line 159 "/data/projects/seahorse/common/exportable.vala"
				_tmp36_ = g_main_loop_new (NULL, FALSE);
#line 159 "/data/projects/seahorse/common/exportable.vala"
				_data5_->loop = _tmp36_;
#line 160 "/data/projects/seahorse/common/exportable.vala"
				_data5_->_result_ = NULL;
#line 162 "/data/projects/seahorse/common/exportable.vala"
				_tmp37_ = exporter;
#line 162 "/data/projects/seahorse/common/exportable.vala"
				_tmp38_ = file;
#line 162 "/data/projects/seahorse/common/exportable.vala"
				seahorse_exporter_export_to_file (_tmp37_, _tmp38_, TRUE, NULL, _____lambda5__gasync_ready_callback, block5_data_ref (_data5_));
#line 167 "/data/projects/seahorse/common/exportable.vala"
				_tmp39_ = _data5_->loop;
#line 167 "/data/projects/seahorse/common/exportable.vala"
				g_main_loop_run (_tmp39_);
#line 169 "/data/projects/seahorse/common/exportable.vala"
				_tmp40_ = exporter;
#line 169 "/data/projects/seahorse/common/exportable.vala"
				_tmp41_ = _data5_->_result_;
#line 169 "/data/projects/seahorse/common/exportable.vala"
				seahorse_exporter_export_to_file_finish (_tmp40_, _tmp41_, &_inner_error_);
#line 169 "/data/projects/seahorse/common/exportable.vala"
				if (_inner_error_ != NULL) {
#line 169 "/data/projects/seahorse/common/exportable.vala"
					g_propagate_error (error, _inner_error_);
#line 169 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (exporter);
#line 169 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (file);
#line 169 "/data/projects/seahorse/common/exportable.vala"
					_g_free0 (directory);
#line 169 "/data/projects/seahorse/common/exportable.vala"
					__g_list_free__g_object_unref0_0 (exporters);
#line 169 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (object);
#line 169 "/data/projects/seahorse/common/exportable.vala"
					block5_data_unref (_data5_);
#line 169 "/data/projects/seahorse/common/exportable.vala"
					_data5_ = NULL;
#line 169 "/data/projects/seahorse/common/exportable.vala"
					_g_hash_table_unref0 (pending);
#line 169 "/data/projects/seahorse/common/exportable.vala"
					return 0;
#line 1171 "exportable.c"
				}
#line 170 "/data/projects/seahorse/common/exportable.vala"
				_tmp42_ = exporter;
#line 170 "/data/projects/seahorse/common/exportable.vala"
				_tmp43_ = seahorse_exporter_get_objects (_tmp42_);
#line 1177 "exportable.c"
				{
					GList* e_collection = NULL;
					GList* e_it = NULL;
#line 170 "/data/projects/seahorse/common/exportable.vala"
					e_collection = _tmp43_;
#line 170 "/data/projects/seahorse/common/exportable.vala"
					for (e_it = e_collection; e_it != NULL; e_it = e_it->next) {
#line 1185 "exportable.c"
						GObject* e = NULL;
#line 170 "/data/projects/seahorse/common/exportable.vala"
						e = (GObject*) e_it->data;
#line 1189 "exportable.c"
						{
							GHashTable* _tmp44_ = NULL;
							GObject* _tmp45_ = NULL;
							gint _tmp46_ = 0;
#line 171 "/data/projects/seahorse/common/exportable.vala"
							_tmp44_ = pending;
#line 171 "/data/projects/seahorse/common/exportable.vala"
							_tmp45_ = e;
#line 171 "/data/projects/seahorse/common/exportable.vala"
							g_hash_table_remove (_tmp44_, _tmp45_);
#line 172 "/data/projects/seahorse/common/exportable.vala"
							_tmp46_ = count;
#line 172 "/data/projects/seahorse/common/exportable.vala"
							count = _tmp46_ + 1;
#line 1204 "exportable.c"
						}
					}
				}
#line 127 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (exporter);
#line 127 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (file);
#line 127 "/data/projects/seahorse/common/exportable.vala"
				_g_free0 (directory);
#line 127 "/data/projects/seahorse/common/exportable.vala"
				__g_list_free__g_object_unref0_0 (exporters);
#line 127 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (object);
#line 127 "/data/projects/seahorse/common/exportable.vala"
				block5_data_unref (_data5_);
#line 127 "/data/projects/seahorse/common/exportable.vala"
				_data5_ = NULL;
#line 1222 "exportable.c"
			}
		}
	}
#line 176 "/data/projects/seahorse/common/exportable.vala"
	result = count;
#line 176 "/data/projects/seahorse/common/exportable.vala"
	_g_hash_table_unref0 (pending);
#line 176 "/data/projects/seahorse/common/exportable.vala"
	return result;
#line 1232 "exportable.c"
}


static gint string_last_index_of_char (const gchar* self, gunichar c, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_ = 0;
	gunichar _tmp1_ = 0U;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 928 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 929 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp0_ = start_index;
#line 929 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp1_ = c;
#line 929 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) (-1), _tmp1_);
#line 929 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_result_ = _tmp2_;
#line 931 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp3_ = _result_;
#line 931 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 1257 "exportable.c"
		gchar* _tmp4_ = NULL;
#line 932 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp4_ = _result_;
#line 932 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		result = (gint) (_tmp4_ - ((gchar*) self));
#line 932 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		return result;
#line 1265 "exportable.c"
	} else {
#line 934 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		result = -1;
#line 934 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		return result;
#line 1271 "exportable.c"
	}
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_ = NULL;
	glong _tmp1_ = 0L;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 1157 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1157 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1157 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1157 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1158 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1158 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 1295 "exportable.c"
		glong _tmp4_ = 0L;
#line 1159 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1159 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1159 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		return result;
#line 1303 "exportable.c"
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 1161 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1161 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1161 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1161 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		return result;
#line 1315 "exportable.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_ = 0L;
	gboolean _tmp3_ = FALSE;
	glong _tmp9_ = 0L;
	glong _tmp15_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	glong _tmp21_ = 0L;
	glong _tmp22_ = 0L;
	gchar* _tmp23_ = NULL;
#line 1168 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1170 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1170 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 1340 "exportable.c"
		glong _tmp2_ = 0L;
#line 1170 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1170 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 1346 "exportable.c"
	} else {
#line 1170 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 1350 "exportable.c"
	}
#line 1170 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp3_ = _tmp0_;
#line 1170 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	if (_tmp3_) {
#line 1356 "exportable.c"
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
		glong _tmp6_ = 0L;
#line 1172 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp4_ = offset;
#line 1172 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp5_ = len;
#line 1172 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_);
#line 1172 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		string_length = _tmp6_;
#line 1368 "exportable.c"
	} else {
		gint _tmp7_ = 0;
		gint _tmp8_ = 0;
#line 1174 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp7_ = strlen (self);
#line 1174 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp8_ = _tmp7_;
#line 1174 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp8_;
#line 1378 "exportable.c"
	}
#line 1177 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp9_ = offset;
#line 1177 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	if (_tmp9_ < ((glong) 0)) {
#line 1384 "exportable.c"
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
		glong _tmp12_ = 0L;
#line 1178 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp10_ = string_length;
#line 1178 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1178 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		offset = _tmp10_ + _tmp11_;
#line 1179 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1179 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL);
#line 1398 "exportable.c"
	} else {
		glong _tmp13_ = 0L;
		glong _tmp14_ = 0L;
#line 1181 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp13_ = offset;
#line 1181 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp14_ = string_length;
#line 1181 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL);
#line 1408 "exportable.c"
	}
#line 1183 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp15_ = len;
#line 1183 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	if (_tmp15_ < ((glong) 0)) {
#line 1414 "exportable.c"
		glong _tmp16_ = 0L;
		glong _tmp17_ = 0L;
#line 1184 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp16_ = string_length;
#line 1184 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp17_ = offset;
#line 1184 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
		len = _tmp16_ - _tmp17_;
#line 1423 "exportable.c"
	}
#line 1186 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp18_ = offset;
#line 1186 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp19_ = len;
#line 1186 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp20_ = string_length;
#line 1186 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL);
#line 1187 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp21_ = offset;
#line 1187 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp22_ = len;
#line 1187 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_);
#line 1187 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	result = _tmp23_;
#line 1187 "/opt/build/share/vala-0.22/vapi/glib-2.0.vapi"
	return result;
#line 1443 "exportable.c"
}


static gchar* seahorse_exportable_calculate_basename (GFile* file, const gchar* extension) {
	gchar* result = NULL;
	gchar* basename = NULL;
	GFile* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gint dot = 0;
	const gchar* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	const gchar* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
#line 179 "/data/projects/seahorse/common/exportable.vala"
	g_return_val_if_fail (file != NULL, NULL);
#line 179 "/data/projects/seahorse/common/exportable.vala"
	g_return_val_if_fail (extension != NULL, NULL);
#line 181 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = file;
#line 181 "/data/projects/seahorse/common/exportable.vala"
	_tmp1_ = g_file_get_basename (_tmp0_);
#line 181 "/data/projects/seahorse/common/exportable.vala"
	basename = _tmp1_;
#line 182 "/data/projects/seahorse/common/exportable.vala"
	_tmp2_ = basename;
#line 182 "/data/projects/seahorse/common/exportable.vala"
	_tmp3_ = string_last_index_of_char (_tmp2_, (gunichar) '.', 0);
#line 182 "/data/projects/seahorse/common/exportable.vala"
	dot = _tmp3_;
#line 183 "/data/projects/seahorse/common/exportable.vala"
	_tmp4_ = dot;
#line 183 "/data/projects/seahorse/common/exportable.vala"
	if (_tmp4_ != (-1)) {
#line 1479 "exportable.c"
		const gchar* _tmp5_ = NULL;
		gint _tmp6_ = 0;
		gchar* _tmp7_ = NULL;
#line 184 "/data/projects/seahorse/common/exportable.vala"
		_tmp5_ = basename;
#line 184 "/data/projects/seahorse/common/exportable.vala"
		_tmp6_ = dot;
#line 184 "/data/projects/seahorse/common/exportable.vala"
		_tmp7_ = string_substring (_tmp5_, (glong) 0, (glong) _tmp6_);
#line 184 "/data/projects/seahorse/common/exportable.vala"
		_g_free0 (basename);
#line 184 "/data/projects/seahorse/common/exportable.vala"
		basename = _tmp7_;
#line 1493 "exportable.c"
	}
#line 185 "/data/projects/seahorse/common/exportable.vala"
	_tmp8_ = basename;
#line 185 "/data/projects/seahorse/common/exportable.vala"
	_tmp9_ = extension;
#line 185 "/data/projects/seahorse/common/exportable.vala"
	_tmp10_ = g_strdup_printf ("%s%s", _tmp8_, _tmp9_);
#line 185 "/data/projects/seahorse/common/exportable.vala"
	result = _tmp10_;
#line 185 "/data/projects/seahorse/common/exportable.vala"
	_g_free0 (basename);
#line 185 "/data/projects/seahorse/common/exportable.vala"
	return result;
#line 1507 "exportable.c"
}


static Block6Data* block6_data_ref (Block6Data* _data6_) {
#line 188 "/data/projects/seahorse/common/exportable.vala"
	g_atomic_int_inc (&_data6_->_ref_count_);
#line 188 "/data/projects/seahorse/common/exportable.vala"
	return _data6_;
#line 1516 "exportable.c"
}


static void block6_data_unref (void * _userdata_) {
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
#line 188 "/data/projects/seahorse/common/exportable.vala"
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
#line 188 "/data/projects/seahorse/common/exportable.vala"
		_g_hash_table_unref0 (_data6_->filters);
#line 188 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (_data6_->chooser);
#line 188 "/data/projects/seahorse/common/exportable.vala"
		g_slice_free (Block6Data, _data6_);
#line 1531 "exportable.c"
	}
}


static void __lambda4_ (Block6Data* _data6_, GObject* obj, GParamSpec* prop) {
	SeahorseExporter* exporter = NULL;
	GHashTable* _tmp0_ = NULL;
	GtkFileChooserDialog* _tmp1_ = NULL;
	GtkFileFilter* _tmp2_ = NULL;
	gconstpointer _tmp3_ = NULL;
	SeahorseExporter* _tmp4_ = NULL;
	gchar* name = NULL;
	SeahorseExporter* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gint dot = 0;
	const gchar* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
#line 215 "/data/projects/seahorse/common/exportable.vala"
	g_return_if_fail (obj != NULL);
#line 215 "/data/projects/seahorse/common/exportable.vala"
	g_return_if_fail (prop != NULL);
#line 216 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = _data6_->filters;
#line 216 "/data/projects/seahorse/common/exportable.vala"
	_tmp1_ = _data6_->chooser;
#line 216 "/data/projects/seahorse/common/exportable.vala"
	_tmp2_ = gtk_file_chooser_get_filter ((GtkFileChooser*) _tmp1_);
#line 216 "/data/projects/seahorse/common/exportable.vala"
	_tmp3_ = g_hash_table_lookup (_tmp0_, _tmp2_);
#line 216 "/data/projects/seahorse/common/exportable.vala"
	_tmp4_ = _g_object_ref0 ((SeahorseExporter*) _tmp3_);
#line 216 "/data/projects/seahorse/common/exportable.vala"
	exporter = _tmp4_;
#line 217 "/data/projects/seahorse/common/exportable.vala"
	_tmp5_ = exporter;
#line 217 "/data/projects/seahorse/common/exportable.vala"
	_tmp6_ = seahorse_exporter_get_filename (_tmp5_);
#line 217 "/data/projects/seahorse/common/exportable.vala"
	_tmp7_ = _tmp6_;
#line 217 "/data/projects/seahorse/common/exportable.vala"
	name = _tmp7_;
#line 218 "/data/projects/seahorse/common/exportable.vala"
	_tmp8_ = name;
#line 218 "/data/projects/seahorse/common/exportable.vala"
	_tmp9_ = string_last_index_of_char (_tmp8_, (gunichar) '.', 0);
#line 218 "/data/projects/seahorse/common/exportable.vala"
	dot = _tmp9_;
#line 219 "/data/projects/seahorse/common/exportable.vala"
	_tmp10_ = dot;
#line 219 "/data/projects/seahorse/common/exportable.vala"
	if (_tmp10_ != (-1)) {
#line 1585 "exportable.c"
		GFile* file = NULL;
		GtkFileChooserDialog* _tmp11_ = NULL;
		GFile* _tmp12_ = NULL;
		GFile* _tmp13_ = NULL;
		GFile* _tmp14_ = NULL;
#line 220 "/data/projects/seahorse/common/exportable.vala"
		_tmp11_ = _data6_->chooser;
#line 220 "/data/projects/seahorse/common/exportable.vala"
		_tmp12_ = gtk_file_chooser_get_file ((GtkFileChooser*) _tmp11_);
#line 220 "/data/projects/seahorse/common/exportable.vala"
		_tmp13_ = _g_object_ref0 (_tmp12_);
#line 220 "/data/projects/seahorse/common/exportable.vala"
		file = _tmp13_;
#line 221 "/data/projects/seahorse/common/exportable.vala"
		_tmp14_ = file;
#line 221 "/data/projects/seahorse/common/exportable.vala"
		if (_tmp14_ != NULL) {
#line 1603 "exportable.c"
			gchar* basename = NULL;
			GFile* _tmp15_ = NULL;
			const gchar* _tmp16_ = NULL;
			gint _tmp17_ = 0;
			gchar* _tmp18_ = NULL;
			gchar* _tmp19_ = NULL;
			gchar* _tmp20_ = NULL;
			gchar* _tmp21_ = NULL;
			GtkFileChooserDialog* _tmp22_ = NULL;
			const gchar* _tmp23_ = NULL;
#line 222 "/data/projects/seahorse/common/exportable.vala"
			_tmp15_ = file;
#line 222 "/data/projects/seahorse/common/exportable.vala"
			_tmp16_ = name;
#line 222 "/data/projects/seahorse/common/exportable.vala"
			_tmp17_ = dot;
#line 222 "/data/projects/seahorse/common/exportable.vala"
			_tmp18_ = string_substring (_tmp16_, (glong) _tmp17_, (glong) (-1));
#line 222 "/data/projects/seahorse/common/exportable.vala"
			_tmp19_ = _tmp18_;
#line 222 "/data/projects/seahorse/common/exportable.vala"
			_tmp20_ = seahorse_exportable_calculate_basename (_tmp15_, _tmp19_);
#line 222 "/data/projects/seahorse/common/exportable.vala"
			_tmp21_ = _tmp20_;
#line 222 "/data/projects/seahorse/common/exportable.vala"
			_g_free0 (_tmp19_);
#line 222 "/data/projects/seahorse/common/exportable.vala"
			basename = _tmp21_;
#line 223 "/data/projects/seahorse/common/exportable.vala"
			_tmp22_ = _data6_->chooser;
#line 223 "/data/projects/seahorse/common/exportable.vala"
			_tmp23_ = basename;
#line 223 "/data/projects/seahorse/common/exportable.vala"
			gtk_file_chooser_set_current_name ((GtkFileChooser*) _tmp22_, _tmp23_);
#line 221 "/data/projects/seahorse/common/exportable.vala"
			_g_free0 (basename);
#line 1640 "exportable.c"
		} else {
			GtkFileChooserDialog* _tmp24_ = NULL;
			const gchar* _tmp25_ = NULL;
#line 225 "/data/projects/seahorse/common/exportable.vala"
			_tmp24_ = _data6_->chooser;
#line 225 "/data/projects/seahorse/common/exportable.vala"
			_tmp25_ = name;
#line 225 "/data/projects/seahorse/common/exportable.vala"
			gtk_file_chooser_set_current_name ((GtkFileChooser*) _tmp24_, _tmp25_);
#line 1650 "exportable.c"
		}
#line 219 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (file);
#line 1654 "exportable.c"
	}
#line 215 "/data/projects/seahorse/common/exportable.vala"
	_g_free0 (name);
#line 215 "/data/projects/seahorse/common/exportable.vala"
	_g_object_unref0 (exporter);
#line 1660 "exportable.c"
}


static void ___lambda4__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 215 "/data/projects/seahorse/common/exportable.vala"
	__lambda4_ (self, _sender, pspec);
#line 1667 "exportable.c"
}


gboolean seahorse_exportable_prompt (GList* exporters, GtkWindow* parent, gchar** directory, GFile** chosen_file, SeahorseExporter** chosen_exporter) {
	GFile* _vala_chosen_file = NULL;
	SeahorseExporter* _vala_chosen_exporter = NULL;
	gboolean result = FALSE;
	Block6Data* _data6_;
	GtkWindow* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GtkFileChooserDialog* _tmp2_ = NULL;
	GtkFileChooserDialog* _tmp3_ = NULL;
	GtkFileChooserDialog* _tmp4_ = NULL;
	GtkFileChooserDialog* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GtkFileFilter* first = NULL;
	GHashFunc _tmp9_ = NULL;
	GEqualFunc _tmp10_ = NULL;
	GHashTable* _tmp11_ = NULL;
	GList* _tmp12_ = NULL;
	GtkFileChooserDialog* _tmp28_ = NULL;
	GtkFileChooserDialog* _tmp29_ = NULL;
	GtkFileFilter* _tmp30_ = NULL;
	GtkFileChooserDialog* _tmp31_ = NULL;
	gint _tmp32_ = 0;
	GtkFileChooserDialog* _tmp44_ = NULL;
#line 188 "/data/projects/seahorse/common/exportable.vala"
	_data6_ = g_slice_new0 (Block6Data);
#line 188 "/data/projects/seahorse/common/exportable.vala"
	_data6_->_ref_count_ = 1;
#line 193 "/data/projects/seahorse/common/exportable.vala"
	_tmp0_ = parent;
#line 193 "/data/projects/seahorse/common/exportable.vala"
	_tmp1_ = _ ("Export");
#line 193 "/data/projects/seahorse/common/exportable.vala"
	_tmp2_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (NULL, _tmp0_, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _tmp1_, GTK_RESPONSE_ACCEPT, NULL, NULL);
#line 193 "/data/projects/seahorse/common/exportable.vala"
	g_object_ref_sink (_tmp2_);
#line 193 "/data/projects/seahorse/common/exportable.vala"
	_data6_->chooser = _tmp2_;
#line 198 "/data/projects/seahorse/common/exportable.vala"
	_tmp3_ = _data6_->chooser;
#line 198 "/data/projects/seahorse/common/exportable.vala"
	gtk_dialog_set_default_response ((GtkDialog*) _tmp3_, (gint) GTK_RESPONSE_ACCEPT);
#line 199 "/data/projects/seahorse/common/exportable.vala"
	_tmp4_ = _data6_->chooser;
#line 199 "/data/projects/seahorse/common/exportable.vala"
	gtk_file_chooser_set_local_only ((GtkFileChooser*) _tmp4_, FALSE);
#line 200 "/data/projects/seahorse/common/exportable.vala"
	_tmp5_ = _data6_->chooser;
#line 200 "/data/projects/seahorse/common/exportable.vala"
	gtk_file_chooser_set_do_overwrite_confirmation ((GtkFileChooser*) _tmp5_, TRUE);
#line 202 "/data/projects/seahorse/common/exportable.vala"
	_tmp6_ = *directory;
#line 202 "/data/projects/seahorse/common/exportable.vala"
	if (_tmp6_ != NULL) {
#line 1724 "exportable.c"
		GtkFileChooserDialog* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
#line 203 "/data/projects/seahorse/common/exportable.vala"
		_tmp7_ = _data6_->chooser;
#line 203 "/data/projects/seahorse/common/exportable.vala"
		_tmp8_ = *directory;
#line 203 "/data/projects/seahorse/common/exportable.vala"
		gtk_file_chooser_set_current_folder ((GtkFileChooser*) _tmp7_, _tmp8_);
#line 1733 "exportable.c"
	}
#line 205 "/data/projects/seahorse/common/exportable.vala"
	first = NULL;
#line 206 "/data/projects/seahorse/common/exportable.vala"
	_tmp9_ = g_direct_hash;
#line 206 "/data/projects/seahorse/common/exportable.vala"
	_tmp10_ = g_direct_equal;
#line 206 "/data/projects/seahorse/common/exportable.vala"
	_tmp11_ = g_hash_table_new_full (_tmp9_, _tmp10_, _g_object_unref0_, _g_object_unref0_);
#line 206 "/data/projects/seahorse/common/exportable.vala"
	_data6_->filters = _tmp11_;
#line 207 "/data/projects/seahorse/common/exportable.vala"
	_tmp12_ = exporters;
#line 1747 "exportable.c"
	{
		GList* exporter_collection = NULL;
		GList* exporter_it = NULL;
#line 207 "/data/projects/seahorse/common/exportable.vala"
		exporter_collection = _tmp12_;
#line 207 "/data/projects/seahorse/common/exportable.vala"
		for (exporter_it = exporter_collection; exporter_it != NULL; exporter_it = exporter_it->next) {
#line 1755 "exportable.c"
			SeahorseExporter* _tmp13_ = NULL;
			SeahorseExporter* exporter = NULL;
#line 207 "/data/projects/seahorse/common/exportable.vala"
			_tmp13_ = _g_object_ref0 ((SeahorseExporter*) exporter_it->data);
#line 207 "/data/projects/seahorse/common/exportable.vala"
			exporter = _tmp13_;
#line 1762 "exportable.c"
			{
				GtkFileFilter* filter = NULL;
				SeahorseExporter* _tmp14_ = NULL;
				GtkFileFilter* _tmp15_ = NULL;
				GtkFileFilter* _tmp16_ = NULL;
				GHashTable* _tmp17_ = NULL;
				GtkFileFilter* _tmp18_ = NULL;
				GtkFileFilter* _tmp19_ = NULL;
				SeahorseExporter* _tmp20_ = NULL;
				SeahorseExporter* _tmp21_ = NULL;
				GtkFileChooserDialog* _tmp22_ = NULL;
				GtkFileFilter* _tmp23_ = NULL;
				GtkFileFilter* _tmp24_ = NULL;
				GtkFileFilter* _tmp25_ = NULL;
#line 208 "/data/projects/seahorse/common/exportable.vala"
				_tmp14_ = exporter;
#line 208 "/data/projects/seahorse/common/exportable.vala"
				_tmp15_ = seahorse_exporter_get_file_filter (_tmp14_);
#line 208 "/data/projects/seahorse/common/exportable.vala"
				_tmp16_ = _tmp15_;
#line 208 "/data/projects/seahorse/common/exportable.vala"
				filter = _tmp16_;
#line 209 "/data/projects/seahorse/common/exportable.vala"
				_tmp17_ = _data6_->filters;
#line 209 "/data/projects/seahorse/common/exportable.vala"
				_tmp18_ = filter;
#line 209 "/data/projects/seahorse/common/exportable.vala"
				_tmp19_ = _g_object_ref0 (_tmp18_);
#line 209 "/data/projects/seahorse/common/exportable.vala"
				_tmp20_ = exporter;
#line 209 "/data/projects/seahorse/common/exportable.vala"
				_tmp21_ = _g_object_ref0 (_tmp20_);
#line 209 "/data/projects/seahorse/common/exportable.vala"
				g_hash_table_replace (_tmp17_, _tmp19_, _tmp21_);
#line 210 "/data/projects/seahorse/common/exportable.vala"
				_tmp22_ = _data6_->chooser;
#line 210 "/data/projects/seahorse/common/exportable.vala"
				_tmp23_ = filter;
#line 210 "/data/projects/seahorse/common/exportable.vala"
				_tmp24_ = _g_object_ref0 (_tmp23_);
#line 210 "/data/projects/seahorse/common/exportable.vala"
				gtk_file_chooser_add_filter ((GtkFileChooser*) _tmp22_, _tmp24_);
#line 211 "/data/projects/seahorse/common/exportable.vala"
				_tmp25_ = first;
#line 211 "/data/projects/seahorse/common/exportable.vala"
				if (_tmp25_ == NULL) {
#line 1809 "exportable.c"
					GtkFileFilter* _tmp26_ = NULL;
					GtkFileFilter* _tmp27_ = NULL;
#line 212 "/data/projects/seahorse/common/exportable.vala"
					_tmp26_ = filter;
#line 212 "/data/projects/seahorse/common/exportable.vala"
					_tmp27_ = _g_object_ref0 (_tmp26_);
#line 212 "/data/projects/seahorse/common/exportable.vala"
					_g_object_unref0 (first);
#line 212 "/data/projects/seahorse/common/exportable.vala"
					first = _tmp27_;
#line 1820 "exportable.c"
				}
#line 207 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (filter);
#line 207 "/data/projects/seahorse/common/exportable.vala"
				_g_object_unref0 (exporter);
#line 1826 "exportable.c"
			}
		}
	}
#line 215 "/data/projects/seahorse/common/exportable.vala"
	_tmp28_ = _data6_->chooser;
#line 215 "/data/projects/seahorse/common/exportable.vala"
	g_signal_connect_data ((GObject*) _tmp28_, "notify", (GCallback) ___lambda4__g_object_notify, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
#line 230 "/data/projects/seahorse/common/exportable.vala"
	_tmp29_ = _data6_->chooser;
#line 230 "/data/projects/seahorse/common/exportable.vala"
	_tmp30_ = first;
#line 230 "/data/projects/seahorse/common/exportable.vala"
	gtk_file_chooser_set_filter ((GtkFileChooser*) _tmp29_, _tmp30_);
#line 232 "/data/projects/seahorse/common/exportable.vala"
	_tmp31_ = _data6_->chooser;
#line 232 "/data/projects/seahorse/common/exportable.vala"
	_tmp32_ = gtk_dialog_run ((GtkDialog*) _tmp31_);
#line 232 "/data/projects/seahorse/common/exportable.vala"
	if (_tmp32_ == ((gint) GTK_RESPONSE_ACCEPT)) {
#line 1846 "exportable.c"
		GtkFileChooserDialog* _tmp33_ = NULL;
		GFile* _tmp34_ = NULL;
		GFile* _tmp35_ = NULL;
		GHashTable* _tmp36_ = NULL;
		GtkFileChooserDialog* _tmp37_ = NULL;
		GtkFileFilter* _tmp38_ = NULL;
		gconstpointer _tmp39_ = NULL;
		SeahorseExporter* _tmp40_ = NULL;
		GtkFileChooserDialog* _tmp41_ = NULL;
		gchar* _tmp42_ = NULL;
		GtkFileChooserDialog* _tmp43_ = NULL;
#line 233 "/data/projects/seahorse/common/exportable.vala"
		_tmp33_ = _data6_->chooser;
#line 233 "/data/projects/seahorse/common/exportable.vala"
		_tmp34_ = gtk_file_chooser_get_file ((GtkFileChooser*) _tmp33_);
#line 233 "/data/projects/seahorse/common/exportable.vala"
		_tmp35_ = _g_object_ref0 (_tmp34_);
#line 233 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (_vala_chosen_file);
#line 233 "/data/projects/seahorse/common/exportable.vala"
		_vala_chosen_file = _tmp35_;
#line 234 "/data/projects/seahorse/common/exportable.vala"
		_tmp36_ = _data6_->filters;
#line 234 "/data/projects/seahorse/common/exportable.vala"
		_tmp37_ = _data6_->chooser;
#line 234 "/data/projects/seahorse/common/exportable.vala"
		_tmp38_ = gtk_file_chooser_get_filter ((GtkFileChooser*) _tmp37_);
#line 234 "/data/projects/seahorse/common/exportable.vala"
		_tmp39_ = g_hash_table_lookup (_tmp36_, _tmp38_);
#line 234 "/data/projects/seahorse/common/exportable.vala"
		_tmp40_ = _g_object_ref0 ((SeahorseExporter*) _tmp39_);
#line 234 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (_vala_chosen_exporter);
#line 234 "/data/projects/seahorse/common/exportable.vala"
		_vala_chosen_exporter = _tmp40_;
#line 235 "/data/projects/seahorse/common/exportable.vala"
		_tmp41_ = _data6_->chooser;
#line 235 "/data/projects/seahorse/common/exportable.vala"
		_tmp42_ = gtk_file_chooser_get_current_folder ((GtkFileChooser*) _tmp41_);
#line 235 "/data/projects/seahorse/common/exportable.vala"
		_g_free0 (*directory);
#line 235 "/data/projects/seahorse/common/exportable.vala"
		*directory = _tmp42_;
#line 236 "/data/projects/seahorse/common/exportable.vala"
		_tmp43_ = _data6_->chooser;
#line 236 "/data/projects/seahorse/common/exportable.vala"
		gtk_widget_destroy ((GtkWidget*) _tmp43_);
#line 237 "/data/projects/seahorse/common/exportable.vala"
		result = TRUE;
#line 237 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (first);
#line 237 "/data/projects/seahorse/common/exportable.vala"
		block6_data_unref (_data6_);
#line 237 "/data/projects/seahorse/common/exportable.vala"
		_data6_ = NULL;
#line 237 "/data/projects/seahorse/common/exportable.vala"
		if (chosen_file) {
#line 237 "/data/projects/seahorse/common/exportable.vala"
			*chosen_file = _vala_chosen_file;
#line 1906 "exportable.c"
		} else {
#line 237 "/data/projects/seahorse/common/exportable.vala"
			_g_object_unref0 (_vala_chosen_file);
#line 1910 "exportable.c"
		}
#line 237 "/data/projects/seahorse/common/exportable.vala"
		if (chosen_exporter) {
#line 237 "/data/projects/seahorse/common/exportable.vala"
			*chosen_exporter = _vala_chosen_exporter;
#line 1916 "exportable.c"
		} else {
#line 237 "/data/projects/seahorse/common/exportable.vala"
			_g_object_unref0 (_vala_chosen_exporter);
#line 1920 "exportable.c"
		}
#line 237 "/data/projects/seahorse/common/exportable.vala"
		return result;
#line 1924 "exportable.c"
	}
#line 240 "/data/projects/seahorse/common/exportable.vala"
	_g_object_unref0 (_vala_chosen_file);
#line 240 "/data/projects/seahorse/common/exportable.vala"
	_vala_chosen_file = NULL;
#line 241 "/data/projects/seahorse/common/exportable.vala"
	_g_object_unref0 (_vala_chosen_exporter);
#line 241 "/data/projects/seahorse/common/exportable.vala"
	_vala_chosen_exporter = NULL;
#line 242 "/data/projects/seahorse/common/exportable.vala"
	_tmp44_ = _data6_->chooser;
#line 242 "/data/projects/seahorse/common/exportable.vala"
	gtk_widget_destroy ((GtkWidget*) _tmp44_);
#line 243 "/data/projects/seahorse/common/exportable.vala"
	result = FALSE;
#line 243 "/data/projects/seahorse/common/exportable.vala"
	_g_object_unref0 (first);
#line 243 "/data/projects/seahorse/common/exportable.vala"
	block6_data_unref (_data6_);
#line 243 "/data/projects/seahorse/common/exportable.vala"
	_data6_ = NULL;
#line 243 "/data/projects/seahorse/common/exportable.vala"
	if (chosen_file) {
#line 243 "/data/projects/seahorse/common/exportable.vala"
		*chosen_file = _vala_chosen_file;
#line 1950 "exportable.c"
	} else {
#line 243 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (_vala_chosen_file);
#line 1954 "exportable.c"
	}
#line 243 "/data/projects/seahorse/common/exportable.vala"
	if (chosen_exporter) {
#line 243 "/data/projects/seahorse/common/exportable.vala"
		*chosen_exporter = _vala_chosen_exporter;
#line 1960 "exportable.c"
	} else {
#line 243 "/data/projects/seahorse/common/exportable.vala"
		_g_object_unref0 (_vala_chosen_exporter);
#line 1964 "exportable.c"
	}
#line 243 "/data/projects/seahorse/common/exportable.vala"
	return result;
#line 1968 "exportable.c"
}


gboolean seahorse_exportable_get_exportable (SeahorseExportable* self) {
#line 27 "/data/projects/seahorse/common/exportable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 27 "/data/projects/seahorse/common/exportable.vala"
	return SEAHORSE_EXPORTABLE_GET_INTERFACE (self)->get_exportable (self);
#line 1977 "exportable.c"
}


static void seahorse_exportable_base_init (SeahorseExportableIface * iface) {
#line 26 "/data/projects/seahorse/common/exportable.vala"
	static gboolean initialized = FALSE;
#line 26 "/data/projects/seahorse/common/exportable.vala"
	if (!initialized) {
#line 26 "/data/projects/seahorse/common/exportable.vala"
		initialized = TRUE;
#line 26 "/data/projects/seahorse/common/exportable.vala"
		g_object_interface_install_property (iface, g_param_spec_boolean ("exportable", "exportable", "exportable", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 1990 "exportable.c"
	}
}


GType seahorse_exportable_get_type (void) {
	static volatile gsize seahorse_exportable_type_id__volatile = 0;
	if (g_once_init_enter (&seahorse_exportable_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SeahorseExportableIface), (GBaseInitFunc) seahorse_exportable_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType seahorse_exportable_type_id;
		seahorse_exportable_type_id = g_type_register_static (G_TYPE_INTERFACE, "SeahorseExportable", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (seahorse_exportable_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&seahorse_exportable_type_id__volatile, seahorse_exportable_type_id);
	}
	return seahorse_exportable_type_id__volatile;
}



