/* build_tool_dialog.c generated by valac 0.21.2.9-2b15d, the Vala compiler
 * generated from build_tool_dialog.vala, do not modify */

/*
 * This file is part of LaTeXila.
 *
 * Copyright © 2010-2012 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 <stdlib.h>
#include <string.h>
#include <gee.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)))

#define TYPE_BUILD_TOOLS (build_tools_get_type ())
#define BUILD_TOOLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BUILD_TOOLS, BuildTools))
#define BUILD_TOOLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BUILD_TOOLS, BuildToolsClass))
#define IS_BUILD_TOOLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BUILD_TOOLS))
#define IS_BUILD_TOOLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BUILD_TOOLS))
#define BUILD_TOOLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BUILD_TOOLS, BuildToolsClass))

typedef struct _BuildTools BuildTools;
typedef struct _BuildToolsClass BuildToolsClass;

#define TYPE_BUILD_TOOL (build_tool_get_type ())

#define TYPE_BUILD_JOB (build_job_get_type ())

#define TYPE_POST_PROCESSOR_TYPE (post_processor_type_get_type ())
typedef struct _BuildJob BuildJob;
typedef struct _BuildTool BuildTool;

#define TYPE_DEFAULT_BUILD_TOOLS (default_build_tools_get_type ())
#define DEFAULT_BUILD_TOOLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEFAULT_BUILD_TOOLS, DefaultBuildTools))
#define DEFAULT_BUILD_TOOLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEFAULT_BUILD_TOOLS, DefaultBuildToolsClass))
#define IS_DEFAULT_BUILD_TOOLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEFAULT_BUILD_TOOLS))
#define IS_DEFAULT_BUILD_TOOLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEFAULT_BUILD_TOOLS))
#define DEFAULT_BUILD_TOOLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEFAULT_BUILD_TOOLS, DefaultBuildToolsClass))

typedef struct _DefaultBuildTools DefaultBuildTools;
typedef struct _DefaultBuildToolsClass DefaultBuildToolsClass;

#define TYPE_PERSONAL_BUILD_TOOLS (personal_build_tools_get_type ())
#define PERSONAL_BUILD_TOOLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PERSONAL_BUILD_TOOLS, PersonalBuildTools))
#define PERSONAL_BUILD_TOOLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PERSONAL_BUILD_TOOLS, PersonalBuildToolsClass))
#define IS_PERSONAL_BUILD_TOOLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PERSONAL_BUILD_TOOLS))
#define IS_PERSONAL_BUILD_TOOLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PERSONAL_BUILD_TOOLS))
#define PERSONAL_BUILD_TOOLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PERSONAL_BUILD_TOOLS, PersonalBuildToolsClass))

typedef struct _PersonalBuildTools PersonalBuildTools;
typedef struct _PersonalBuildToolsClass PersonalBuildToolsClass;
#define _build_tool_free0(var) ((var == NULL) ? NULL : (var = (build_tool_free (var), NULL)))
#define _g_free0(var) (var = (g_free (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 _build_job_free0(var) ((var == NULL) ? NULL : (var = (build_job_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_STOCK_ID,
	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;

typedef enum  {
	POST_PROCESSOR_TYPE_ALL_OUTPUT = 0,
	POST_PROCESSOR_TYPE_LATEX,
	POST_PROCESSOR_TYPE_LATEXMK,
	POST_PROCESSOR_TYPE_NO_OUTPUT,
	POST_PROCESSOR_TYPE_N_POST_PROCESSORS
} PostProcessorType;

struct _BuildJob {
	PostProcessorType post_processor;
	gchar* command;
};

struct _BuildTool {
	gchar* _description;
	gchar* extensions;
	gchar* label;
	gchar* icon;
	gchar* files_to_open;
	gboolean enabled;
	GeeArrayList* jobs;
	gint id;
};

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_UNUSED;
static GType build_tool_dialog_job_column_get_type (void) G_GNUC_UNUSED;
static GType build_tool_dialog_post_processor_column_get_type (void) G_GNUC_UNUSED;
BuildToolDialog* build_tool_dialog_new (GtkWindow* parent);
BuildToolDialog* build_tool_dialog_construct (GType object_type, GtkWindow* parent);
static void build_tool_dialog_init_text_entries (BuildToolDialog* self);
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);
static GtkGrid* build_tool_dialog_get_main_grid (BuildToolDialog* self);
static void build_tool_dialog_set_read_only (BuildToolDialog* self);
static void build_tool_dialog_set_editable (BuildToolDialog* self);
GType build_tools_get_type (void) G_GNUC_CONST;
gboolean build_tool_dialog_open_build_tool (BuildToolDialog* self, BuildTools* build_tools, gint build_tool_num);
GType build_tool_get_type (void) G_GNUC_CONST;
GType build_job_get_type (void) G_GNUC_CONST;
GType post_processor_type_get_type (void) G_GNUC_CONST;
BuildJob* build_job_dup (const BuildJob* self);
void build_job_free (BuildJob* self);
void build_job_copy (const BuildJob* self, BuildJob* dest);
void build_job_destroy (BuildJob* self);
BuildTool* build_tool_dup (const BuildTool* self);
void build_tool_free (BuildTool* self);
void build_tool_copy (const BuildTool* self, BuildTool* dest);
void build_tool_destroy (BuildTool* self);
BuildTool* build_tools_get_build_tool (BuildTools* self, gint tool_num);
GType default_build_tools_get_type (void) G_GNUC_CONST;
static void build_tool_dialog_set_build_tool (BuildToolDialog* self, BuildTool* build_tool);
static void build_tool_dialog_retrieve_build_tool (BuildToolDialog* self, BuildTool* result);
GType personal_build_tools_get_type (void) G_GNUC_CONST;
void personal_build_tools_update (PersonalBuildTools* self, gint num, BuildTool* tool);
gboolean build_tool_dialog_create_personal_build_tool (BuildToolDialog* self);
static void build_tool_dialog_set_new_build_tool (BuildToolDialog* self);
PersonalBuildTools* personal_build_tools_get_default (void);
void personal_build_tools_add (PersonalBuildTools* self, BuildTool* tool);
static void build_tool_dialog_add_icon (BuildToolDialog* self, const gchar* stock_id, const gchar* label);
gchar* build_tools_get_post_processor_name_from_type (PostProcessorType type);
static void __lambda56_ (BuildToolDialog* self, const gchar* path_string, const gchar* new_text);
static void ___lambda56__gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self);
static void __lambda57_ (BuildToolDialog* self, const gchar* path_string, const gchar* new_text);
static void ___lambda57__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 __lambda58_ (BuildToolDialog* self);
static void build_tool_dialog_add_build_job (BuildToolDialog* self, BuildJob* job);
static void ___lambda58__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 __lambda59_ (Block1Data* _data1_);
static void ___lambda59__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
static void __lambda60_ (BuildToolDialog* self);
gint utils_get_selected_row (GtkTreeView* view, GtkTreeIter* iter);
static void ___lambda60__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 __lambda61_ (Block2Data* _data2_);
static void _gtk_tree_path_free0_ (gpointer var);
static void _g_list_free__gtk_tree_path_free0_ (GList* self);
static void ___lambda61__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
static void __lambda62_ (Block2Data* _data2_);
gboolean utils_tree_model_iter_prev (GtkTreeModel* model, GtkTreeIter* iter);
static void ___lambda62__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 __lambda63_ (Block3Data* _data3_);
static void ___lambda63__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
static void __lambda64_ (Block3Data* _data3_);
static void ___lambda64__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
gchar* build_tool_get_description (BuildTool *self);
void build_tool_init (BuildTool *self);
void build_tool_set_description (BuildTool *self, const gchar* description);
PostProcessorType* build_tools_get_post_processor_type_from_name (const gchar* name);
static GtkGrid* build_tool_dialog_get_label_grid (BuildToolDialog* self);
static GtkGrid* build_tool_dialog_get_desc_grid (BuildToolDialog* self);
static GtkGrid* build_tool_dialog_get_extensions_grid (BuildToolDialog* self);
static GtkGrid* build_tool_dialog_get_icons_grid (BuildToolDialog* self);
static GtkGrid* build_tool_dialog_get_jobs_grid (BuildToolDialog* self);
static GtkGrid* build_tool_dialog_get_files_to_open_grid (BuildToolDialog* self);
GtkGrid* utils_get_dialog_component (const gchar* title, GtkWidget* widget);
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_STOCK_ID, "BUILD_TOOL_DIALOG_ICON_COLUMN_STOCK_ID", "stock-id"}, {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) {
	BuildToolDialog * self = NULL;
	GtkDialog* _tmp0_ = NULL;
	GtkDialog* _tmp1_ = NULL;
	GtkDialog* _tmp2_ = NULL;
	GtkDialog* _tmp3_ = NULL;
	GtkWindow* _tmp4_ = NULL;
	GtkBox* content_area = NULL;
	GtkDialog* _tmp5_ = NULL;
	GtkBox* _tmp6_ = NULL;
	GtkBox* _tmp7_ = NULL;
	GtkGrid* _tmp8_ = NULL;
	GtkGrid* _tmp9_ = NULL;
	g_return_val_if_fail (parent != NULL, NULL);
	self = (BuildToolDialog*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkDialog*) gtk_dialog_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->_dialog);
	self->priv->_dialog = _tmp0_;
	_tmp1_ = self->priv->_dialog;
	gtk_window_set_destroy_with_parent ((GtkWindow*) _tmp1_, TRUE);
	_tmp2_ = self->priv->_dialog;
	gtk_window_set_modal ((GtkWindow*) _tmp2_, TRUE);
	_tmp3_ = self->priv->_dialog;
	_tmp4_ = parent;
	gtk_window_set_transient_for ((GtkWindow*) _tmp3_, _tmp4_);
	build_tool_dialog_init_text_entries (self);
	build_tool_dialog_init_icons_store (self);
	build_tool_dialog_init_icons_combobox (self);
	build_tool_dialog_init_jobs (self);
	_tmp5_ = self->priv->_dialog;
	_tmp6_ = (GtkBox*) gtk_dialog_get_content_area (_tmp5_);
	_tmp7_ = _g_object_ref0 (_tmp6_);
	content_area = _tmp7_;
	_tmp8_ = build_tool_dialog_get_main_grid (self);
	_tmp9_ = _tmp8_;
	gtk_box_pack_start (content_area, (GtkWidget*) _tmp9_, TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp9_);
	gtk_widget_show_all ((GtkWidget*) content_area);
	_g_object_unref0 (content_area);
	return self;
}


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


static void build_tool_dialog_set_read_only (BuildToolDialog* self) {
	GtkDialog* _tmp0_ = NULL;
	GtkDialog* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_dialog;
	gtk_dialog_add_button (_tmp0_, GTK_STOCK_CLOSE, (gint) GTK_RESPONSE_CANCEL);
	_tmp1_ = self->priv->_dialog;
	_tmp2_ = _ ("Build Tool (read-only)");
	gtk_window_set_title ((GtkWindow*) _tmp1_, _tmp2_);
}


static void build_tool_dialog_set_editable (BuildToolDialog* self) {
	GtkDialog* _tmp0_ = NULL;
	GtkDialog* _tmp1_ = NULL;
	GtkDialog* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_dialog;
	gtk_dialog_add_button (_tmp0_, GTK_STOCK_CANCEL, (gint) GTK_RESPONSE_CANCEL);
	_tmp1_ = self->priv->_dialog;
	gtk_dialog_add_button (_tmp1_, GTK_STOCK_OK, (gint) GTK_RESPONSE_OK);
	_tmp2_ = self->priv->_dialog;
	_tmp3_ = _ ("Build Tool");
	gtk_window_set_title ((GtkWindow*) _tmp2_, _tmp3_);
}


gboolean build_tool_dialog_open_build_tool (BuildToolDialog* self, BuildTools* build_tools, gint build_tool_num) {
	gboolean result = FALSE;
	BuildTool* build_tool = NULL;
	BuildTools* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	BuildTool* _tmp2_ = NULL;
	BuildTool* _tmp3_ = NULL;
	BuildTools* _tmp4_ = NULL;
	BuildTool* _tmp5_ = NULL;
	BuildTool _tmp6_ = {0};
	gboolean ok = FALSE;
	GtkDialog* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	gboolean _tmp9_ = FALSE;
	GtkDialog* _tmp18_ = NULL;
	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_ = build_tools_get_build_tool (_tmp0_, _tmp1_);
	build_tool = _tmp2_;
	_tmp3_ = build_tool;
	g_return_val_if_fail (_tmp3_ != NULL, FALSE);
	_tmp4_ = build_tools;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, TYPE_DEFAULT_BUILD_TOOLS)) {
		build_tool_dialog_set_read_only (self);
	} else {
		build_tool_dialog_set_editable (self);
	}
	_tmp5_ = build_tool;
	_tmp6_ = *_tmp5_;
	build_tool_dialog_set_build_tool (self, &_tmp6_);
	_tmp7_ = self->priv->_dialog;
	_tmp8_ = gtk_dialog_run (_tmp7_);
	ok = _tmp8_ == ((gint) GTK_RESPONSE_OK);
	_tmp9_ = ok;
	if (_tmp9_) {
		BuildTool new_build_tool = {0};
		BuildTool _tmp10_ = {0};
		BuildTool* _tmp11_ = NULL;
		gboolean _tmp12_ = FALSE;
		PersonalBuildTools* personal_build_tools = NULL;
		BuildTools* _tmp13_ = NULL;
		PersonalBuildTools* _tmp14_ = NULL;
		PersonalBuildTools* _tmp15_ = NULL;
		gint _tmp16_ = 0;
		BuildTool _tmp17_ = {0};
		build_tool_dialog_retrieve_build_tool (self, &_tmp10_);
		new_build_tool = _tmp10_;
		_tmp11_ = build_tool;
		_tmp12_ = (*_tmp11_).enabled;
		new_build_tool.enabled = _tmp12_;
		_tmp13_ = build_tools;
		_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, TYPE_PERSONAL_BUILD_TOOLS) ? ((PersonalBuildTools*) _tmp13_) : NULL);
		personal_build_tools = _tmp14_;
		_tmp15_ = personal_build_tools;
		_tmp16_ = build_tool_num;
		_tmp17_ = new_build_tool;
		personal_build_tools_update (_tmp15_, _tmp16_, &_tmp17_);
		_g_object_unref0 (personal_build_tools);
		build_tool_destroy (&new_build_tool);
	}
	_tmp18_ = self->priv->_dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp18_);
	result = ok;
	_build_tool_free0 (build_tool);
	return result;
}


gboolean build_tool_dialog_create_personal_build_tool (BuildToolDialog* self) {
	gboolean result = FALSE;
	gboolean ok = FALSE;
	GtkDialog* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gboolean _tmp2_ = FALSE;
	GtkDialog* _tmp7_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	build_tool_dialog_set_editable (self);
	build_tool_dialog_set_new_build_tool (self);
	_tmp0_ = self->priv->_dialog;
	_tmp1_ = gtk_dialog_run (_tmp0_);
	ok = _tmp1_ == ((gint) GTK_RESPONSE_OK);
	_tmp2_ = ok;
	if (_tmp2_) {
		BuildTool new_build_tool = {0};
		BuildTool _tmp3_ = {0};
		PersonalBuildTools* build_tools = NULL;
		PersonalBuildTools* _tmp4_ = NULL;
		PersonalBuildTools* _tmp5_ = NULL;
		BuildTool _tmp6_ = {0};
		build_tool_dialog_retrieve_build_tool (self, &_tmp3_);
		new_build_tool = _tmp3_;
		new_build_tool.enabled = TRUE;
		_tmp4_ = personal_build_tools_get_default ();
		build_tools = _tmp4_;
		_tmp5_ = build_tools;
		_tmp6_ = new_build_tool;
		personal_build_tools_add (_tmp5_, &_tmp6_);
		_g_object_unref0 (build_tools);
		build_tool_destroy (&new_build_tool);
	}
	_tmp7_ = self->priv->_dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp7_);
	result = ok;
	return result;
}


/*************************************************************************/
static void build_tool_dialog_init_text_entries (BuildToolDialog* self) {
	GtkEntry* _tmp0_ = NULL;
	GtkEntry* _tmp1_ = NULL;
	GtkEntry* _tmp2_ = NULL;
	GtkEntry* _tmp3_ = NULL;
	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_;
}


static void build_tool_dialog_init_icons_store (BuildToolDialog* self) {
	GtkListStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	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);
	_g_object_unref0 (self->priv->_icons_store);
	self->priv->_icons_store = _tmp0_;
	_tmp1_ = _ ("Execute");
	build_tool_dialog_add_icon (self, GTK_STOCK_EXECUTE, _tmp1_);
	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");
	_tmp2_ = _ ("Convert");
	build_tool_dialog_add_icon (self, GTK_STOCK_CONVERT, _tmp2_);
	_tmp3_ = _ ("View File");
	build_tool_dialog_add_icon (self, GTK_STOCK_FILE, _tmp3_);
	_tmp4_ = _ ("View DVI");
	build_tool_dialog_add_icon (self, "view_dvi", _tmp4_);
	_tmp5_ = _ ("View PDF");
	build_tool_dialog_add_icon (self, "view_pdf", _tmp5_);
	_tmp6_ = _ ("View PS");
	build_tool_dialog_add_icon (self, "view_ps", _tmp6_);
}


static void build_tool_dialog_add_icon (BuildToolDialog* self, const gchar* stock_id, const gchar* label) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GtkListStore* _tmp2_ = NULL;
	GtkTreeIter _tmp3_ = {0};
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stock_id != 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_ = stock_id;
	_tmp5_ = label;
	gtk_list_store_set (_tmp2_, &_tmp3_, BUILD_TOOL_DIALOG_ICON_COLUMN_STOCK_ID, _tmp4_, BUILD_TOOL_DIALOG_ICON_COLUMN_LABEL, _tmp5_, -1);
}


static void build_tool_dialog_init_icons_combobox (BuildToolDialog* self) {
	GtkListStore* _tmp0_ = NULL;
	GtkComboBox* _tmp1_ = NULL;
	GtkCellRendererPixbuf* pixbuf_renderer = NULL;
	GtkCellRendererPixbuf* _tmp2_ = NULL;
	GtkComboBox* _tmp3_ = NULL;
	GtkComboBox* _tmp4_ = NULL;
	GtkCellRendererText* text_renderer = NULL;
	GtkCellRendererText* _tmp5_ = NULL;
	GtkComboBox* _tmp6_ = NULL;
	GtkComboBox* _tmp7_ = NULL;
	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, "stock-id", BUILD_TOOL_DIALOG_ICON_COLUMN_STOCK_ID, 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 __lambda56_ (BuildToolDialog* self, const gchar* path_string, const gchar* new_text) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GtkTreeIter _tmp2_ = {0};
	GtkListStore* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
	const gchar* _tmp5_ = NULL;
	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 ___lambda56__gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self) {
	__lambda56_ (self, path, new_text);
}


static void __lambda57_ (BuildToolDialog* self, const gchar* path_string, const gchar* new_text) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GtkTreeIter _tmp2_ = {0};
	GtkListStore* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
	const gchar* _tmp5_ = NULL;
	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 ___lambda57__gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self) {
	__lambda57_ (self, path, new_text);
}


static void build_tool_dialog_init_jobs (BuildToolDialog* self) {
	GtkListStore* _tmp0_ = NULL;
	GtkListStore* _tmp1_ = NULL;
	GtkTreeView* _tmp2_ = NULL;
	GtkListStore* post_processor_store = NULL;
	GtkListStore* _tmp3_ = NULL;
	GtkListStore* _tmp15_ = NULL;
	GtkCellRendererText* text_renderer = NULL;
	GtkCellRendererText* _tmp16_ = NULL;
	GtkTreeViewColumn* column = NULL;
	const gchar* _tmp17_ = NULL;
	GtkTreeViewColumn* _tmp18_ = NULL;
	GtkTreeView* _tmp19_ = NULL;
	GtkCellRendererCombo* combo_renderer = NULL;
	GtkCellRendererCombo* _tmp20_ = NULL;
	GtkListStore* _tmp21_ = NULL;
	GtkTreeView* _tmp22_ = NULL;
	const gchar* _tmp23_ = NULL;
	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);
	_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);
	post_processor_store = _tmp3_;
	{
		gint type = 0;
		type = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp5_ = FALSE;
				gint _tmp7_ = 0;
				gchar* name = NULL;
				gint _tmp8_ = 0;
				gchar* _tmp9_ = NULL;
				GtkTreeIter iter = {0};
				GtkListStore* _tmp10_ = NULL;
				GtkTreeIter _tmp11_ = {0};
				GtkListStore* _tmp12_ = NULL;
				GtkTreeIter _tmp13_ = {0};
				const gchar* _tmp14_ = NULL;
				_tmp5_ = _tmp4_;
				if (!_tmp5_) {
					gint _tmp6_ = 0;
					_tmp6_ = type;
					type = _tmp6_ + 1;
				}
				_tmp4_ = FALSE;
				_tmp7_ = type;
				if (!(_tmp7_ < ((gint) POST_PROCESSOR_TYPE_N_POST_PROCESSORS))) {
					break;
				}
				_tmp8_ = type;
				_tmp9_ = build_tools_get_post_processor_name_from_type ((PostProcessorType) _tmp8_);
				name = _tmp9_;
				_tmp10_ = post_processor_store;
				gtk_list_store_append (_tmp10_, &_tmp11_);
				iter = _tmp11_;
				_tmp12_ = post_processor_store;
				_tmp13_ = iter;
				_tmp14_ = name;
				gtk_list_store_set (_tmp12_, &_tmp13_, BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_NAME, _tmp14_, -1);
				_g_free0 (name);
			}
		}
	}
	_tmp15_ = post_processor_store;
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp15_, (gint) BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_NAME, GTK_SORT_ASCENDING);
	_tmp16_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp16_);
	text_renderer = _tmp16_;
	g_object_set (text_renderer, "editable", TRUE, NULL);
	_tmp17_ = _ ("Commands");
	_tmp18_ = gtk_tree_view_column_new_with_attributes (_tmp17_, (GtkCellRenderer*) text_renderer, "text", BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND, NULL);
	g_object_ref_sink (_tmp18_);
	column = _tmp18_;
	gtk_tree_view_column_set_resizable (column, TRUE);
	_tmp19_ = self->priv->_jobs_view;
	gtk_tree_view_append_column (_tmp19_, column);
	_tmp20_ = (GtkCellRendererCombo*) gtk_cell_renderer_combo_new ();
	g_object_ref_sink (_tmp20_);
	combo_renderer = _tmp20_;
	g_object_set ((GtkCellRendererText*) combo_renderer, "editable", TRUE, NULL);
	_tmp21_ = post_processor_store;
	g_object_set (combo_renderer, "model", (GtkTreeModel*) _tmp21_, NULL);
	g_object_set (combo_renderer, "text-column", (gint) BUILD_TOOL_DIALOG_POST_PROCESSOR_COLUMN_NAME, NULL);
	g_object_set (combo_renderer, "has-entry", FALSE, NULL);
	_tmp22_ = self->priv->_jobs_view;
	_tmp23_ = _ ("Post Processor");
	gtk_tree_view_insert_column_with_attributes (_tmp22_, -1, _tmp23_, (GtkCellRenderer*) combo_renderer, "text", BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR, NULL);
	g_signal_connect_object (text_renderer, "edited", (GCallback) ___lambda56__gtk_cell_renderer_text_edited, self, 0);
	g_signal_connect_object ((GtkCellRendererText*) combo_renderer, "edited", (GCallback) ___lambda57__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 __lambda58_ (BuildToolDialog* self) {
	BuildJob new_job = {0};
	gchar* _tmp0_ = NULL;
	BuildJob _tmp1_ = {0};
	memset (&new_job, 0, sizeof (BuildJob));
	_tmp0_ = g_strdup ("");
	_g_free0 (new_job.command);
	new_job.command = _tmp0_;
	new_job.post_processor = POST_PROCESSOR_TYPE_ALL_OUTPUT;
	_tmp1_ = new_job;
	build_tool_dialog_add_build_job (self, &_tmp1_);
	build_job_destroy (&new_job);
}


static void ___lambda58__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda58_ (self);
}


static GtkToolButton* build_tool_dialog_get_add_button (BuildToolDialog* self) {
	GtkToolButton* result = NULL;
	GtkToolButton* add_button = NULL;
	GtkToolButton* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	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");
	_tmp1_ = _ ("Add...");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) add_button, _tmp1_);
	g_signal_connect_object (add_button, "clicked", (GCallback) ___lambda58__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 __lambda59_ (Block1Data* _data1_) {
	BuildToolDialog * self;
	gboolean row_selected = FALSE;
	gint _tmp0_ = 0;
	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 ___lambda59__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
	__lambda59_ (self);
}


static void __lambda60_ (BuildToolDialog* self) {
	GtkTreeIter iter = {0};
	gint selected_row = 0;
	GtkTreeView* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	_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_ = NULL;
		GtkTreeIter _tmp5_ = {0};
		_tmp4_ = self->priv->_jobs_store;
		_tmp5_ = iter;
		gtk_list_store_remove (_tmp4_, &_tmp5_);
	}
}


static void ___lambda60__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda60_ (self);
}


static GtkToolButton* build_tool_dialog_get_remove_button (BuildToolDialog* self) {
	GtkToolButton* result = NULL;
	Block1Data* _data1_;
	GtkToolButton* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GtkTreeView* _tmp2_ = NULL;
	GtkTreeSelection* _tmp3_ = NULL;
	GtkToolButton* _tmp4_ = NULL;
	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");
	_tmp1_ = _ ("Remove");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) _data1_->remove_button, _tmp1_);
	gtk_widget_set_sensitive ((GtkWidget*) _data1_->remove_button, FALSE);
	_tmp2_ = self->priv->_jobs_view;
	_tmp3_ = gtk_tree_view_get_selection (_tmp2_);
	_data1_->select = _tmp3_;
	g_signal_connect_data (_data1_->select, "changed", (GCallback) ___lambda59__gtk_tree_selection_changed, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	g_signal_connect_object (_data1_->remove_button, "clicked", (GCallback) ___lambda60__gtk_tool_button_clicked, self, 0);
	_tmp4_ = _g_object_ref0 (_data1_->remove_button);
	result = _tmp4_;
	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 __lambda61_ (Block2Data* _data2_) {
	BuildToolDialog * self;
	GList* selected_rows = NULL;
	GList* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	GtkTreePath* path_selected = NULL;
	GList* _tmp3_ = NULL;
	gconstpointer _tmp4_ = NULL;
	GtkTreePath* _tmp5_ = NULL;
	gint row_num = 0;
	GtkTreePath* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	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 ___lambda61__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
	__lambda61_ (self);
}


static void __lambda62_ (Block2Data* _data2_) {
	BuildToolDialog * self;
	GtkTreeIter iter_selected = {0};
	gint selected_row = 0;
	GtkTreeView* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	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_ = {0};
		GtkListStore* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
		_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_ = NULL;
			GtkTreeIter _tmp8_ = {0};
			GtkTreeIter _tmp9_ = {0};
			_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 ___lambda62__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda62_ (self);
}


static GtkToolButton* build_tool_dialog_get_up_button (BuildToolDialog* self) {
	GtkToolButton* result = NULL;
	Block2Data* _data2_;
	GtkToolButton* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GtkTreeView* _tmp2_ = NULL;
	GtkTreeSelection* _tmp3_ = NULL;
	GtkToolButton* _tmp4_ = NULL;
	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");
	_tmp1_ = _ ("Move up");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) _data2_->up_button, _tmp1_);
	gtk_widget_set_sensitive ((GtkWidget*) _data2_->up_button, FALSE);
	_tmp2_ = self->priv->_jobs_view;
	_tmp3_ = gtk_tree_view_get_selection (_tmp2_);
	_data2_->select = _tmp3_;
	g_signal_connect_data (_data2_->select, "changed", (GCallback) ___lambda61__gtk_tree_selection_changed, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	g_signal_connect_data (_data2_->up_button, "clicked", (GCallback) ___lambda62__gtk_tool_button_clicked, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp4_ = _g_object_ref0 (_data2_->up_button);
	result = _tmp4_;
	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 __lambda63_ (Block3Data* _data3_) {
	BuildToolDialog * self;
	GList* selected_rows = NULL;
	GList* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	GtkTreePath* path_selected = NULL;
	GList* _tmp3_ = NULL;
	gconstpointer _tmp4_ = NULL;
	GtkTreePath* _tmp5_ = NULL;
	gint row_num = 0;
	GtkTreePath* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	GtkTreeModel* model = NULL;
	GtkListStore* _tmp10_ = NULL;
	GtkTreeModel* _tmp11_ = NULL;
	gint nb_rows = 0;
	GtkTreeModel* _tmp12_ = NULL;
	gint _tmp13_ = 0;
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	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 ___lambda63__gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
	__lambda63_ (self);
}


static void __lambda64_ (Block3Data* _data3_) {
	BuildToolDialog * self;
	GtkTreeIter iter_selected = {0};
	gint selected_row = 0;
	GtkTreeView* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	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_ = {0};
		GtkListStore* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
		_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_ = NULL;
			GtkTreeIter _tmp8_ = {0};
			GtkTreeIter _tmp9_ = {0};
			_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 ___lambda64__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda64_ (self);
}


static GtkToolButton* build_tool_dialog_get_down_button (BuildToolDialog* self) {
	GtkToolButton* result = NULL;
	Block3Data* _data3_;
	GtkToolButton* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GtkTreeView* _tmp2_ = NULL;
	GtkTreeSelection* _tmp3_ = NULL;
	GtkToolButton* _tmp4_ = NULL;
	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");
	_tmp1_ = _ ("Move down");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) _data3_->down_button, _tmp1_);
	gtk_widget_set_sensitive ((GtkWidget*) _data3_->down_button, FALSE);
	_tmp2_ = self->priv->_jobs_view;
	_tmp3_ = gtk_tree_view_get_selection (_tmp2_);
	_data3_->select = _tmp3_;
	g_signal_connect_data (_data3_->select, "changed", (GCallback) ___lambda63__gtk_tree_selection_changed, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
	g_signal_connect_data (_data3_->down_button, "clicked", (GCallback) ___lambda64__gtk_tool_button_clicked, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
	_tmp4_ = _g_object_ref0 (_data3_->down_button);
	result = _tmp4_;
	block3_data_unref (_data3_);
	_data3_ = NULL;
	return result;
}


/*************************************************************************/
static void build_tool_dialog_set_new_build_tool (BuildToolDialog* self) {
	GtkEntry* _tmp0_ = NULL;
	GtkEntry* _tmp1_ = NULL;
	GtkEntry* _tmp2_ = NULL;
	GtkEntry* _tmp3_ = NULL;
	GtkComboBox* _tmp4_ = NULL;
	GtkListStore* _tmp5_ = NULL;
	GtkTreeView* _tmp6_ = NULL;
	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, BuildTool* build_tool) {
	GtkEntry* _tmp0_ = NULL;
	BuildTool _tmp1_ = {0};
	const gchar* _tmp2_ = NULL;
	GtkEntry* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	GtkEntry* _tmp6_ = NULL;
	BuildTool _tmp7_ = {0};
	const gchar* _tmp8_ = NULL;
	GtkEntry* _tmp9_ = NULL;
	BuildTool _tmp10_ = {0};
	const gchar* _tmp11_ = NULL;
	GtkComboBox* _tmp12_ = NULL;
	GtkTreeIter iter = {0};
	gboolean ok = FALSE;
	GtkListStore* _tmp13_ = NULL;
	GtkTreeIter _tmp14_ = {0};
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	GtkTreeModel* model = NULL;
	GtkListStore* _tmp17_ = NULL;
	GtkTreeModel* _tmp18_ = NULL;
	GtkListStore* _tmp30_ = NULL;
	GtkTreeView* _tmp47_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (build_tool != NULL);
	_tmp0_ = self->priv->_entry_label;
	_tmp1_ = *build_tool;
	_tmp2_ = _tmp1_.label;
	gtk_entry_set_text (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->_entry_desc;
	_tmp4_ = build_tool_get_description (build_tool);
	_tmp5_ = _tmp4_;
	gtk_entry_set_text (_tmp3_, _tmp5_);
	_g_free0 (_tmp5_);
	_tmp6_ = self->priv->_entry_extensions;
	_tmp7_ = *build_tool;
	_tmp8_ = _tmp7_.extensions;
	gtk_entry_set_text (_tmp6_, _tmp8_);
	_tmp9_ = self->priv->_entry_files_to_open;
	_tmp10_ = *build_tool;
	_tmp11_ = _tmp10_.files_to_open;
	gtk_entry_set_text (_tmp9_, _tmp11_);
	_tmp12_ = self->priv->_icons_combobox;
	gtk_combo_box_set_active (_tmp12_, 0);
	_tmp13_ = self->priv->_icons_store;
	_tmp15_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp13_, &_tmp14_);
	iter = _tmp14_;
	ok = _tmp15_;
	_tmp16_ = ok;
	g_return_if_fail (_tmp16_);
	_tmp17_ = self->priv->_icons_store;
	_tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, GTK_TYPE_TREE_MODEL) ? ((GtkTreeModel*) _tmp17_) : NULL);
	model = _tmp18_;
	{
		gboolean _tmp19_ = FALSE;
		_tmp19_ = TRUE;
		while (TRUE) {
			gboolean _tmp20_ = FALSE;
			gchar* stock_id = NULL;
			GtkTreeModel* _tmp23_ = NULL;
			GtkTreeIter _tmp24_ = {0};
			const gchar* _tmp25_ = NULL;
			BuildTool _tmp26_ = {0};
			const gchar* _tmp27_ = NULL;
			_tmp20_ = _tmp19_;
			if (!_tmp20_) {
				GtkListStore* _tmp21_ = NULL;
				gboolean _tmp22_ = FALSE;
				_tmp21_ = self->priv->_icons_store;
				_tmp22_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp21_, &iter);
				if (!_tmp22_) {
					break;
				}
			}
			_tmp19_ = FALSE;
			_tmp23_ = model;
			_tmp24_ = iter;
			gtk_tree_model_get (_tmp23_, &_tmp24_, BUILD_TOOL_DIALOG_ICON_COLUMN_STOCK_ID, &stock_id, -1);
			_tmp25_ = stock_id;
			_tmp26_ = *build_tool;
			_tmp27_ = _tmp26_.icon;
			if (g_strcmp0 (_tmp25_, _tmp27_) == 0) {
				GtkComboBox* _tmp28_ = NULL;
				GtkTreeIter _tmp29_ = {0};
				_tmp28_ = self->priv->_icons_combobox;
				_tmp29_ = iter;
				gtk_combo_box_set_active_iter (_tmp28_, &_tmp29_);
				_g_free0 (stock_id);
				break;
			}
			_g_free0 (stock_id);
		}
	}
	_tmp30_ = self->priv->_jobs_store;
	gtk_list_store_clear (_tmp30_);
	{
		GeeArrayList* _build_job_list = NULL;
		BuildTool _tmp31_ = {0};
		GeeArrayList* _tmp32_ = NULL;
		GeeArrayList* _tmp33_ = NULL;
		gint _build_job_size = 0;
		GeeArrayList* _tmp34_ = NULL;
		gint _tmp35_ = 0;
		gint _tmp36_ = 0;
		gint _build_job_index = 0;
		_tmp31_ = *build_tool;
		_tmp32_ = _tmp31_.jobs;
		_tmp33_ = _g_object_ref0 (_tmp32_);
		_build_job_list = _tmp33_;
		_tmp34_ = _build_job_list;
		_tmp35_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp34_);
		_tmp36_ = _tmp35_;
		_build_job_size = _tmp36_;
		_build_job_index = -1;
		while (TRUE) {
			gint _tmp37_ = 0;
			gint _tmp38_ = 0;
			gint _tmp39_ = 0;
			BuildJob build_job = {0};
			GeeArrayList* _tmp40_ = NULL;
			gint _tmp41_ = 0;
			gpointer _tmp42_ = NULL;
			BuildJob* _tmp43_ = NULL;
			BuildJob _tmp44_ = {0};
			BuildJob _tmp45_ = {0};
			BuildJob _tmp46_ = {0};
			_tmp37_ = _build_job_index;
			_build_job_index = _tmp37_ + 1;
			_tmp38_ = _build_job_index;
			_tmp39_ = _build_job_size;
			if (!(_tmp38_ < _tmp39_)) {
				break;
			}
			_tmp40_ = _build_job_list;
			_tmp41_ = _build_job_index;
			_tmp42_ = gee_abstract_list_get ((GeeAbstractList*) _tmp40_, _tmp41_);
			_tmp43_ = (BuildJob*) _tmp42_;
			build_job_copy (_tmp43_, &_tmp44_);
			_tmp45_ = _tmp44_;
			_build_job_free0 (_tmp43_);
			build_job = _tmp45_;
			_tmp46_ = build_job;
			build_tool_dialog_add_build_job (self, &_tmp46_);
			build_job_destroy (&build_job);
		}
		_g_object_unref0 (_build_job_list);
	}
	_tmp47_ = self->priv->_jobs_view;
	gtk_tree_view_columns_autosize (_tmp47_);
	_g_object_unref0 (model);
}


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


static void build_tool_dialog_retrieve_build_tool (BuildToolDialog* self, BuildTool* result) {
	BuildTool tool = {0};
	GtkEntry* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GtkEntry* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	GtkEntry* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	GtkEntry* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	GtkTreeIter iter = {0};
	GtkComboBox* _tmp17_ = NULL;
	GtkTreeIter _tmp18_ = {0};
	GtkTreeModel* model = NULL;
	GtkListStore* _tmp19_ = NULL;
	GtkTreeModel* _tmp20_ = NULL;
	GtkTreeModel* _tmp21_ = NULL;
	GtkTreeIter _tmp22_ = {0};
	GtkListStore* _tmp23_ = NULL;
	GtkTreeModel* _tmp24_ = NULL;
	gboolean valid = FALSE;
	GtkListStore* _tmp25_ = NULL;
	GtkTreeIter _tmp26_ = {0};
	gboolean _tmp27_ = FALSE;
	g_return_if_fail (self != NULL);
	build_tool_init (&tool);
	_tmp0_ = self->priv->_entry_label;
	_tmp1_ = gtk_entry_get_text (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = string_strip (_tmp2_);
	_g_free0 (tool.label);
	tool.label = _tmp3_;
	_tmp4_ = self->priv->_entry_desc;
	_tmp5_ = gtk_entry_get_text (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = string_strip (_tmp6_);
	_tmp8_ = _tmp7_;
	build_tool_set_description (&tool, _tmp8_);
	_g_free0 (_tmp8_);
	_tmp9_ = self->priv->_entry_extensions;
	_tmp10_ = gtk_entry_get_text (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = string_strip (_tmp11_);
	_g_free0 (tool.extensions);
	tool.extensions = _tmp12_;
	_tmp13_ = self->priv->_entry_files_to_open;
	_tmp14_ = gtk_entry_get_text (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = string_strip (_tmp15_);
	_g_free0 (tool.files_to_open);
	tool.files_to_open = _tmp16_;
	_tmp17_ = self->priv->_icons_combobox;
	gtk_combo_box_get_active_iter (_tmp17_, &_tmp18_);
	iter = _tmp18_;
	_tmp19_ = self->priv->_icons_store;
	_tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, GTK_TYPE_TREE_MODEL) ? ((GtkTreeModel*) _tmp19_) : NULL);
	model = _tmp20_;
	_tmp21_ = model;
	_tmp22_ = iter;
	gtk_tree_model_get (_tmp21_, &_tmp22_, BUILD_TOOL_DIALOG_ICON_COLUMN_STOCK_ID, &tool.icon, -1);
	_tmp23_ = self->priv->_jobs_store;
	_tmp24_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, GTK_TYPE_TREE_MODEL) ? ((GtkTreeModel*) _tmp23_) : NULL);
	_g_object_unref0 (model);
	model = _tmp24_;
	_tmp25_ = self->priv->_jobs_store;
	_tmp27_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp25_, &_tmp26_);
	iter = _tmp26_;
	valid = _tmp27_;
	while (TRUE) {
		gboolean _tmp28_ = FALSE;
		BuildJob job = {0};
		gchar* command = NULL;
		gchar* post_processor_name = NULL;
		GtkTreeModel* _tmp29_ = NULL;
		GtkTreeIter _tmp30_ = {0};
		const gchar* _tmp31_ = NULL;
		gchar* _tmp32_ = NULL;
		const gchar* _tmp33_ = NULL;
		PostProcessorType* _tmp34_ = NULL;
		PostProcessorType* _tmp35_ = NULL;
		BuildTool _tmp36_ = {0};
		GeeArrayList* _tmp37_ = NULL;
		BuildJob _tmp38_ = {0};
		GtkListStore* _tmp39_ = NULL;
		gboolean _tmp40_ = FALSE;
		_tmp28_ = valid;
		if (!_tmp28_) {
			break;
		}
		memset (&job, 0, sizeof (BuildJob));
		_tmp29_ = model;
		_tmp30_ = iter;
		gtk_tree_model_get (_tmp29_, &_tmp30_, BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND, &command, BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR, &post_processor_name, -1);
		_tmp31_ = command;
		_tmp32_ = string_strip (_tmp31_);
		_g_free0 (job.command);
		job.command = _tmp32_;
		_tmp33_ = post_processor_name;
		_tmp34_ = build_tools_get_post_processor_type_from_name (_tmp33_);
		_tmp35_ = _tmp34_;
		job.post_processor = *_tmp35_;
		_g_free0 (_tmp35_);
		_tmp36_ = tool;
		_tmp37_ = _tmp36_.jobs;
		_tmp38_ = job;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp37_, &_tmp38_);
		_tmp39_ = self->priv->_jobs_store;
		_tmp40_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp39_, &iter);
		valid = _tmp40_;
		_g_free0 (post_processor_name);
		_g_free0 (command);
		build_job_destroy (&job);
	}
	*result = tool;
	_g_object_unref0 (model);
	return;
}


/*************************************************************************/
static void build_tool_dialog_add_build_job (BuildToolDialog* self, BuildJob* job) {
	gchar* post_processor_name = NULL;
	BuildJob _tmp0_ = {0};
	PostProcessorType _tmp1_ = 0;
	gchar* _tmp2_ = NULL;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
	GtkListStore* _tmp5_ = NULL;
	GtkTreeIter _tmp6_ = {0};
	BuildJob _tmp7_ = {0};
	const gchar* _tmp8_ = NULL;
	GtkTreeSelection* select = NULL;
	GtkTreeView* _tmp9_ = NULL;
	GtkTreeSelection* _tmp10_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	_tmp0_ = *job;
	_tmp1_ = _tmp0_.post_processor;
	_tmp2_ = build_tools_get_post_processor_name_from_type (_tmp1_);
	post_processor_name = _tmp2_;
	_tmp3_ = self->priv->_jobs_store;
	gtk_list_store_append (_tmp3_, &_tmp4_);
	iter = _tmp4_;
	_tmp5_ = self->priv->_jobs_store;
	_tmp6_ = iter;
	_tmp7_ = *job;
	_tmp8_ = _tmp7_.command;
	gtk_list_store_set (_tmp5_, &_tmp6_, BUILD_TOOL_DIALOG_JOB_COLUMN_COMMAND, _tmp8_, BUILD_TOOL_DIALOG_JOB_COLUMN_POST_PROCESSOR, post_processor_name, -1);
	_tmp9_ = self->priv->_jobs_view;
	_tmp10_ = gtk_tree_view_get_selection (_tmp9_);
	select = _tmp10_;
	g_signal_emit_by_name (select, "changed");
	_g_free0 (post_processor_name);
}


/*************************************************************************/
static GtkGrid* build_tool_dialog_get_main_grid (BuildToolDialog* self) {
	GtkGrid* result = NULL;
	GtkGrid* main_grid = NULL;
	GtkGrid* _tmp0_ = NULL;
	GtkGrid* _tmp1_ = NULL;
	GtkGrid* _tmp2_ = NULL;
	GtkGrid* _tmp3_ = NULL;
	GtkGrid* _tmp4_ = NULL;
	GtkGrid* _tmp5_ = NULL;
	GtkGrid* _tmp6_ = NULL;
	GtkGrid* _tmp7_ = NULL;
	GtkGrid* _tmp8_ = NULL;
	GtkGrid* _tmp9_ = NULL;
	GtkGrid* _tmp10_ = NULL;
	GtkGrid* _tmp11_ = NULL;
	GtkGrid* _tmp12_ = NULL;
	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, (GtkWidget*) _tmp4_, 1, 0, 1, 1);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = build_tool_dialog_get_extensions_grid (self);
	_tmp6_ = _tmp5_;
	gtk_grid_attach (main_grid, (GtkWidget*) _tmp6_, 0, 1, 1, 1);
	_g_object_unref0 (_tmp6_);
	_tmp7_ = build_tool_dialog_get_icons_grid (self);
	_tmp8_ = _tmp7_;
	gtk_grid_attach (main_grid, (GtkWidget*) _tmp8_, 1, 1, 1, 1);
	_g_object_unref0 (_tmp8_);
	_tmp9_ = build_tool_dialog_get_jobs_grid (self);
	_tmp10_ = _tmp9_;
	gtk_grid_attach (main_grid, (GtkWidget*) _tmp10_, 0, 2, 2, 1);
	_g_object_unref0 (_tmp10_);
	_tmp11_ = build_tool_dialog_get_files_to_open_grid (self);
	_tmp12_ = _tmp11_;
	gtk_grid_attach (main_grid, (GtkWidget*) _tmp12_, 0, 3, 2, 1);
	_g_object_unref0 (_tmp12_);
	result = main_grid;
	return result;
}


static GtkGrid* build_tool_dialog_get_label_grid (BuildToolDialog* self) {
	GtkGrid* result = NULL;
	GtkGrid* grid = NULL;
	GtkGrid* _tmp0_ = NULL;
	GtkLabel* title = NULL;
	GtkLabel* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	GtkLabel* arrow = NULL;
	GtkLabel* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	GtkEntry* _tmp9_ = NULL;
	GtkEntry* _tmp10_ = NULL;
	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_ = _ ("Label");
	_tmp3_ = g_strconcat ("<b>", _tmp2_, NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strconcat (_tmp4_, "</b>", NULL);
	_tmp6_ = _tmp5_;
	gtk_label_set_markup (title, _tmp6_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	gtk_widget_set_halign ((GtkWidget*) title, GTK_ALIGN_START);
	gtk_grid_attach (grid, (GtkWidget*) title, 0, 0, 1, 1);
	_tmp7_ = (GtkLabel*) gtk_label_new ("→");
	g_object_ref_sink (_tmp7_);
	arrow = _tmp7_;
	_tmp8_ = _ ("You can select this arrow and copy/paste it!");
	gtk_widget_set_tooltip_text ((GtkWidget*) arrow, _tmp8_);
	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);
	_tmp9_ = self->priv->_entry_label;
	gtk_widget_set_margin_left ((GtkWidget*) _tmp9_, 12);
	_tmp10_ = self->priv->_entry_label;
	gtk_grid_attach (grid, (GtkWidget*) _tmp10_, 0, 1, 2, 1);
	result = grid;
	_g_object_unref0 (arrow);
	_g_object_unref0 (title);
	return result;
}


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


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


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


static GtkGrid* build_tool_dialog_get_jobs_grid (BuildToolDialog* self) {
	GtkGrid* result = NULL;
	GtkLabel* placeholders = NULL;
	const gchar* _tmp0_ = NULL;
	GtkLabel* _tmp1_ = NULL;
	GtkLabel* placeholder_filename = NULL;
	GtkLabel* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	GtkLabel* placeholder_shortname = NULL;
	GtkLabel* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	GtkGrid* placeholders_grid = NULL;
	GtkGrid* _tmp16_ = NULL;
	GtkTreeView* _tmp17_ = NULL;
	GtkScrolledWindow* scrolled_window = NULL;
	GtkTreeView* _tmp18_ = NULL;
	GtkScrolledWindow* _tmp19_ = NULL;
	GtkStyleContext* context = NULL;
	GtkStyleContext* _tmp20_ = NULL;
	GtkStyleContext* _tmp21_ = NULL;
	GtkStyleContext* _tmp22_ = NULL;
	GtkToolbar* toolbar = NULL;
	GtkToolbar* _tmp23_ = NULL;
	GtkToolButton* _tmp24_ = NULL;
	GtkToolButton* _tmp25_ = NULL;
	GtkToolButton* _tmp26_ = NULL;
	GtkToolButton* _tmp27_ = NULL;
	GtkToolButton* _tmp28_ = NULL;
	GtkToolButton* _tmp29_ = NULL;
	GtkToolButton* _tmp30_ = NULL;
	GtkToolButton* _tmp31_ = NULL;
	GtkStyleContext* _tmp32_ = NULL;
	GtkStyleContext* _tmp33_ = NULL;
	GtkStyleContext* _tmp34_ = NULL;
	GtkStyleContext* _tmp35_ = NULL;
	GtkBox* jobs_box = NULL;
	GtkBox* _tmp36_ = NULL;
	const gchar* _tmp37_ = NULL;
	GtkGrid* _tmp38_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = _ ("Placeholders:");
	_tmp1_ = (GtkLabel*) gtk_label_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	placeholders = _tmp1_;
	_tmp2_ = (GtkLabel*) gtk_label_new ("$filename");
	g_object_ref_sink (_tmp2_);
	placeholder_filename = _tmp2_;
	_tmp3_ = _ ("The active document's filename.");
	_tmp4_ = g_strconcat (_tmp3_, "\n", NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = _ ("If the active document belongs to a project, the main file is choosen.");
	_tmp7_ = g_strconcat (_tmp5_, _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	gtk_widget_set_tooltip_text ((GtkWidget*) placeholder_filename, _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp5_);
	_tmp9_ = (GtkLabel*) gtk_label_new ("$shortname");
	g_object_ref_sink (_tmp9_);
	placeholder_shortname = _tmp9_;
	_tmp10_ = _ ("The active document's filename without its extension.");
	_tmp11_ = g_strconcat (_tmp10_, "\n", NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = _ ("If the active document belongs to a project, the main file is choosen.");
	_tmp14_ = g_strconcat (_tmp12_, _tmp13_, NULL);
	_tmp15_ = _tmp14_;
	gtk_widget_set_tooltip_text ((GtkWidget*) placeholder_shortname, _tmp15_);
	_g_free0 (_tmp15_);
	_g_free0 (_tmp12_);
	_tmp16_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp16_);
	placeholders_grid = _tmp16_;
	gtk_orientable_set_orientation ((GtkOrientable*) placeholders_grid, GTK_ORIENTATION_HORIZONTAL);
	gtk_grid_set_column_spacing (placeholders_grid, (guint) 10);
	gtk_container_add ((GtkContainer*) placeholders_grid, (GtkWidget*) placeholders);
	gtk_container_add ((GtkContainer*) placeholders_grid, (GtkWidget*) placeholder_filename);
	gtk_container_add ((GtkContainer*) placeholders_grid, (GtkWidget*) placeholder_shortname);
	_tmp17_ = self->priv->_jobs_view;
	g_object_set ((GtkWidget*) _tmp17_, "expand", TRUE, NULL);
	_tmp18_ = self->priv->_jobs_view;
	_tmp19_ = utils_add_scrollbar ((GtkWidget*) _tmp18_);
	scrolled_window = _tmp19_;
	gtk_widget_set_size_request ((GtkWidget*) scrolled_window, 600, 80);
	gtk_scrolled_window_set_shadow_type (scrolled_window, GTK_SHADOW_IN);
	_tmp20_ = gtk_widget_get_style_context ((GtkWidget*) scrolled_window);
	_tmp21_ = _g_object_ref0 (_tmp20_);
	context = _tmp21_;
	_tmp22_ = context;
	gtk_style_context_set_junction_sides (_tmp22_, GTK_JUNCTION_BOTTOM);
	_tmp23_ = (GtkToolbar*) gtk_toolbar_new ();
	g_object_ref_sink (_tmp23_);
	toolbar = _tmp23_;
	_tmp24_ = build_tool_dialog_get_add_button (self);
	_tmp25_ = _tmp24_;
	gtk_toolbar_insert (toolbar, (GtkToolItem*) _tmp25_, -1);
	_g_object_unref0 (_tmp25_);
	_tmp26_ = build_tool_dialog_get_remove_button (self);
	_tmp27_ = _tmp26_;
	gtk_toolbar_insert (toolbar, (GtkToolItem*) _tmp27_, -1);
	_g_object_unref0 (_tmp27_);
	_tmp28_ = build_tool_dialog_get_up_button (self);
	_tmp29_ = _tmp28_;
	gtk_toolbar_insert (toolbar, (GtkToolItem*) _tmp29_, -1);
	_g_object_unref0 (_tmp29_);
	_tmp30_ = build_tool_dialog_get_down_button (self);
	_tmp31_ = _tmp30_;
	gtk_toolbar_insert (toolbar, (GtkToolItem*) _tmp31_, -1);
	_g_object_unref0 (_tmp31_);
	gtk_toolbar_set_icon_size (toolbar, GTK_ICON_SIZE_MENU);
	gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_ICONS);
	_tmp32_ = gtk_widget_get_style_context ((GtkWidget*) toolbar);
	_tmp33_ = _g_object_ref0 (_tmp32_);
	_g_object_unref0 (context);
	context = _tmp33_;
	_tmp34_ = context;
	gtk_style_context_add_class (_tmp34_, GTK_STYLE_CLASS_INLINE_TOOLBAR);
	_tmp35_ = context;
	gtk_style_context_set_junction_sides (_tmp35_, GTK_JUNCTION_TOP);
	_tmp36_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp36_);
	jobs_box = _tmp36_;
	gtk_widget_set_margin_bottom ((GtkWidget*) placeholders_grid, 8);
	gtk_box_pack_start (jobs_box, (GtkWidget*) placeholders_grid, FALSE, TRUE, (guint) 0);
	gtk_box_pack_start (jobs_box, (GtkWidget*) scrolled_window, TRUE, TRUE, (guint) 0);
	gtk_box_pack_start (jobs_box, (GtkWidget*) toolbar, FALSE, TRUE, (guint) 0);
	_tmp37_ = _ ("Jobs");
	_tmp38_ = utils_get_dialog_component (_tmp37_, (GtkWidget*) jobs_box);
	result = _tmp38_;
	_g_object_unref0 (jobs_box);
	_g_object_unref0 (toolbar);
	_g_object_unref0 (context);
	_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 GtkGrid* build_tool_dialog_get_files_to_open_grid (BuildToolDialog* self) {
	GtkGrid* result = NULL;
	GtkEntry* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	GtkEntry* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	GtkEntry* _tmp14_ = NULL;
	GtkGrid* _tmp15_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_entry_files_to_open;
	_tmp1_ = _ ("List of files to open after executing the build jobs.");
	_tmp2_ = g_strconcat (_tmp1_, "\n", NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = _ ("The files are separated by spaces.");
	_tmp5_ = g_strconcat (_tmp3_, _tmp4_, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat (_tmp6_, "\n", NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = _ ("You should use the placeholders to specify the files.");
	_tmp10_ = g_strconcat (_tmp8_, _tmp9_, NULL);
	_tmp11_ = _tmp10_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp0_, _tmp11_);
	_g_free0 (_tmp11_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp3_);
	_tmp12_ = self->priv->_entry_files_to_open;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp12_, TRUE);
	_tmp13_ = _ ("Files to open");
	_tmp14_ = self->priv->_entry_files_to_open;
	_tmp15_ = utils_get_dialog_component (_tmp13_, (GtkWidget*) _tmp14_);
	result = _tmp15_;
	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;
}



