/* build_tool_dialog.c generated by valac 0.36.3, the Vala compiler
 * generated from build_tool_dialog.vala, do not modify */

/*
 * This file is part of LaTeXila.
 *
 * Copyright © 2010-2015 Sébastien Wilmet
 *
 * LaTeXila 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 3 of the License, or
 * (at your option) any later version.
 *
 * LaTeXila 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 LaTeXila.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Author: Sébastien Wilmet
 */
/* The configuration of a single build tool.*/

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <latexila.h>
#include <stdlib.h>
#include <string.h>


#define TYPE_BUILD_TOOL_DIALOG (build_tool_dialog_get_type ())
#define BUILD_TOOL_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BUILD_TOOL_DIALOG, BuildToolDialog))
#define BUILD_TOOL_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BUILD_TOOL_DIALOG, BuildToolDialogClass))
#define IS_BUILD_TOOL_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BUILD_TOOL_DIALOG))
#define IS_BUILD_TOOL_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BUILD_TOOL_DIALOG))
#define BUILD_TOOL_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BUILD_TOOL_DIALOG, BuildToolDialogClass))

typedef struct _BuildToolDialog BuildToolDialog;
typedef struct _BuildToolDialogClass BuildToolDialogClass;
typedef struct _BuildToolDialogPrivate BuildToolDialogPrivate;

#define BUILD_TOOL_DIALOG_TYPE_ICON_COLUMN (build_tool_dialog_icon_column_get_type ())

#define BUILD_TOOL_DIALOG_TYPE_JOB_COLUMN (build_tool_dialog_job_column_get_type ())

#define BUILD_TOOL_DIALOG_TYPE_POST_PROCESSOR_COLUMN (build_tool_dialog_post_processor_column_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
typedef struct _Block2Data Block2Data;
#define __g_list_free__gtk_tree_path_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__gtk_tree_path_free0_ (var), NULL)))
#define _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))
typedef struct _Block3Data Block3Data;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _BuildToolDialog {
	GObject parent_instance;
	BuildToolDialogPrivate * priv;
};

struct _BuildToolDialogClass {
	GObjectClass parent_class;
};

struct _BuildToolDialogPrivate {
	GtkDialog* _dialog;
	GtkEntry* _entry_label;
	GtkEntry* _entry_desc;
	GtkEntry* _entry_extensions;
	GtkEntry* _entry_files_to_open;
	GtkListStore* _icons_store;
	GtkComboBox* _icons_combobox;
	GtkListStore* _jobs_store;
	GtkTreeView* _jobs_view;
};

typedef enum  {
	BUILD_TOOL_DIALOG_ICON_COLUMN_ICON_NAME,
	BUILD_TOOL_DIALOG_ICON_COLUMN_LABEL,
	BUILD_TOOL_DIALOG_ICON_COLUMN_N_COLUMNS
} BuildToolDialogIconColumn;

typedef enum  {
	BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND,
	BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR,
	BUILD_TOOL_DIALOG_JOB_COLUMN_N_COLUMNS
} BuildToolDialogJobColumn;

typedef enum  {
	BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_NAME,
	BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_N_COLUMNS
} BuildToolDialogPostProcessorColumn;

struct _Block1Data {
	int _ref_count_;
	BuildToolDialog* self;
	GtkToolButton* remove_button;
	GtkTreeSelection* select;
};

struct _Block2Data {
	int _ref_count_;
	BuildToolDialog* self;
	GtkToolButton* up_button;
	GtkTreeSelection* select;
};

struct _Block3Data {
	int _ref_count_;
	BuildToolDialog* self;
	GtkToolButton* down_button;
	GtkTreeSelection* select;
};


static gpointer build_tool_dialog_parent_class = NULL;

GType build_tool_dialog_get_type (void) G_GNUC_CONST;
#define BUILD_TOOL_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_BUILD_TOOL_DIALOG, BuildToolDialogPrivate))
enum  {
	BUILD_TOOL_DIALOG_DUMMY_PROPERTY
};
static GType build_tool_dialog_icon_column_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static GType build_tool_dialog_job_column_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static GType build_tool_dialog_post_processor_column_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
BuildToolDialog* build_tool_dialog_new (GtkWindow* parent, gboolean editable);
BuildToolDialog* build_tool_dialog_construct (GType object_type, GtkWindow* parent, gboolean editable);
static void build_tool_dialog_init_text_entries (BuildToolDialog* self, gboolean editable);
static void build_tool_dialog_init_icons_store (BuildToolDialog* self);
static void build_tool_dialog_init_icons_combobox (BuildToolDialog* self);
static void build_tool_dialog_init_jobs (BuildToolDialog* self, gboolean editable);
static GtkGrid* build_tool_dialog_get_main_grid (BuildToolDialog* self, gboolean editable);
gboolean build_tool_dialog_open_build_tool (BuildToolDialog* self, LatexilaBuildTools* build_tools, gint build_tool_num);
static void build_tool_dialog_set_build_tool (BuildToolDialog* self, LatexilaBuildTool* build_tool);
static LatexilaBuildTool* build_tool_dialog_retrieve_build_tool (BuildToolDialog* self);
gboolean build_tool_dialog_create_personal_build_tool (BuildToolDialog* self);
static void build_tool_dialog_set_new_build_tool (BuildToolDialog* self);
static void build_tool_dialog_add_icon (BuildToolDialog* self, const gchar* icon_name, const gchar* label);
static void ___lambda108_ (BuildToolDialog* self, const gchar* path_string, const gchar* new_text);
static void ____lambda108__gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self);
static void __lambda109_ (BuildToolDialog* self, const gchar* path_string, const gchar* new_text);
static void ___lambda109__gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self);
static GtkToolButton* build_tool_dialog_get_add_button (BuildToolDialog* self);
static void __lambda110_ (BuildToolDialog* self);
static void build_tool_dialog_add_build_job (BuildToolDialog* self, LatexilaBuildJob* job);
static void ___lambda110__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static GtkToolButton* build_tool_dialog_get_remove_button (BuildToolDialog* self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void __lambda111_ (Block1Data* _data1_);
static void ___lambda111__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
static void __lambda112_ (BuildToolDialog* self);
gint utils_get_selected_row (GtkTreeView* view, GtkTreeIter* iter);
static void ___lambda112__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static GtkToolButton* build_tool_dialog_get_up_button (BuildToolDialog* self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void __lambda113_ (Block2Data* _data2_);
static void _gtk_tree_path_free0_ (gpointer var);
static void _g_list_free__gtk_tree_path_free0_ (GList* self);
static void ___lambda113__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
static void __lambda114_ (Block2Data* _data2_);
gboolean utils_tree_model_iter_prev (GtkTreeModel* model, GtkTreeIter* iter);
static void ___lambda114__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static GtkToolButton* build_tool_dialog_get_down_button (BuildToolDialog* self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void __lambda115_ (Block3Data* _data3_);
static void ___lambda115__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
static void __lambda116_ (Block3Data* _data3_);
static void ___lambda116__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static GtkGrid* build_tool_dialog_get_label_grid (BuildToolDialog* self);
static GtkWidget* build_tool_dialog_get_desc_grid (BuildToolDialog* self);
static GtkWidget* build_tool_dialog_get_extensions_grid (BuildToolDialog* self);
static GtkWidget* build_tool_dialog_get_icons_grid (BuildToolDialog* self);
static GtkWidget* build_tool_dialog_get_jobs_grid (BuildToolDialog* self, gboolean editable);
static GtkWidget* build_tool_dialog_get_files_to_open_grid (BuildToolDialog* self);
GtkScrolledWindow* utils_add_scrollbar (GtkWidget* child);
static void build_tool_dialog_finalize (GObject * obj);


static GType build_tool_dialog_icon_column_get_type (void) {
	static volatile gsize build_tool_dialog_icon_column_type_id__volatile = 0;
	if (g_once_init_enter (&build_tool_dialog_icon_column_type_id__volatile)) {
		static const GEnumValue values[] = {{BUILD_TOOL_DIALOG_ICON_COLUMN_ICON_NAME, "BUILD_TOOL_DIALOG_ICON_COLUMN_ICON_NAME", "icon-name"}, {BUILD_TOOL_DIALOG_ICON_COLUMN_LABEL, "BUILD_TOOL_DIALOG_ICON_COLUMN_LABEL", "label"}, {BUILD_TOOL_DIALOG_ICON_COLUMN_N_COLUMNS, "BUILD_TOOL_DIALOG_ICON_COLUMN_N_COLUMNS", "n-columns"}, {0, NULL, NULL}};
		GType build_tool_dialog_icon_column_type_id;
		build_tool_dialog_icon_column_type_id = g_enum_register_static ("BuildToolDialogIconColumn", values);
		g_once_init_leave (&build_tool_dialog_icon_column_type_id__volatile, build_tool_dialog_icon_column_type_id);
	}
	return build_tool_dialog_icon_column_type_id__volatile;
}


static GType build_tool_dialog_job_column_get_type (void) {
	static volatile gsize build_tool_dialog_job_column_type_id__volatile = 0;
	if (g_once_init_enter (&build_tool_dialog_job_column_type_id__volatile)) {
		static const GEnumValue values[] = {{BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND, "BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND", "command"}, {BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR, "BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR", "post-processor"}, {BUILD_TOOL_DIALOG_JOB_COLUMN_N_COLUMNS, "BUILD_TOOL_DIALOG_JOB_COLUMN_N_COLUMNS", "n-columns"}, {0, NULL, NULL}};
		GType build_tool_dialog_job_column_type_id;
		build_tool_dialog_job_column_type_id = g_enum_register_static ("BuildToolDialogJobColumn", values);
		g_once_init_leave (&build_tool_dialog_job_column_type_id__volatile, build_tool_dialog_job_column_type_id);
	}
	return build_tool_dialog_job_column_type_id__volatile;
}


static GType build_tool_dialog_post_processor_column_get_type (void) {
	static volatile gsize build_tool_dialog_post_processor_column_type_id__volatile = 0;
	if (g_once_init_enter (&build_tool_dialog_post_processor_column_type_id__volatile)) {
		static const GEnumValue values[] = {{BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_NAME, "BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_NAME", "name"}, {BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_N_COLUMNS, "BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_N_COLUMNS", "n-columns"}, {0, NULL, NULL}};
		GType build_tool_dialog_post_processor_column_type_id;
		build_tool_dialog_post_processor_column_type_id = g_enum_register_static ("BuildToolDialogPostProcessorColumn", values);
		g_once_init_leave (&build_tool_dialog_post_processor_column_type_id__volatile, build_tool_dialog_post_processor_column_type_id);
	}
	return build_tool_dialog_post_processor_column_type_id__volatile;
}


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


BuildToolDialog* build_tool_dialog_construct (GType object_type, GtkWindow* parent, gboolean editable) {
	BuildToolDialog * self = NULL;
	GObject* _tmp0_;
	GObject* _tmp1_;
	GtkDialog* _tmp2_;
	GtkDialog* _tmp3_;
	GtkDialog* _tmp4_;
	GtkDialog* _tmp5_;
	GtkWindow* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	GtkBox* content_area = NULL;
	GtkDialog* _tmp15_;
	GtkBox* _tmp16_;
	GtkBox* _tmp17_;
	gboolean _tmp18_;
	GtkGrid* _tmp19_;
	GtkGrid* _tmp20_;
	g_return_val_if_fail (parent != NULL, NULL);
	self = (BuildToolDialog*) g_object_new (object_type, NULL);
	_tmp0_ = g_object_new (gtk_dialog_get_type (), "use-header-bar", TRUE, NULL, NULL);
	_tmp1_ = G_IS_INITIALLY_UNOWNED (_tmp0_) ? g_object_ref_sink (_tmp0_) : _tmp0_;
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, gtk_dialog_get_type ()) ? ((GtkDialog*) _tmp1_) : NULL;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (_tmp1_);
	}
	_g_object_unref0 (self->priv->_dialog);
	self->priv->_dialog = _tmp2_;
	_tmp3_ = self->priv->_dialog;
	gtk_window_set_destroy_with_parent ((GtkWindow*) _tmp3_, TRUE);
	_tmp4_ = self->priv->_dialog;
	gtk_window_set_modal ((GtkWindow*) _tmp4_, TRUE);
	_tmp5_ = self->priv->_dialog;
	_tmp6_ = parent;
	gtk_window_set_transient_for ((GtkWindow*) _tmp5_, _tmp6_);
	_tmp7_ = editable;
	if (_tmp7_) {
		GtkDialog* _tmp8_;
		GtkDialog* _tmp9_;
		GtkDialog* _tmp10_;
		GtkDialog* _tmp11_;
		_tmp8_ = self->priv->_dialog;
		gtk_window_set_title ((GtkWindow*) _tmp8_, _ ("Personal Build Tool"));
		_tmp9_ = self->priv->_dialog;
		gtk_dialog_add_button (_tmp9_, _ ("_Cancel"), (gint) GTK_RESPONSE_CANCEL);
		_tmp10_ = self->priv->_dialog;
		gtk_dialog_add_button (_tmp10_, _ ("_Apply"), (gint) GTK_RESPONSE_APPLY);
		_tmp11_ = self->priv->_dialog;
		gtk_dialog_set_default_response (_tmp11_, (gint) GTK_RESPONSE_APPLY);
	} else {
		GtkDialog* _tmp12_;
		_tmp12_ = self->priv->_dialog;
		gtk_window_set_title ((GtkWindow*) _tmp12_, _ ("Default Build Tool (read-only)"));
	}
	_tmp13_ = editable;
	build_tool_dialog_init_text_entries (self, _tmp13_);
	build_tool_dialog_init_icons_store (self);
	build_tool_dialog_init_icons_combobox (self);
	_tmp14_ = editable;
	build_tool_dialog_init_jobs (self, _tmp14_);
	_tmp15_ = self->priv->_dialog;
	_tmp16_ = (GtkBox*) gtk_dialog_get_content_area (_tmp15_);
	_tmp17_ = _g_object_ref0 (_tmp16_);
	content_area = _tmp17_;
	_tmp18_ = editable;
	_tmp19_ = build_tool_dialog_get_main_grid (self, _tmp18_);
	_tmp20_ = _tmp19_;
	gtk_box_pack_start (content_area, (GtkWidget*) _tmp20_, TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp20_);
	gtk_widget_show_all ((GtkWidget*) content_area);
	_g_object_unref0 (content_area);
	return self;
}


BuildToolDialog* build_tool_dialog_new (GtkWindow* parent, gboolean editable) {
	return build_tool_dialog_construct (TYPE_BUILD_TOOL_DIALOG, parent, editable);
}


gboolean build_tool_dialog_open_build_tool (BuildToolDialog* self, LatexilaBuildTools* build_tools, gint build_tool_num) {
	gboolean result = FALSE;
	LatexilaBuildTool* build_tool = NULL;
	LatexilaBuildTools* _tmp0_;
	gint _tmp1_;
	LatexilaBuildTool* _tmp2_;
	LatexilaBuildTool* _tmp3_;
	LatexilaBuildTool* _tmp4_;
	LatexilaBuildTool* _tmp5_;
	gboolean apply = FALSE;
	GtkDialog* _tmp6_;
	gint _tmp7_;
	gboolean _tmp8_;
	GtkDialog* _tmp19_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (build_tools != NULL, FALSE);
	_tmp0_ = build_tools;
	_tmp1_ = build_tool_num;
	_tmp2_ = latexila_build_tools_nth (_tmp0_, (guint) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	build_tool = _tmp3_;
	_tmp4_ = build_tool;
	g_return_val_if_fail (_tmp4_ != NULL, FALSE);
	_tmp5_ = build_tool;
	build_tool_dialog_set_build_tool (self, _tmp5_);
	_tmp6_ = self->priv->_dialog;
	_tmp7_ = gtk_dialog_run (_tmp6_);
	apply = _tmp7_ == ((gint) GTK_RESPONSE_APPLY);
	_tmp8_ = apply;
	if (_tmp8_) {
		LatexilaBuildTool* new_build_tool = NULL;
		LatexilaBuildTool* _tmp9_;
		LatexilaBuildTool* _tmp10_;
		LatexilaBuildTool* _tmp11_;
		gboolean _tmp12_;
		gboolean _tmp13_;
		LatexilaBuildToolsPersonal* personal_build_tools = NULL;
		LatexilaBuildTools* _tmp14_;
		LatexilaBuildToolsPersonal* _tmp15_;
		LatexilaBuildToolsPersonal* _tmp16_;
		LatexilaBuildTool* _tmp17_;
		gint _tmp18_;
		_tmp9_ = build_tool_dialog_retrieve_build_tool (self);
		new_build_tool = _tmp9_;
		_tmp10_ = new_build_tool;
		_tmp11_ = build_tool;
		g_object_get (_tmp11_, "enabled", &_tmp12_, NULL);
		_tmp13_ = _tmp12_;
		g_object_set (_tmp10_, "enabled", _tmp13_, NULL);
		_tmp14_ = build_tools;
		_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, latexila_build_tools_personal_get_type ()) ? ((LatexilaBuildToolsPersonal*) _tmp14_) : NULL);
		personal_build_tools = _tmp15_;
		_tmp16_ = personal_build_tools;
		_tmp17_ = new_build_tool;
		_tmp18_ = build_tool_num;
		latexila_build_tools_personal_replace (_tmp16_, _tmp17_, (guint) _tmp18_);
		_g_object_unref0 (personal_build_tools);
		_g_object_unref0 (new_build_tool);
	}
	_tmp19_ = self->priv->_dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp19_);
	result = apply;
	_g_object_unref0 (build_tool);
	return result;
}


gboolean build_tool_dialog_create_personal_build_tool (BuildToolDialog* self) {
	gboolean result = FALSE;
	gboolean apply = FALSE;
	GtkDialog* _tmp0_;
	gint _tmp1_;
	gboolean _tmp2_;
	GtkDialog* _tmp9_;
	g_return_val_if_fail (self != NULL, FALSE);
	build_tool_dialog_set_new_build_tool (self);
	_tmp0_ = self->priv->_dialog;
	_tmp1_ = gtk_dialog_run (_tmp0_);
	apply = _tmp1_ == ((gint) GTK_RESPONSE_APPLY);
	_tmp2_ = apply;
	if (_tmp2_) {
		LatexilaBuildTool* new_build_tool = NULL;
		LatexilaBuildTool* _tmp3_;
		LatexilaBuildTool* _tmp4_;
		LatexilaBuildToolsPersonal* build_tools = NULL;
		LatexilaBuildToolsPersonal* _tmp5_;
		LatexilaBuildToolsPersonal* _tmp6_;
		LatexilaBuildToolsPersonal* _tmp7_;
		LatexilaBuildTool* _tmp8_;
		_tmp3_ = build_tool_dialog_retrieve_build_tool (self);
		new_build_tool = _tmp3_;
		_tmp4_ = new_build_tool;
		g_object_set (_tmp4_, "enabled", TRUE, NULL);
		_tmp5_ = latexila_build_tools_personal_get_instance ();
		_tmp6_ = _g_object_ref0 (_tmp5_);
		build_tools = _tmp6_;
		_tmp7_ = build_tools;
		_tmp8_ = new_build_tool;
		latexila_build_tools_personal_add (_tmp7_, _tmp8_);
		_g_object_unref0 (build_tools);
		_g_object_unref0 (new_build_tool);
	}
	_tmp9_ = self->priv->_dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp9_);
	result = apply;
	return result;
}


/*************************************************************************/
static void build_tool_dialog_init_text_entries (BuildToolDialog* self, gboolean editable) {
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	GtkEntry* _tmp2_;
	GtkEntry* _tmp3_;
	GtkEntry* _tmp4_;
	gboolean _tmp5_;
	GtkEntry* _tmp6_;
	gboolean _tmp7_;
	GtkEntry* _tmp8_;
	gboolean _tmp9_;
	GtkEntry* _tmp10_;
	gboolean _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->_entry_label);
	self->priv->_entry_label = _tmp0_;
	_tmp1_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_entry_desc);
	self->priv->_entry_desc = _tmp1_;
	_tmp2_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->_entry_extensions);
	self->priv->_entry_extensions = _tmp2_;
	_tmp3_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->_entry_files_to_open);
	self->priv->_entry_files_to_open = _tmp3_;
	_tmp4_ = self->priv->_entry_label;
	_tmp5_ = editable;
	gtk_editable_set_editable ((GtkEditable*) _tmp4_, _tmp5_);
	_tmp6_ = self->priv->_entry_desc;
	_tmp7_ = editable;
	gtk_editable_set_editable ((GtkEditable*) _tmp6_, _tmp7_);
	_tmp8_ = self->priv->_entry_extensions;
	_tmp9_ = editable;
	gtk_editable_set_editable ((GtkEditable*) _tmp8_, _tmp9_);
	_tmp10_ = self->priv->_entry_files_to_open;
	_tmp11_ = editable;
	gtk_editable_set_editable ((GtkEditable*) _tmp10_, _tmp11_);
}


static void build_tool_dialog_init_icons_store (BuildToolDialog* self) {
	GtkListStore* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_list_store_new ((gint) BUILD_TOOL_DIALOG_ICON_COLUMN_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, -1);
	_g_object_unref0 (self->priv->_icons_store);
	self->priv->_icons_store = _tmp0_;
	build_tool_dialog_add_icon (self, "system-run", _ ("Execute"));
	build_tool_dialog_add_icon (self, "compile_dvi", "LaTeX → DVI");
	build_tool_dialog_add_icon (self, "compile_pdf", "LaTeX → PDF");
	build_tool_dialog_add_icon (self, "compile_ps", "LaTeX → PS");
	build_tool_dialog_add_icon (self, GTK_STOCK_CONVERT, _ ("Convert"));
	build_tool_dialog_add_icon (self, "text-x-generic", _ ("View File"));
	build_tool_dialog_add_icon (self, "latexila-dvi", _ ("View DVI"));
	build_tool_dialog_add_icon (self, "latexila-pdf", _ ("View PDF"));
	build_tool_dialog_add_icon (self, "latexila-ps", _ ("View PS"));
}


static void build_tool_dialog_add_icon (BuildToolDialog* self, const gchar* icon_name, const gchar* label) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	GtkListStore* _tmp2_;
	GtkTreeIter _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (icon_name != NULL);
	g_return_if_fail (label != NULL);
	_tmp0_ = self->priv->_icons_store;
	gtk_list_store_append (_tmp0_, &_tmp1_);
	iter = _tmp1_;
	_tmp2_ = self->priv->_icons_store;
	_tmp3_ = iter;
	_tmp4_ = icon_name;
	_tmp5_ = label;
	gtk_list_store_set (_tmp2_, &_tmp3_, BUILD_TOOL_DIALOG_ICON_COLUMN_ICON_NAME, _tmp4_, BUILD_TOOL_DIALOG_ICON_COLUMN_LABEL, _tmp5_, -1);
}


static void build_tool_dialog_init_icons_combobox (BuildToolDialog* self) {
	GtkListStore* _tmp0_;
	GtkComboBox* _tmp1_;
	GtkCellRendererPixbuf* pixbuf_renderer = NULL;
	GtkCellRendererPixbuf* _tmp2_;
	GtkComboBox* _tmp3_;
	GtkComboBox* _tmp4_;
	GtkCellRendererText* text_renderer = NULL;
	GtkCellRendererText* _tmp5_;
	GtkComboBox* _tmp6_;
	GtkComboBox* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_icons_store;
	_tmp1_ = (GtkComboBox*) gtk_combo_box_new_with_model ((GtkTreeModel*) _tmp0_);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_icons_combobox);
	self->priv->_icons_combobox = _tmp1_;
	_tmp2_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
	g_object_ref_sink (_tmp2_);
	pixbuf_renderer = _tmp2_;
	_tmp3_ = self->priv->_icons_combobox;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp3_, (GtkCellRenderer*) pixbuf_renderer, FALSE);
	_tmp4_ = self->priv->_icons_combobox;
	gtk_cell_layout_set_attributes ((GtkCellLayout*) _tmp4_, (GtkCellRenderer*) pixbuf_renderer, "icon-name", BUILD_TOOL_DIALOG_ICON_COLUMN_ICON_NAME, NULL);
	_tmp5_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp5_);
	text_renderer = _tmp5_;
	_tmp6_ = self->priv->_icons_combobox;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp6_, (GtkCellRenderer*) text_renderer, TRUE);
	_tmp7_ = self->priv->_icons_combobox;
	gtk_cell_layout_set_attributes ((GtkCellLayout*) _tmp7_, (GtkCellRenderer*) text_renderer, "text", BUILD_TOOL_DIALOG_ICON_COLUMN_LABEL, NULL);
	_g_object_unref0 (text_renderer);
	_g_object_unref0 (pixbuf_renderer);
}


static void ___lambda108_ (BuildToolDialog* self, const gchar* path_string, const gchar* new_text) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_;
	const gchar* _tmp1_;
	GtkTreeIter _tmp2_ = {0};
	GtkListStore* _tmp3_;
	GtkTreeIter _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (path_string != NULL);
	g_return_if_fail (new_text != NULL);
	_tmp0_ = self->priv->_jobs_store;
	_tmp1_ = path_string;
	gtk_tree_model_get_iter_from_string ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
	iter = _tmp2_;
	_tmp3_ = self->priv->_jobs_store;
	_tmp4_ = iter;
	_tmp5_ = new_text;
	gtk_list_store_set (_tmp3_, &_tmp4_, BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND, _tmp5_, -1);
}


static void ____lambda108__gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self) {
	___lambda108_ ((BuildToolDialog*) self, path, new_text);
}


static void __lambda109_ (BuildToolDialog* self, const gchar* path_string, const gchar* new_text) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_;
	const gchar* _tmp1_;
	GtkTreeIter _tmp2_ = {0};
	GtkListStore* _tmp3_;
	GtkTreeIter _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (path_string != NULL);
	g_return_if_fail (new_text != NULL);
	_tmp0_ = self->priv->_jobs_store;
	_tmp1_ = path_string;
	gtk_tree_model_get_iter_from_string ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
	iter = _tmp2_;
	_tmp3_ = self->priv->_jobs_store;
	_tmp4_ = iter;
	_tmp5_ = new_text;
	gtk_list_store_set (_tmp3_, &_tmp4_, BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR, _tmp5_, -1);
}


static void ___lambda109__gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self) {
	__lambda109_ ((BuildToolDialog*) self, path, new_text);
}


static void build_tool_dialog_init_jobs (BuildToolDialog* self, gboolean editable) {
	GtkListStore* _tmp0_;
	GtkListStore* _tmp1_;
	GtkTreeView* _tmp2_;
	GtkListStore* post_processor_store = NULL;
	GtkListStore* _tmp3_;
	GtkListStore* _tmp14_;
	GtkCellRendererText* text_renderer = NULL;
	GtkCellRendererText* _tmp15_;
	GtkCellRendererText* _tmp16_;
	GtkTreeViewColumn* column = NULL;
	GtkCellRendererText* _tmp17_;
	GtkTreeViewColumn* _tmp18_;
	GtkTreeViewColumn* _tmp19_;
	GtkTreeView* _tmp20_;
	GtkTreeViewColumn* _tmp21_;
	GtkCellRendererCombo* combo_renderer = NULL;
	GtkCellRendererCombo* _tmp22_;
	GtkCellRendererCombo* _tmp23_;
	gboolean _tmp24_;
	GtkCellRendererCombo* _tmp25_;
	GtkListStore* _tmp26_;
	GtkCellRendererCombo* _tmp27_;
	GtkCellRendererCombo* _tmp28_;
	GtkTreeView* _tmp29_;
	GtkCellRendererCombo* _tmp30_;
	gboolean _tmp31_;
	GtkCellRendererCombo* _tmp33_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_list_store_new ((gint) BUILD_TOOL_DIALOG_JOB_COLUMN_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, -1);
	_g_object_unref0 (self->priv->_jobs_store);
	self->priv->_jobs_store = _tmp0_;
	_tmp1_ = self->priv->_jobs_store;
	_tmp2_ = (GtkTreeView*) gtk_tree_view_new_with_model ((GtkTreeModel*) _tmp1_);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->_jobs_view);
	self->priv->_jobs_view = _tmp2_;
	_tmp3_ = gtk_list_store_new ((gint) BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_N_COLUMNS, G_TYPE_STRING, -1);
	post_processor_store = _tmp3_;
	{
		gint type = 0;
		type = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				gint _tmp6_;
				const gchar* name = NULL;
				gint _tmp7_;
				const gchar* _tmp8_;
				GtkTreeIter iter = {0};
				GtkListStore* _tmp9_;
				GtkTreeIter _tmp10_ = {0};
				GtkListStore* _tmp11_;
				GtkTreeIter _tmp12_;
				const gchar* _tmp13_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = type;
					type = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				_tmp6_ = type;
				if (!(_tmp6_ < ((gint) LATEXILA_POST_PROCESSOR_TYPE_NB_TYPES))) {
					break;
				}
				_tmp7_ = type;
				_tmp8_ = latexila_post_processor_get_name_from_type ((LatexilaPostProcessorType) _tmp7_);
				name = _tmp8_;
				_tmp9_ = post_processor_store;
				gtk_list_store_append (_tmp9_, &_tmp10_);
				iter = _tmp10_;
				_tmp11_ = post_processor_store;
				_tmp12_ = iter;
				_tmp13_ = name;
				gtk_list_store_set (_tmp11_, &_tmp12_, BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_NAME, _tmp13_, -1);
			}
		}
	}
	_tmp14_ = post_processor_store;
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp14_, (gint) BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_NAME, GTK_SORT_ASCENDING);
	_tmp15_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp15_);
	text_renderer = _tmp15_;
	_tmp16_ = text_renderer;
	g_object_set (_tmp16_, "editable", TRUE, NULL);
	_tmp17_ = text_renderer;
	_tmp18_ = gtk_tree_view_column_new_with_attributes (_ ("Commands"), (GtkCellRenderer*) _tmp17_, "text", BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND, NULL);
	g_object_ref_sink (_tmp18_);
	column = _tmp18_;
	_tmp19_ = column;
	gtk_tree_view_column_set_resizable (_tmp19_, TRUE);
	_tmp20_ = self->priv->_jobs_view;
	_tmp21_ = column;
	gtk_tree_view_append_column (_tmp20_, _tmp21_);
	_tmp22_ = (GtkCellRendererCombo*) gtk_cell_renderer_combo_new ();
	g_object_ref_sink (_tmp22_);
	combo_renderer = _tmp22_;
	_tmp23_ = combo_renderer;
	_tmp24_ = editable;
	g_object_set ((GtkCellRendererText*) _tmp23_, "editable", _tmp24_, NULL);
	_tmp25_ = combo_renderer;
	_tmp26_ = post_processor_store;
	g_object_set (_tmp25_, "model", (GtkTreeModel*) _tmp26_, NULL);
	_tmp27_ = combo_renderer;
	g_object_set (_tmp27_, "text-column", (gint) BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_NAME, NULL);
	_tmp28_ = combo_renderer;
	g_object_set (_tmp28_, "has-entry", FALSE, NULL);
	_tmp29_ = self->priv->_jobs_view;
	_tmp30_ = combo_renderer;
	gtk_tree_view_insert_column_with_attributes (_tmp29_, -1, _ ("Post Processor"), (GtkCellRenderer*) _tmp30_, "text", BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR, NULL);
	_tmp31_ = editable;
	if (_tmp31_) {
		GtkCellRendererText* _tmp32_;
		_tmp32_ = text_renderer;
		g_signal_connect_object (_tmp32_, "edited", (GCallback) ____lambda108__gtk_cell_renderer_text_edited, self, 0);
	}
	_tmp33_ = combo_renderer;
	g_signal_connect_object ((GtkCellRendererText*) _tmp33_, "edited", (GCallback) ___lambda109__gtk_cell_renderer_text_edited, self, 0);
	_g_object_unref0 (combo_renderer);
	_g_object_unref0 (column);
	_g_object_unref0 (text_renderer);
	_g_object_unref0 (post_processor_store);
}


/*************************************************************************/
static void __lambda110_ (BuildToolDialog* self) {
	LatexilaBuildJob* new_job = NULL;
	LatexilaBuildJob* _tmp0_;
	_tmp0_ = latexila_build_job_new ();
	new_job = _tmp0_;
	g_object_set (new_job, "command", "", NULL);
	g_object_set (new_job, "post-processor-type", LATEXILA_POST_PROCESSOR_TYPE_ALL_OUTPUT, NULL);
	build_tool_dialog_add_build_job (self, new_job);
	_g_object_unref0 (new_job);
}


static void ___lambda110__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda110_ ((BuildToolDialog*) self);
}


static GtkToolButton* build_tool_dialog_get_add_button (BuildToolDialog* self) {
	GtkToolButton* result = NULL;
	GtkToolButton* add_button = NULL;
	GtkToolButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
	g_object_ref_sink (_tmp0_);
	add_button = _tmp0_;
	gtk_tool_button_set_icon_name (add_button, "list-add-symbolic");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) add_button, _ ("Add..."));
	g_signal_connect_object (add_button, "clicked", (GCallback) ___lambda110__gtk_tool_button_clicked, self, 0);
	result = add_button;
	return result;
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		BuildToolDialog* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->remove_button);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}


static void __lambda111_ (Block1Data* _data1_) {
	BuildToolDialog* self;
	gboolean row_selected = FALSE;
	gint _tmp0_;
	self = _data1_->self;
	_tmp0_ = gtk_tree_selection_count_selected_rows (_data1_->select);
	row_selected = _tmp0_ > 0;
	gtk_widget_set_sensitive ((GtkWidget*) _data1_->remove_button, row_selected);
}


static void ___lambda111__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
	__lambda111_ (self);
}


static void __lambda112_ (BuildToolDialog* self) {
	GtkTreeIter iter = {0};
	gint selected_row = 0;
	GtkTreeView* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gint _tmp2_;
	gint _tmp3_;
	_tmp0_ = self->priv->_jobs_view;
	_tmp2_ = utils_get_selected_row (_tmp0_, &_tmp1_);
	iter = _tmp1_;
	selected_row = _tmp2_;
	_tmp3_ = selected_row;
	if (_tmp3_ >= 0) {
		GtkListStore* _tmp4_;
		_tmp4_ = self->priv->_jobs_store;
		gtk_list_store_remove (_tmp4_, &iter);
	}
}


static void ___lambda112__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda112_ ((BuildToolDialog*) self);
}


static GtkToolButton* build_tool_dialog_get_remove_button (BuildToolDialog* self) {
	GtkToolButton* result = NULL;
	Block1Data* _data1_;
	GtkToolButton* _tmp0_;
	GtkTreeView* _tmp1_;
	GtkTreeSelection* _tmp2_;
	GtkToolButton* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	_tmp0_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
	g_object_ref_sink (_tmp0_);
	_data1_->remove_button = _tmp0_;
	gtk_tool_button_set_icon_name (_data1_->remove_button, "list-remove-symbolic");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) _data1_->remove_button, _ ("Remove"));
	gtk_widget_set_sensitive ((GtkWidget*) _data1_->remove_button, FALSE);
	_tmp1_ = self->priv->_jobs_view;
	_tmp2_ = gtk_tree_view_get_selection (_tmp1_);
	_data1_->select = _tmp2_;
	g_signal_connect_data (_data1_->select, "changed", (GCallback) ___lambda111__gtk_tree_selection_changed, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	g_signal_connect_object (_data1_->remove_button, "clicked", (GCallback) ___lambda112__gtk_tool_button_clicked, self, 0);
	_tmp3_ = _g_object_ref0 (_data1_->remove_button);
	result = _tmp3_;
	block1_data_unref (_data1_);
	_data1_ = NULL;
	return result;
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		BuildToolDialog* self;
		self = _data2_->self;
		_g_object_unref0 (_data2_->up_button);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


static void _gtk_tree_path_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL));
}


static void _g_list_free__gtk_tree_path_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _gtk_tree_path_free0_, NULL);
	g_list_free (self);
}


static gpointer _gtk_tree_path_copy0 (gpointer self) {
	return self ? gtk_tree_path_copy (self) : NULL;
}


static void __lambda113_ (Block2Data* _data2_) {
	BuildToolDialog* self;
	GList* selected_rows = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	guint _tmp2_;
	GtkTreePath* path_selected = NULL;
	GList* _tmp3_;
	gconstpointer _tmp4_;
	GtkTreePath* _tmp5_;
	gint row_num = 0;
	GtkTreePath* _tmp6_;
	gint _tmp7_;
	gint* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	self = _data2_->self;
	_tmp0_ = gtk_tree_selection_get_selected_rows (_data2_->select, NULL);
	selected_rows = _tmp0_;
	_tmp1_ = selected_rows;
	_tmp2_ = g_list_length (_tmp1_);
	if (_tmp2_ == ((guint) 0)) {
		gtk_widget_set_sensitive ((GtkWidget*) _data2_->up_button, FALSE);
		__g_list_free__gtk_tree_path_free0_0 (selected_rows);
		return;
	}
	_tmp3_ = selected_rows;
	_tmp4_ = g_list_nth_data (_tmp3_, (guint) 0);
	_tmp5_ = _gtk_tree_path_copy0 ((GtkTreePath*) _tmp4_);
	path_selected = _tmp5_;
	_tmp6_ = path_selected;
	_tmp8_ = gtk_tree_path_get_indices_with_depth (_tmp6_, &_tmp7_);
	_tmp9_ = _tmp8_[0];
	row_num = _tmp9_;
	_tmp10_ = row_num;
	gtk_widget_set_sensitive ((GtkWidget*) _data2_->up_button, _tmp10_ > 0);
	_gtk_tree_path_free0 (path_selected);
	__g_list_free__gtk_tree_path_free0_0 (selected_rows);
}


static void ___lambda113__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
	__lambda113_ (self);
}


static void __lambda114_ (Block2Data* _data2_) {
	BuildToolDialog* self;
	GtkTreeIter iter_selected = {0};
	gint selected_row = 0;
	GtkTreeView* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gint _tmp2_;
	gint _tmp3_;
	self = _data2_->self;
	_tmp0_ = self->priv->_jobs_view;
	_tmp2_ = utils_get_selected_row (_tmp0_, &_tmp1_);
	iter_selected = _tmp1_;
	selected_row = _tmp2_;
	_tmp3_ = selected_row;
	if (_tmp3_ > 0) {
		GtkTreeIter iter_up = {0};
		GtkTreeIter _tmp4_;
		GtkListStore* _tmp5_;
		gboolean _tmp6_;
		_tmp4_ = iter_selected;
		iter_up = _tmp4_;
		_tmp5_ = self->priv->_jobs_store;
		_tmp6_ = utils_tree_model_iter_prev ((GtkTreeModel*) _tmp5_, &iter_up);
		if (_tmp6_) {
			GtkListStore* _tmp7_;
			GtkTreeIter _tmp8_;
			GtkTreeIter _tmp9_;
			_tmp7_ = self->priv->_jobs_store;
			_tmp8_ = iter_selected;
			_tmp9_ = iter_up;
			gtk_list_store_swap (_tmp7_, &_tmp8_, &_tmp9_);
			g_signal_emit_by_name (_data2_->select, "changed");
		}
	}
}


static void ___lambda114__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda114_ (self);
}


static GtkToolButton* build_tool_dialog_get_up_button (BuildToolDialog* self) {
	GtkToolButton* result = NULL;
	Block2Data* _data2_;
	GtkToolButton* _tmp0_;
	GtkTreeView* _tmp1_;
	GtkTreeSelection* _tmp2_;
	GtkToolButton* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
	g_object_ref_sink (_tmp0_);
	_data2_->up_button = _tmp0_;
	gtk_tool_button_set_icon_name (_data2_->up_button, "go-up-symbolic");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) _data2_->up_button, _ ("Move up"));
	gtk_widget_set_sensitive ((GtkWidget*) _data2_->up_button, FALSE);
	_tmp1_ = self->priv->_jobs_view;
	_tmp2_ = gtk_tree_view_get_selection (_tmp1_);
	_data2_->select = _tmp2_;
	g_signal_connect_data (_data2_->select, "changed", (GCallback) ___lambda113__gtk_tree_selection_changed, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	g_signal_connect_data (_data2_->up_button, "clicked", (GCallback) ___lambda114__gtk_tool_button_clicked, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp3_ = _g_object_ref0 (_data2_->up_button);
	result = _tmp3_;
	block2_data_unref (_data2_);
	_data2_ = NULL;
	return result;
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		BuildToolDialog* self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->down_button);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}


static void __lambda115_ (Block3Data* _data3_) {
	BuildToolDialog* self;
	GList* selected_rows = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	guint _tmp2_;
	GtkTreePath* path_selected = NULL;
	GList* _tmp3_;
	gconstpointer _tmp4_;
	GtkTreePath* _tmp5_;
	gint row_num = 0;
	GtkTreePath* _tmp6_;
	gint _tmp7_;
	gint* _tmp8_;
	gint _tmp9_;
	GtkTreeModel* model = NULL;
	GtkListStore* _tmp10_;
	GtkTreeModel* _tmp11_;
	gint nb_rows = 0;
	GtkTreeModel* _tmp12_;
	gint _tmp13_;
	gint _tmp14_;
	gint _tmp15_;
	self = _data3_->self;
	_tmp0_ = gtk_tree_selection_get_selected_rows (_data3_->select, NULL);
	selected_rows = _tmp0_;
	_tmp1_ = selected_rows;
	_tmp2_ = g_list_length (_tmp1_);
	if (_tmp2_ == ((guint) 0)) {
		gtk_widget_set_sensitive ((GtkWidget*) _data3_->down_button, FALSE);
		__g_list_free__gtk_tree_path_free0_0 (selected_rows);
		return;
	}
	_tmp3_ = selected_rows;
	_tmp4_ = g_list_nth_data (_tmp3_, (guint) 0);
	_tmp5_ = _gtk_tree_path_copy0 ((GtkTreePath*) _tmp4_);
	path_selected = _tmp5_;
	_tmp6_ = path_selected;
	_tmp8_ = gtk_tree_path_get_indices_with_depth (_tmp6_, &_tmp7_);
	_tmp9_ = _tmp8_[0];
	row_num = _tmp9_;
	_tmp10_ = self->priv->_jobs_store;
	_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, GTK_TYPE_TREE_MODEL) ? ((GtkTreeModel*) _tmp10_) : NULL);
	model = _tmp11_;
	_tmp12_ = model;
	_tmp13_ = gtk_tree_model_iter_n_children (_tmp12_, NULL);
	nb_rows = _tmp13_;
	_tmp14_ = row_num;
	_tmp15_ = nb_rows;
	gtk_widget_set_sensitive ((GtkWidget*) _data3_->down_button, _tmp14_ < (_tmp15_ - 1));
	_g_object_unref0 (model);
	_gtk_tree_path_free0 (path_selected);
	__g_list_free__gtk_tree_path_free0_0 (selected_rows);
}


static void ___lambda115__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
	__lambda115_ (self);
}


static void __lambda116_ (Block3Data* _data3_) {
	BuildToolDialog* self;
	GtkTreeIter iter_selected = {0};
	gint selected_row = 0;
	GtkTreeView* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gint _tmp2_;
	gint _tmp3_;
	self = _data3_->self;
	_tmp0_ = self->priv->_jobs_view;
	_tmp2_ = utils_get_selected_row (_tmp0_, &_tmp1_);
	iter_selected = _tmp1_;
	selected_row = _tmp2_;
	_tmp3_ = selected_row;
	if (_tmp3_ >= 0) {
		GtkTreeIter iter_down = {0};
		GtkTreeIter _tmp4_;
		GtkListStore* _tmp5_;
		gboolean _tmp6_;
		_tmp4_ = iter_selected;
		iter_down = _tmp4_;
		_tmp5_ = self->priv->_jobs_store;
		_tmp6_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp5_, &iter_down);
		if (_tmp6_) {
			GtkListStore* _tmp7_;
			GtkTreeIter _tmp8_;
			GtkTreeIter _tmp9_;
			_tmp7_ = self->priv->_jobs_store;
			_tmp8_ = iter_selected;
			_tmp9_ = iter_down;
			gtk_list_store_swap (_tmp7_, &_tmp8_, &_tmp9_);
			g_signal_emit_by_name (_data3_->select, "changed");
		}
	}
}


static void ___lambda116__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda116_ (self);
}


static GtkToolButton* build_tool_dialog_get_down_button (BuildToolDialog* self) {
	GtkToolButton* result = NULL;
	Block3Data* _data3_;
	GtkToolButton* _tmp0_;
	GtkTreeView* _tmp1_;
	GtkTreeSelection* _tmp2_;
	GtkToolButton* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->self = g_object_ref (self);
	_tmp0_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
	g_object_ref_sink (_tmp0_);
	_data3_->down_button = _tmp0_;
	gtk_tool_button_set_icon_name (_data3_->down_button, "go-down-symbolic");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) _data3_->down_button, _ ("Move down"));
	gtk_widget_set_sensitive ((GtkWidget*) _data3_->down_button, FALSE);
	_tmp1_ = self->priv->_jobs_view;
	_tmp2_ = gtk_tree_view_get_selection (_tmp1_);
	_data3_->select = _tmp2_;
	g_signal_connect_data (_data3_->select, "changed", (GCallback) ___lambda115__gtk_tree_selection_changed, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
	g_signal_connect_data (_data3_->down_button, "clicked", (GCallback) ___lambda116__gtk_tool_button_clicked, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
	_tmp3_ = _g_object_ref0 (_data3_->down_button);
	result = _tmp3_;
	block3_data_unref (_data3_);
	_data3_ = NULL;
	return result;
}


/*************************************************************************/
static void build_tool_dialog_set_new_build_tool (BuildToolDialog* self) {
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	GtkEntry* _tmp2_;
	GtkEntry* _tmp3_;
	GtkComboBox* _tmp4_;
	GtkListStore* _tmp5_;
	GtkTreeView* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_entry_label;
	gtk_entry_set_text (_tmp0_, "");
	_tmp1_ = self->priv->_entry_desc;
	gtk_entry_set_text (_tmp1_, "");
	_tmp2_ = self->priv->_entry_extensions;
	gtk_entry_set_text (_tmp2_, "");
	_tmp3_ = self->priv->_entry_files_to_open;
	gtk_entry_set_text (_tmp3_, "");
	_tmp4_ = self->priv->_icons_combobox;
	gtk_combo_box_set_active (_tmp4_, 0);
	_tmp5_ = self->priv->_jobs_store;
	gtk_list_store_clear (_tmp5_);
	_tmp6_ = self->priv->_jobs_view;
	gtk_tree_view_columns_autosize (_tmp6_);
}


static void build_tool_dialog_set_build_tool (BuildToolDialog* self, LatexilaBuildTool* build_tool) {
	gchar* _tmp0_ = NULL;
	LatexilaBuildTool* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GtkEntry* _tmp5_;
	const gchar* _tmp6_ = NULL;
	LatexilaBuildTool* _tmp7_;
	const gchar* _tmp8_;
	GtkEntry* _tmp9_;
	gchar* _tmp10_ = NULL;
	LatexilaBuildTool* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GtkEntry* _tmp15_;
	gchar* _tmp16_ = NULL;
	LatexilaBuildTool* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	GtkEntry* _tmp21_;
	GtkComboBox* _tmp22_;
	GtkTreeIter iter = {0};
	gboolean ok = FALSE;
	GtkListStore* _tmp23_;
	GtkTreeIter _tmp24_ = {0};
	gboolean _tmp25_;
	gboolean _tmp26_;
	GtkTreeModel* model = NULL;
	GtkListStore* _tmp27_;
	GtkTreeModel* _tmp28_;
	GtkListStore* _tmp42_;
	LatexilaBuildTool* _tmp43_;
	GList* _tmp44_;
	GtkTreeView* _tmp47_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (build_tool != NULL);
	_tmp1_ = build_tool;
	g_object_get (_tmp1_, "label", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	_tmp0_ = _tmp3_;
	if (_tmp0_ == NULL) {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp4_;
	}
	_tmp5_ = self->priv->_entry_label;
	gtk_entry_set_text (_tmp5_, _tmp0_);
	_tmp7_ = build_tool;
	_tmp8_ = latexila_build_tool_get_description (_tmp7_);
	_tmp6_ = _tmp8_;
	if (_tmp6_ == NULL) {
		_tmp6_ = "";
	}
	_tmp9_ = self->priv->_entry_desc;
	gtk_entry_set_text (_tmp9_, _tmp6_);
	_tmp11_ = build_tool;
	g_object_get (_tmp11_, "extensions", &_tmp12_, NULL);
	_tmp13_ = _tmp12_;
	_tmp10_ = _tmp13_;
	if (_tmp10_ == NULL) {
		gchar* _tmp14_;
		_tmp14_ = g_strdup ("");
		_g_free0 (_tmp10_);
		_tmp10_ = _tmp14_;
	}
	_tmp15_ = self->priv->_entry_extensions;
	gtk_entry_set_text (_tmp15_, _tmp10_);
	_tmp17_ = build_tool;
	g_object_get (_tmp17_, "files-to-open", &_tmp18_, NULL);
	_tmp19_ = _tmp18_;
	_tmp16_ = _tmp19_;
	if (_tmp16_ == NULL) {
		gchar* _tmp20_;
		_tmp20_ = g_strdup ("");
		_g_free0 (_tmp16_);
		_tmp16_ = _tmp20_;
	}
	_tmp21_ = self->priv->_entry_files_to_open;
	gtk_entry_set_text (_tmp21_, _tmp16_);
	_tmp22_ = self->priv->_icons_combobox;
	gtk_combo_box_set_active (_tmp22_, 0);
	_tmp23_ = self->priv->_icons_store;
	_tmp25_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp23_, &_tmp24_);
	iter = _tmp24_;
	ok = _tmp25_;
	_tmp26_ = ok;
	g_return_if_fail (_tmp26_);
	_tmp27_ = self->priv->_icons_store;
	_tmp28_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, GTK_TYPE_TREE_MODEL) ? ((GtkTreeModel*) _tmp27_) : NULL);
	model = _tmp28_;
	{
		gboolean _tmp29_ = FALSE;
		_tmp29_ = TRUE;
		while (TRUE) {
			gchar* icon_name = NULL;
			GtkTreeModel* _tmp32_;
			GtkTreeIter _tmp33_;
			const gchar* _tmp34_;
			LatexilaBuildTool* _tmp35_;
			gchar* _tmp36_;
			gchar* _tmp37_;
			gchar* _tmp38_;
			gboolean _tmp39_;
			if (!_tmp29_) {
				GtkListStore* _tmp30_;
				gboolean _tmp31_;
				_tmp30_ = self->priv->_icons_store;
				_tmp31_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp30_, &iter);
				if (!_tmp31_) {
					break;
				}
			}
			_tmp29_ = FALSE;
			_tmp32_ = model;
			_tmp33_ = iter;
			gtk_tree_model_get (_tmp32_, &_tmp33_, BUILD_TOOL_DIALOG_ICON_COLUMN_ICON_NAME, &icon_name, -1);
			_tmp34_ = icon_name;
			_tmp35_ = build_tool;
			g_object_get (_tmp35_, "icon", &_tmp36_, NULL);
			_tmp37_ = _tmp36_;
			_tmp38_ = _tmp37_;
			_tmp39_ = g_strcmp0 (_tmp34_, _tmp38_) == 0;
			_g_free0 (_tmp38_);
			if (_tmp39_) {
				GtkComboBox* _tmp40_;
				GtkTreeIter _tmp41_;
				_tmp40_ = self->priv->_icons_combobox;
				_tmp41_ = iter;
				gtk_combo_box_set_active_iter (_tmp40_, &_tmp41_);
				_g_free0 (icon_name);
				break;
			}
			_g_free0 (icon_name);
		}
	}
	_tmp42_ = self->priv->_jobs_store;
	gtk_list_store_clear (_tmp42_);
	_tmp43_ = build_tool;
	_tmp44_ = latexila_build_tool_get_jobs (_tmp43_);
	{
		GList* build_job_collection = NULL;
		GList* build_job_it = NULL;
		build_job_collection = _tmp44_;
		for (build_job_it = build_job_collection; build_job_it != NULL; build_job_it = build_job_it->next) {
			LatexilaBuildJob* _tmp45_;
			LatexilaBuildJob* build_job = NULL;
			_tmp45_ = _g_object_ref0 ((LatexilaBuildJob*) build_job_it->data);
			build_job = _tmp45_;
			{
				LatexilaBuildJob* _tmp46_;
				_tmp46_ = build_job;
				build_tool_dialog_add_build_job (self, _tmp46_);
				_g_object_unref0 (build_job);
			}
		}
	}
	_tmp47_ = self->priv->_jobs_view;
	gtk_tree_view_columns_autosize (_tmp47_);
	_g_object_unref0 (model);
	_g_free0 (_tmp16_);
	_g_free0 (_tmp10_);
	_g_free0 (_tmp0_);
}


static gchar* string_strip (const gchar* self) {
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strstrip (_tmp1_);
	result = _result_;
	return result;
}


static LatexilaBuildTool* build_tool_dialog_retrieve_build_tool (BuildToolDialog* self) {
	LatexilaBuildTool* result = NULL;
	LatexilaBuildTool* tool = NULL;
	LatexilaBuildTool* _tmp0_;
	LatexilaBuildTool* _tmp1_;
	GtkEntry* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	LatexilaBuildTool* _tmp7_;
	GtkEntry* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	LatexilaBuildTool* _tmp13_;
	GtkEntry* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	LatexilaBuildTool* _tmp19_;
	GtkEntry* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	GtkTreeIter iter = {0};
	GtkComboBox* _tmp25_;
	GtkTreeIter _tmp26_ = {0};
	GtkTreeModel* model = NULL;
	GtkListStore* _tmp27_;
	GtkTreeModel* _tmp28_;
	gchar* icon_name = NULL;
	GtkTreeModel* _tmp29_;
	GtkTreeIter _tmp30_;
	LatexilaBuildTool* _tmp31_;
	const gchar* _tmp32_;
	GtkListStore* _tmp33_;
	GtkTreeModel* _tmp34_;
	gboolean valid = FALSE;
	GtkListStore* _tmp35_;
	GtkTreeIter _tmp36_ = {0};
	gboolean _tmp37_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = latexila_build_tool_new ();
	tool = _tmp0_;
	_tmp1_ = tool;
	_tmp2_ = self->priv->_entry_label;
	_tmp3_ = gtk_entry_get_text (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = string_strip (_tmp4_);
	_tmp6_ = _tmp5_;
	g_object_set (_tmp1_, "label", _tmp6_, NULL);
	_g_free0 (_tmp6_);
	_tmp7_ = tool;
	_tmp8_ = self->priv->_entry_desc;
	_tmp9_ = gtk_entry_get_text (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = string_strip (_tmp10_);
	_tmp12_ = _tmp11_;
	g_object_set (_tmp7_, "description", _tmp12_, NULL);
	_g_free0 (_tmp12_);
	_tmp13_ = tool;
	_tmp14_ = self->priv->_entry_extensions;
	_tmp15_ = gtk_entry_get_text (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = string_strip (_tmp16_);
	_tmp18_ = _tmp17_;
	g_object_set (_tmp13_, "extensions", _tmp18_, NULL);
	_g_free0 (_tmp18_);
	_tmp19_ = tool;
	_tmp20_ = self->priv->_entry_files_to_open;
	_tmp21_ = gtk_entry_get_text (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = string_strip (_tmp22_);
	_tmp24_ = _tmp23_;
	g_object_set (_tmp19_, "files-to-open", _tmp24_, NULL);
	_g_free0 (_tmp24_);
	_tmp25_ = self->priv->_icons_combobox;
	gtk_combo_box_get_active_iter (_tmp25_, &_tmp26_);
	iter = _tmp26_;
	_tmp27_ = self->priv->_icons_store;
	_tmp28_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, GTK_TYPE_TREE_MODEL) ? ((GtkTreeModel*) _tmp27_) : NULL);
	model = _tmp28_;
	_tmp29_ = model;
	_tmp30_ = iter;
	gtk_tree_model_get (_tmp29_, &_tmp30_, BUILD_TOOL_DIALOG_ICON_COLUMN_ICON_NAME, &icon_name, -1);
	_tmp31_ = tool;
	_tmp32_ = icon_name;
	g_object_set (_tmp31_, "icon", _tmp32_, NULL);
	_tmp33_ = self->priv->_jobs_store;
	_tmp34_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, GTK_TYPE_TREE_MODEL) ? ((GtkTreeModel*) _tmp33_) : NULL);
	_g_object_unref0 (model);
	model = _tmp34_;
	_tmp35_ = self->priv->_jobs_store;
	_tmp37_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp35_, &_tmp36_);
	iter = _tmp36_;
	valid = _tmp37_;
	while (TRUE) {
		gboolean _tmp38_;
		LatexilaBuildJob* job = NULL;
		LatexilaBuildJob* _tmp39_;
		gchar* command = NULL;
		gchar* post_processor_name = NULL;
		GtkTreeModel* _tmp40_;
		GtkTreeIter _tmp41_;
		LatexilaBuildJob* _tmp42_;
		const gchar* _tmp43_;
		gchar* _tmp44_;
		gchar* _tmp45_;
		LatexilaPostProcessorType type = 0;
		const gchar* _tmp46_;
		LatexilaPostProcessorType _tmp47_ = 0;
		gboolean _tmp48_;
		LatexilaBuildTool* _tmp51_;
		LatexilaBuildJob* _tmp52_;
		GtkListStore* _tmp53_;
		gboolean _tmp54_;
		_tmp38_ = valid;
		if (!_tmp38_) {
			break;
		}
		_tmp39_ = latexila_build_job_new ();
		job = _tmp39_;
		_tmp40_ = model;
		_tmp41_ = iter;
		gtk_tree_model_get (_tmp40_, &_tmp41_, BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND, &command, BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR, &post_processor_name, -1);
		_tmp42_ = job;
		_tmp43_ = command;
		_tmp44_ = string_strip (_tmp43_);
		_tmp45_ = _tmp44_;
		g_object_set (_tmp42_, "command", _tmp45_, NULL);
		_g_free0 (_tmp45_);
		_tmp46_ = post_processor_name;
		_tmp48_ = latexila_post_processor_get_type_from_name (_tmp46_, &_tmp47_);
		type = _tmp47_;
		if (_tmp48_) {
			LatexilaBuildJob* _tmp49_;
			LatexilaPostProcessorType _tmp50_;
			_tmp49_ = job;
			_tmp50_ = type;
			g_object_set (_tmp49_, "post-processor-type", _tmp50_, NULL);
		}
		_tmp51_ = tool;
		_tmp52_ = job;
		latexila_build_tool_add_job (_tmp51_, _tmp52_);
		_tmp53_ = self->priv->_jobs_store;
		_tmp54_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp53_, &iter);
		valid = _tmp54_;
		_g_free0 (post_processor_name);
		_g_free0 (command);
		_g_object_unref0 (job);
	}
	result = tool;
	_g_free0 (icon_name);
	_g_object_unref0 (model);
	return result;
}


/*************************************************************************/
static void build_tool_dialog_add_build_job (BuildToolDialog* self, LatexilaBuildJob* job) {
	gchar* post_processor_name = NULL;
	LatexilaBuildJob* _tmp0_;
	LatexilaPostProcessorType _tmp1_;
	LatexilaPostProcessorType _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp5_;
	GtkTreeIter _tmp6_ = {0};
	GtkListStore* _tmp7_;
	GtkTreeIter _tmp8_;
	LatexilaBuildJob* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkTreeSelection* select = NULL;
	GtkTreeView* _tmp13_;
	GtkTreeSelection* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	_tmp0_ = job;
	g_object_get (_tmp0_, "post-processor-type", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = latexila_post_processor_get_name_from_type (_tmp2_);
	_tmp4_ = g_strdup (_tmp3_);
	post_processor_name = _tmp4_;
	_tmp5_ = self->priv->_jobs_store;
	gtk_list_store_append (_tmp5_, &_tmp6_);
	iter = _tmp6_;
	_tmp7_ = self->priv->_jobs_store;
	_tmp8_ = iter;
	_tmp9_ = job;
	g_object_get (_tmp9_, "command", &_tmp10_, NULL);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_;
	gtk_list_store_set (_tmp7_, &_tmp8_, BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND, _tmp12_, BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR, post_processor_name, -1);
	_g_free0 (_tmp12_);
	_tmp13_ = self->priv->_jobs_view;
	_tmp14_ = gtk_tree_view_get_selection (_tmp13_);
	select = _tmp14_;
	g_signal_emit_by_name (select, "changed");
	_g_free0 (post_processor_name);
}


/*************************************************************************/
static GtkGrid* build_tool_dialog_get_main_grid (BuildToolDialog* self, gboolean editable) {
	GtkGrid* result = NULL;
	GtkGrid* main_grid = NULL;
	GtkGrid* _tmp0_;
	GtkGrid* _tmp1_;
	GtkGrid* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	GtkWidget* _tmp6_;
	GtkWidget* _tmp7_;
	GtkWidget* _tmp8_;
	gboolean _tmp9_;
	GtkWidget* _tmp10_;
	GtkWidget* _tmp11_;
	GtkWidget* _tmp12_;
	GtkWidget* _tmp13_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp0_);
	main_grid = _tmp0_;
	gtk_grid_set_row_spacing (main_grid, (guint) 5);
	gtk_grid_set_column_spacing (main_grid, (guint) 5);
	_tmp1_ = build_tool_dialog_get_label_grid (self);
	_tmp2_ = _tmp1_;
	gtk_grid_attach (main_grid, (GtkWidget*) _tmp2_, 0, 0, 1, 1);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = build_tool_dialog_get_desc_grid (self);
	_tmp4_ = _tmp3_;
	gtk_grid_attach (main_grid, _tmp4_, 1, 0, 1, 1);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = build_tool_dialog_get_extensions_grid (self);
	_tmp6_ = _tmp5_;
	gtk_grid_attach (main_grid, _tmp6_, 0, 1, 1, 1);
	_g_object_unref0 (_tmp6_);
	_tmp7_ = build_tool_dialog_get_icons_grid (self);
	_tmp8_ = _tmp7_;
	gtk_grid_attach (main_grid, _tmp8_, 1, 1, 1, 1);
	_g_object_unref0 (_tmp8_);
	_tmp9_ = editable;
	_tmp10_ = build_tool_dialog_get_jobs_grid (self, _tmp9_);
	_tmp11_ = _tmp10_;
	gtk_grid_attach (main_grid, _tmp11_, 0, 2, 2, 1);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = build_tool_dialog_get_files_to_open_grid (self);
	_tmp13_ = _tmp12_;
	gtk_grid_attach (main_grid, _tmp13_, 0, 3, 2, 1);
	_g_object_unref0 (_tmp13_);
	result = main_grid;
	return result;
}


static GtkGrid* build_tool_dialog_get_label_grid (BuildToolDialog* self) {
	GtkGrid* result = NULL;
	GtkGrid* grid = NULL;
	GtkGrid* _tmp0_;
	GtkLabel* title = NULL;
	GtkLabel* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkLabel* arrow = NULL;
	GtkLabel* _tmp6_;
	GtkEntry* _tmp7_;
	GtkEntry* _tmp8_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp0_);
	grid = _tmp0_;
	gtk_grid_set_row_spacing (grid, (guint) 6);
	gtk_container_set_border_width ((GtkContainer*) grid, (guint) 6);
	_tmp1_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp1_);
	title = _tmp1_;
	_tmp2_ = g_strconcat ("<b>", _ ("Label"), NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, "</b>", NULL);
	_tmp5_ = _tmp4_;
	gtk_label_set_markup (title, _tmp5_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	gtk_widget_set_halign ((GtkWidget*) title, GTK_ALIGN_START);
	gtk_grid_attach (grid, (GtkWidget*) title, 0, 0, 1, 1);
	_tmp6_ = (GtkLabel*) gtk_label_new ("→");
	g_object_ref_sink (_tmp6_);
	arrow = _tmp6_;
	gtk_widget_set_tooltip_text ((GtkWidget*) arrow, _ ("You can select this arrow and copy/paste it!"));
	gtk_widget_set_halign ((GtkWidget*) arrow, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) arrow, TRUE);
	gtk_label_set_selectable (arrow, TRUE);
	gtk_grid_attach (grid, (GtkWidget*) arrow, 1, 0, 1, 1);
	gtk_widget_set_hexpand ((GtkWidget*) grid, FALSE);
	_tmp7_ = self->priv->_entry_label;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp7_, 12);
	_tmp8_ = self->priv->_entry_label;
	gtk_grid_attach (grid, (GtkWidget*) _tmp8_, 0, 1, 2, 1);
	result = grid;
	_g_object_unref0 (arrow);
	_g_object_unref0 (title);
	return result;
}


static GtkWidget* build_tool_dialog_get_desc_grid (BuildToolDialog* self) {
	GtkWidget* result = NULL;
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_entry_desc;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	_tmp1_ = self->priv->_entry_desc;
	_tmp2_ = latexila_utils_get_dialog_component (_ ("Description"), (GtkWidget*) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	result = _tmp3_;
	return result;
}


static GtkWidget* build_tool_dialog_get_extensions_grid (BuildToolDialog* self) {
	GtkWidget* result = NULL;
	GtkEntry* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkEntry* _tmp9_;
	GtkWidget* _tmp10_;
	GtkWidget* _tmp11_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_entry_extensions;
	_tmp1_ = g_strconcat (_ ("File extensions for which the build tool can be executed."), "\n", NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strconcat (_tmp2_, _ ("The extensions are separated by spaces."), NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strconcat (_tmp4_, "\n", NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat (_tmp6_, _ ("If it is empty, all extensions are allowed."), NULL);
	_tmp8_ = _tmp7_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp0_, _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
	_tmp9_ = self->priv->_entry_extensions;
	_tmp10_ = latexila_utils_get_dialog_component (_ ("Extensions"), (GtkWidget*) _tmp9_);
	_tmp11_ = _g_object_ref0 (_tmp10_);
	result = _tmp11_;
	return result;
}


static GtkWidget* build_tool_dialog_get_icons_grid (BuildToolDialog* self) {
	GtkWidget* result = NULL;
	GtkComboBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icons_combobox;
	_tmp1_ = latexila_utils_get_dialog_component (_ ("Icon"), (GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	result = _tmp2_;
	return result;
}


static GtkWidget* build_tool_dialog_get_jobs_grid (BuildToolDialog* self, gboolean editable) {
	GtkWidget* result = NULL;
	GtkLabel* placeholders = NULL;
	GtkLabel* _tmp0_;
	GtkLabel* placeholder_filename = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GtkLabel* placeholder_shortname = NULL;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkGrid* placeholders_grid = NULL;
	GtkGrid* _tmp13_;
	GtkGrid* _tmp14_;
	GtkGrid* _tmp15_;
	GtkGrid* _tmp16_;
	GtkLabel* _tmp17_;
	GtkGrid* _tmp18_;
	GtkLabel* _tmp19_;
	GtkGrid* _tmp20_;
	GtkLabel* _tmp21_;
	GtkTreeView* _tmp22_;
	GtkScrolledWindow* scrolled_window = NULL;
	GtkTreeView* _tmp23_;
	GtkScrolledWindow* _tmp24_;
	GtkScrolledWindow* _tmp25_;
	GtkScrolledWindow* _tmp26_;
	GtkBox* jobs_box = NULL;
	GtkBox* _tmp27_;
	GtkGrid* _tmp28_;
	GtkBox* _tmp29_;
	GtkGrid* _tmp30_;
	GtkBox* _tmp31_;
	GtkScrolledWindow* _tmp32_;
	gboolean _tmp33_;
	GtkBox* _tmp60_;
	GtkWidget* _tmp61_;
	GtkWidget* _tmp62_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Placeholders:"));
	g_object_ref_sink (_tmp0_);
	placeholders = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new ("$filename");
	g_object_ref_sink (_tmp1_);
	placeholder_filename = _tmp1_;
	_tmp2_ = placeholder_filename;
	_tmp3_ = g_strconcat (_ ("The active document's filename."), "\n", NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strconcat (_tmp4_, _ ("If the active document belongs to a project, the main file is chosen."), NULL);
	_tmp6_ = _tmp5_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _tmp6_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	_tmp7_ = (GtkLabel*) gtk_label_new ("$shortname");
	g_object_ref_sink (_tmp7_);
	placeholder_shortname = _tmp7_;
	_tmp8_ = placeholder_shortname;
	_tmp9_ = g_strconcat (_ ("The active document's filename without its extension."), "\n", NULL);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strconcat (_tmp10_, _ ("If the active document belongs to a project, the main file is chosen."), NULL);
	_tmp12_ = _tmp11_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp8_, _tmp12_);
	_g_free0 (_tmp12_);
	_g_free0 (_tmp10_);
	_tmp13_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp13_);
	placeholders_grid = _tmp13_;
	_tmp14_ = placeholders_grid;
	gtk_orientable_set_orientation ((GtkOrientable*) _tmp14_, GTK_ORIENTATION_HORIZONTAL);
	_tmp15_ = placeholders_grid;
	gtk_grid_set_column_spacing (_tmp15_, (guint) 10);
	_tmp16_ = placeholders_grid;
	_tmp17_ = placeholders;
	gtk_container_add ((GtkContainer*) _tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = placeholders_grid;
	_tmp19_ = placeholder_filename;
	gtk_container_add ((GtkContainer*) _tmp18_, (GtkWidget*) _tmp19_);
	_tmp20_ = placeholders_grid;
	_tmp21_ = placeholder_shortname;
	gtk_container_add ((GtkContainer*) _tmp20_, (GtkWidget*) _tmp21_);
	_tmp22_ = self->priv->_jobs_view;
	g_object_set ((GtkWidget*) _tmp22_, "expand", TRUE, NULL);
	_tmp23_ = self->priv->_jobs_view;
	_tmp24_ = utils_add_scrollbar ((GtkWidget*) _tmp23_);
	scrolled_window = _tmp24_;
	_tmp25_ = scrolled_window;
	gtk_widget_set_size_request ((GtkWidget*) _tmp25_, 600, 120);
	_tmp26_ = scrolled_window;
	gtk_scrolled_window_set_shadow_type (_tmp26_, GTK_SHADOW_IN);
	_tmp27_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp27_);
	jobs_box = _tmp27_;
	_tmp28_ = placeholders_grid;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp28_, 8);
	_tmp29_ = jobs_box;
	_tmp30_ = placeholders_grid;
	gtk_box_pack_start (_tmp29_, (GtkWidget*) _tmp30_, FALSE, TRUE, (guint) 0);
	_tmp31_ = jobs_box;
	_tmp32_ = scrolled_window;
	gtk_box_pack_start (_tmp31_, (GtkWidget*) _tmp32_, TRUE, TRUE, (guint) 0);
	_tmp33_ = editable;
	if (_tmp33_) {
		GtkToolbar* toolbar = NULL;
		GtkToolbar* _tmp34_;
		GtkToolbar* _tmp35_;
		GtkToolButton* _tmp36_;
		GtkToolButton* _tmp37_;
		GtkToolbar* _tmp38_;
		GtkToolButton* _tmp39_;
		GtkToolButton* _tmp40_;
		GtkToolbar* _tmp41_;
		GtkToolButton* _tmp42_;
		GtkToolButton* _tmp43_;
		GtkToolbar* _tmp44_;
		GtkToolButton* _tmp45_;
		GtkToolButton* _tmp46_;
		GtkToolbar* _tmp47_;
		GtkToolbar* _tmp48_;
		GtkBox* _tmp49_;
		GtkToolbar* _tmp50_;
		GtkStyleContext* context = NULL;
		GtkScrolledWindow* _tmp51_;
		GtkStyleContext* _tmp52_;
		GtkStyleContext* _tmp53_;
		GtkStyleContext* _tmp54_;
		GtkToolbar* _tmp55_;
		GtkStyleContext* _tmp56_;
		GtkStyleContext* _tmp57_;
		GtkStyleContext* _tmp58_;
		GtkStyleContext* _tmp59_;
		_tmp34_ = (GtkToolbar*) gtk_toolbar_new ();
		g_object_ref_sink (_tmp34_);
		toolbar = _tmp34_;
		_tmp35_ = toolbar;
		_tmp36_ = build_tool_dialog_get_add_button (self);
		_tmp37_ = _tmp36_;
		gtk_toolbar_insert (_tmp35_, (GtkToolItem*) _tmp37_, -1);
		_g_object_unref0 (_tmp37_);
		_tmp38_ = toolbar;
		_tmp39_ = build_tool_dialog_get_remove_button (self);
		_tmp40_ = _tmp39_;
		gtk_toolbar_insert (_tmp38_, (GtkToolItem*) _tmp40_, -1);
		_g_object_unref0 (_tmp40_);
		_tmp41_ = toolbar;
		_tmp42_ = build_tool_dialog_get_up_button (self);
		_tmp43_ = _tmp42_;
		gtk_toolbar_insert (_tmp41_, (GtkToolItem*) _tmp43_, -1);
		_g_object_unref0 (_tmp43_);
		_tmp44_ = toolbar;
		_tmp45_ = build_tool_dialog_get_down_button (self);
		_tmp46_ = _tmp45_;
		gtk_toolbar_insert (_tmp44_, (GtkToolItem*) _tmp46_, -1);
		_g_object_unref0 (_tmp46_);
		_tmp47_ = toolbar;
		gtk_toolbar_set_icon_size (_tmp47_, GTK_ICON_SIZE_MENU);
		_tmp48_ = toolbar;
		gtk_toolbar_set_style (_tmp48_, GTK_TOOLBAR_ICONS);
		_tmp49_ = jobs_box;
		_tmp50_ = toolbar;
		gtk_box_pack_start (_tmp49_, (GtkWidget*) _tmp50_, FALSE, TRUE, (guint) 0);
		_tmp51_ = scrolled_window;
		_tmp52_ = gtk_widget_get_style_context ((GtkWidget*) _tmp51_);
		_tmp53_ = _g_object_ref0 (_tmp52_);
		context = _tmp53_;
		_tmp54_ = context;
		gtk_style_context_set_junction_sides (_tmp54_, GTK_JUNCTION_BOTTOM);
		_tmp55_ = toolbar;
		_tmp56_ = gtk_widget_get_style_context ((GtkWidget*) _tmp55_);
		_tmp57_ = _g_object_ref0 (_tmp56_);
		_g_object_unref0 (context);
		context = _tmp57_;
		_tmp58_ = context;
		gtk_style_context_add_class (_tmp58_, GTK_STYLE_CLASS_INLINE_TOOLBAR);
		_tmp59_ = context;
		gtk_style_context_set_junction_sides (_tmp59_, GTK_JUNCTION_TOP);
		_g_object_unref0 (context);
		_g_object_unref0 (toolbar);
	}
	_tmp60_ = jobs_box;
	_tmp61_ = latexila_utils_get_dialog_component (_ ("Jobs"), (GtkWidget*) _tmp60_);
	_tmp62_ = _g_object_ref0 (_tmp61_);
	result = _tmp62_;
	_g_object_unref0 (jobs_box);
	_g_object_unref0 (scrolled_window);
	_g_object_unref0 (placeholders_grid);
	_g_object_unref0 (placeholder_shortname);
	_g_object_unref0 (placeholder_filename);
	_g_object_unref0 (placeholders);
	return result;
}


static GtkWidget* build_tool_dialog_get_files_to_open_grid (BuildToolDialog* self) {
	GtkWidget* result = NULL;
	GtkEntry* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkEntry* _tmp9_;
	GtkEntry* _tmp10_;
	GtkWidget* _tmp11_;
	GtkWidget* _tmp12_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_entry_files_to_open;
	_tmp1_ = g_strconcat (_ ("List of files to open after executing the build jobs."), "\n", NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strconcat (_tmp2_, _ ("The files are separated by spaces."), NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strconcat (_tmp4_, "\n", NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat (_tmp6_, _ ("You should use the placeholders to specify the files."), NULL);
	_tmp8_ = _tmp7_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp0_, _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
	_tmp9_ = self->priv->_entry_files_to_open;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp9_, TRUE);
	_tmp10_ = self->priv->_entry_files_to_open;
	_tmp11_ = latexila_utils_get_dialog_component (_ ("Files to open"), (GtkWidget*) _tmp10_);
	_tmp12_ = _g_object_ref0 (_tmp11_);
	result = _tmp12_;
	return result;
}


static void build_tool_dialog_class_init (BuildToolDialogClass * klass) {
	build_tool_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BuildToolDialogPrivate));
	G_OBJECT_CLASS (klass)->finalize = build_tool_dialog_finalize;
}


static void build_tool_dialog_instance_init (BuildToolDialog * self) {
	self->priv = BUILD_TOOL_DIALOG_GET_PRIVATE (self);
}


static void build_tool_dialog_finalize (GObject * obj) {
	BuildToolDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BUILD_TOOL_DIALOG, BuildToolDialog);
	_g_object_unref0 (self->priv->_dialog);
	_g_object_unref0 (self->priv->_entry_label);
	_g_object_unref0 (self->priv->_entry_desc);
	_g_object_unref0 (self->priv->_entry_extensions);
	_g_object_unref0 (self->priv->_entry_files_to_open);
	_g_object_unref0 (self->priv->_icons_store);
	_g_object_unref0 (self->priv->_icons_combobox);
	_g_object_unref0 (self->priv->_jobs_store);
	_g_object_unref0 (self->priv->_jobs_view);
	G_OBJECT_CLASS (build_tool_dialog_parent_class)->finalize (obj);
}


GType build_tool_dialog_get_type (void) {
	static volatile gsize build_tool_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&build_tool_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BuildToolDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) build_tool_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BuildToolDialog), 0, (GInstanceInitFunc) build_tool_dialog_instance_init, NULL };
		GType build_tool_dialog_type_id;
		build_tool_dialog_type_id = g_type_register_static (G_TYPE_OBJECT, "BuildToolDialog", &g_define_type_info, 0);
		g_once_init_leave (&build_tool_dialog_type_id__volatile, build_tool_dialog_type_id);
	}
	return build_tool_dialog_type_id__volatile;
}



