/* transaction-gtk.c generated by valac 0.56.17, the Vala compiler
 * generated from transaction-gtk.vala, do not modify */

/*
 *  pamac-vala
 *
 *  Copyright (C) 2018-2022 Guillaume Benoit <guillaume@manjaro.org>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a get of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "pamac-gtk.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <gtk/gtk.h>
#include <pamac.h>
#include <gio/gio.h>
#include <glib-object.h>
#include <glib/gi18n-lib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	PAMAC_TRANSACTION_GTK_0_PROPERTY,
	PAMAC_TRANSACTION_GTK_APPLICATION_PROPERTY,
	PAMAC_TRANSACTION_GTK_LOCAL_CONFIG_PROPERTY,
	PAMAC_TRANSACTION_GTK_NO_CONFIRM_UPGRADE_PROPERTY,
	PAMAC_TRANSACTION_GTK_NUM_PROPERTIES
};
static GParamSpec* pamac_transaction_gtk_properties[PAMAC_TRANSACTION_GTK_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
typedef struct _PamacTransactionGtkChooseOptdepsData PamacTransactionGtkChooseOptdepsData;

#define PAMAC_TYPE_CHOOSE_PROVIDER_DIALOG (pamac_choose_provider_dialog_get_type ())
#define PAMAC_CHOOSE_PROVIDER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_CHOOSE_PROVIDER_DIALOG, PamacChooseProviderDialog))
#define PAMAC_CHOOSE_PROVIDER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_CHOOSE_PROVIDER_DIALOG, PamacChooseProviderDialogClass))
#define PAMAC_IS_CHOOSE_PROVIDER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_CHOOSE_PROVIDER_DIALOG))
#define PAMAC_IS_CHOOSE_PROVIDER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_CHOOSE_PROVIDER_DIALOG))
#define PAMAC_CHOOSE_PROVIDER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_CHOOSE_PROVIDER_DIALOG, PamacChooseProviderDialogClass))

typedef struct _PamacChooseProviderDialog PamacChooseProviderDialog;
typedef struct _PamacChooseProviderDialogClass PamacChooseProviderDialogClass;
typedef struct _Block2Data Block2Data;
typedef struct _PamacChooseProviderDialogPrivate PamacChooseProviderDialogPrivate;
typedef struct _PamacTransactionGtkChooseProviderData PamacTransactionGtkChooseProviderData;
typedef struct _Block3Data Block3Data;
typedef struct _PamacTransactionGtkAskImportKeyData PamacTransactionGtkAskImportKeyData;
typedef struct _PamacTransactionGtkAskEditBuildFilesData PamacTransactionGtkAskEditBuildFilesData;
typedef struct _PamacTransactionGtkAskCommitData PamacTransactionGtkAskCommitData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _PamacTransactionGtkGetIconPixbufData PamacTransactionGtkGetIconPixbufData;

#define PAMAC_TYPE_SUMMARY_ROW (pamac_summary_row_get_type ())
#define PAMAC_SUMMARY_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_SUMMARY_ROW, PamacSummaryRow))
#define PAMAC_SUMMARY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_SUMMARY_ROW, PamacSummaryRowClass))
#define PAMAC_IS_SUMMARY_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_SUMMARY_ROW))
#define PAMAC_IS_SUMMARY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_SUMMARY_ROW))
#define PAMAC_SUMMARY_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_SUMMARY_ROW, PamacSummaryRowClass))

typedef struct _PamacSummaryRow PamacSummaryRow;
typedef struct _PamacSummaryRowClass PamacSummaryRowClass;
typedef struct _Block4Data Block4Data;
typedef struct _PamacSummaryRowPrivate PamacSummaryRowPrivate;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

#define PAMAC_TYPE_TRANSACTION_SUM_DIALOG (pamac_transaction_sum_dialog_get_type ())
#define PAMAC_TRANSACTION_SUM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_TRANSACTION_SUM_DIALOG, PamacTransactionSumDialog))
#define PAMAC_TRANSACTION_SUM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_TRANSACTION_SUM_DIALOG, PamacTransactionSumDialogClass))
#define PAMAC_IS_TRANSACTION_SUM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_TRANSACTION_SUM_DIALOG))
#define PAMAC_IS_TRANSACTION_SUM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_TRANSACTION_SUM_DIALOG))
#define PAMAC_TRANSACTION_SUM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_TRANSACTION_SUM_DIALOG, PamacTransactionSumDialogClass))

typedef struct _PamacTransactionSumDialog PamacTransactionSumDialog;
typedef struct _PamacTransactionSumDialogClass PamacTransactionSumDialogClass;
typedef struct _Block5Data Block5Data;
typedef struct _PamacTransactionSumDialogPrivate PamacTransactionSumDialogPrivate;
typedef struct _PamacTransactionGtkShowSummaryData PamacTransactionGtkShowSummaryData;
typedef struct _Block6Data Block6Data;
typedef struct _Block7Data Block7Data;
typedef struct _PamacTransactionGtkEditBuildFilesData PamacTransactionGtkEditBuildFilesData;
typedef struct _PamacTransactionGtkCreateBuildFilesTabData PamacTransactionGtkCreateBuildFilesTabData;
typedef struct _PamacTransactionGtkPopulateBuildFilesAsyncData PamacTransactionGtkPopulateBuildFilesAsyncData;
typedef struct _PamacTransactionGtkSaveBuildFilesAsyncData PamacTransactionGtkSaveBuildFilesAsyncData;
typedef struct _Block8Data Block8Data;
typedef struct _Block9Data Block9Data;
typedef struct _Block10Data Block10Data;
typedef struct _PamacTransactionGtkAskSnapInstallClassicData PamacTransactionGtkAskSnapInstallClassicData;
typedef struct _Block11Data Block11Data;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
enum  {
	PAMAC_TRANSACTION_GTK_TRANSACTION_SUM_POPULATED_SIGNAL,
	PAMAC_TRANSACTION_GTK_NUM_SIGNALS
};
static guint pamac_transaction_gtk_signals[PAMAC_TRANSACTION_GTK_NUM_SIGNALS] = {0};

struct _PamacTransactionGtkPrivate {
	GHashTable* transaction_summary;
	GRecMutex __lock_transaction_summary;
	GString* warning_textbuffer;
	gchar* current_action;
	GRecMutex __lock_current_action;
	guint pulse_timeout_id;
	gdouble scroll_value;
	GtkApplication* _application;
	PamacLocalConfig* _local_config;
	gboolean _no_confirm_upgrade;
	gboolean summary_shown;
};

struct _Block1Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	gint response;
	gpointer _async_data_;
};

struct _PamacTransactionGtkChooseOptdepsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	gchar* pkgname;
	GPtrArray* optdeps;
	GPtrArray* result;
	Block1Data* _data1_;
	GPtrArray* optdeps_to_install;
	PamacChoosePkgsDialog* choose_pkgs_dialog;
	PamacChoosePkgsDialog* _tmp0_;
	PamacChoosePkgsDialog* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GPtrArray* name_collection;
	guint name_index;
	const gchar* name;
	PamacChoosePkgsDialog* _tmp4_;
	const gchar* _tmp5_;
	PamacChoosePkgsDialog* _tmp6_;
	GtkButton* _tmp7_;
	PamacChoosePkgsDialog* _tmp8_;
	PamacChoosePkgsDialog* _tmp9_;
	PamacChoosePkgsDialog* _tmp10_;
	GPtrArray* _tmp11_;
	GPtrArray* _tmp12_;
	PamacChoosePkgsDialog* _tmp13_;
};

struct _Block2Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	PamacChooseProviderDialog* choose_provider_dialog;
	GtkBox* box;
	gint index;
	gpointer _async_data_;
};

struct _PamacChooseProviderDialog {
	GtkDialog parent_instance;
	PamacChooseProviderDialogPrivate * priv;
	GtkBox* box;
	GtkButton* valid_button;
};

struct _PamacChooseProviderDialogClass {
	GtkDialogClass parent_class;
};

struct _PamacTransactionGtkChooseProviderData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	gchar* depend;
	GPtrArray* providers;
	gint result;
	Block2Data* _data2_;
	GtkWindow* application_window;
	GtkApplication* _tmp0_;
	GtkWindow* _tmp1_;
	GtkWindow* _tmp2_;
	GtkWindow* _tmp3_;
	GtkWindow* _tmp4_;
	PamacChooseProviderDialog* _tmp5_;
	PamacChooseProviderDialog* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	PamacChooseProviderDialog* _tmp9_;
	GtkBox* _tmp10_;
	GPtrArray* pkgs;
	GPtrArray* _tmp11_;
	GPtrArray* provider_collection;
	guint provider_index;
	const gchar* provider;
	PamacAlpmPackage* pkg;
	PamacDatabase* _tmp12_;
	PamacDatabase* _tmp13_;
	const gchar* _tmp14_;
	PamacAlpmPackage* _tmp15_;
	PamacAlpmPackage* _tmp16_;
	PamacAlpmPackage* _tmp17_;
	PamacDatabase* _tmp18_;
	PamacDatabase* _tmp19_;
	const gchar* _tmp20_;
	PamacAURPackage* _tmp21_;
	PamacAlpmPackage* _tmp22_;
	PamacAlpmPackage* _tmp23_;
	GPtrArray* _tmp24_;
	PamacAlpmPackage* _tmp25_;
	PamacPackage* _tmp26_;
	GtkRadioButton* last_radiobutton;
	GPtrArray* _tmp27_;
	GPtrArray* pkg_collection;
	guint pkg_index;
	PamacPackage* _vala1_pkg;
	gchar* _vala1_provider;
	PamacPackage* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	PamacPackage* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	PamacPackage* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	GtkRadioButton* radiobutton;
	const gchar* _tmp38_;
	GtkRadioButton* _tmp39_;
	GtkRadioButton* _tmp40_;
	GtkRadioButton* _tmp41_;
	GtkRadioButton* _tmp42_;
	GtkRadioButton* _tmp43_;
	GtkRadioButton* _tmp44_;
	GSList* _tmp45_;
	GtkRadioButton* _tmp46_;
	GtkBox* _tmp47_;
	GtkRadioButton* _tmp48_;
	PamacChooseProviderDialog* _tmp49_;
	GtkButton* _tmp50_;
	PamacChooseProviderDialog* _tmp51_;
	PamacChooseProviderDialog* _tmp52_;
};

struct _Block3Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	GtkDialog* dialog;
	gint response;
	gpointer _async_data_;
};

struct _PamacTransactionGtkAskImportKeyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	gchar* pkgname;
	gchar* key;
	gchar* owner;
	gboolean result;
	Block3Data* _data3_;
	GtkDialogFlags flags;
	gint use_header_bar;
	GtkSettings* _tmp0_;
	gint _tmp1_;
	GtkWindow* application_window;
	GtkApplication* _tmp2_;
	GtkWindow* _tmp3_;
	GtkWindow* _tmp4_;
	GtkWindow* _tmp5_;
	GtkWindow* _tmp6_;
	GtkDialog* _tmp7_;
	GtkDialog* _tmp8_;
	GtkDialog* _tmp9_;
	GtkDialog* _tmp10_;
	GtkDialog* _tmp11_;
	GtkDialog* _tmp12_;
	GtkDialog* _tmp13_;
	GtkDialog* _tmp14_;
	GtkWidget* widget;
	GtkDialog* _tmp15_;
	GtkWidget* _tmp16_;
	GtkWidget* _tmp17_;
	GString* textbuffer;
	GString* _tmp18_;
	GString* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	GString* _tmp22_;
	GString* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GString* _tmp26_;
	GtkLabel* label;
	GString* _tmp27_;
	const gchar* _tmp28_;
	GtkLabel* _tmp29_;
	GtkLabel* _tmp30_;
	GtkLabel* _tmp31_;
	GtkLabel* _tmp32_;
	GtkLabel* _tmp33_;
	GtkLabel* _tmp34_;
	GtkLabel* _tmp35_;
	GtkBox* box;
	GtkDialog* _tmp36_;
	GtkBox* _tmp37_;
	GtkBox* _tmp38_;
	GtkLabel* _tmp39_;
	GtkBox* _tmp40_;
	GtkBox* _tmp41_;
	GtkDialog* _tmp42_;
	GtkDialog* _tmp43_;
	GtkDialog* _tmp44_;
	GtkDialog* _tmp45_;
};

struct _PamacTransactionGtkAskEditBuildFilesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	PamacTransactionSummary* summary;
	gboolean result;
	gboolean answer;
	gint response;
};

struct _PamacTransactionGtkAskCommitData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	PamacTransactionSummary* summary;
	gboolean result;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GPtrArray* _tmp4_;
	GPtrArray* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	GPtrArray* _tmp8_;
	GPtrArray* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	GPtrArray* _tmp12_;
	GPtrArray* _tmp13_;
	gint _tmp14_;
	gint _tmp15_;
	GPtrArray* _tmp16_;
	GPtrArray* _tmp17_;
	gint _tmp18_;
	gint _tmp19_;
	GPtrArray* _tmp20_;
	GPtrArray* _tmp21_;
	gint _tmp22_;
	gint _tmp23_;
	gboolean must_confirm;
	gboolean _tmp24_;
	gboolean _tmp25_;
	gboolean _tmp26_;
	GPtrArray* _tmp27_;
	GPtrArray* _tmp28_;
	gint _tmp29_;
	gint _tmp30_;
	gint response;
};

struct _PamacTransactionGtkGetIconPixbufData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	gchar* url;
	GdkPixbuf* result;
	GFile* uri;
	GFile* _tmp0_;
	GFile* cached_icon;
	GFile* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	GdkPixbuf* pixbuf;
	GFile* _tmp8_;
	GdkPixbuf* _tmp9_;
	GFile* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GdkPixbuf* _tmp13_;
	GdkPixbuf* _tmp14_;
	GdkPixbuf* _tmp15_;
	GError* e;
	GError* _tmp16_;
	const gchar* _tmp17_;
	GInputStream* inputstream;
	PamacDatabase* _tmp18_;
	PamacDatabase* _tmp19_;
	GInputStream* _tmp20_;
	GdkPixbuf* _tmp21_;
	GInputStream* _tmp22_;
	GdkPixbuf* _tmp23_;
	GdkPixbuf* _tmp24_;
	gint width;
	GdkPixbuf* _tmp25_;
	GdkPixbuf* _tmp26_;
	GdkPixbuf* _tmp27_;
	GFileOutputStream* os;
	GFile* _tmp28_;
	GFileOutputStream* _tmp29_;
	GdkPixbuf* _tmp30_;
	GFileOutputStream* _tmp31_;
	GError* _vala1_e;
	GError* _tmp32_;
	const gchar* _tmp33_;
	GError* _inner_error0_;
};

struct _Block4Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	GdkPixbuf* pixbuf;
	PamacSummaryRow* row;
	PamacPackage* pkg;
};

struct _PamacSummaryRow {
	GtkListBoxRow parent_instance;
	PamacSummaryRowPrivate * priv;
	GtkImage* app_icon;
	GtkLabel* name_label;
	GtkLabel* infos_label;
	GtkLabel* version_label;
	GtkLabel* repo_label;
	GtkLabel* size_label;
};

struct _PamacSummaryRowClass {
	GtkListBoxRowClass parent_class;
};

struct _Block5Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	PamacTransactionSumDialog* transaction_sum_dialog;
	gint response;
	gpointer _async_data_;
};

struct _PamacTransactionSumDialog {
	GtkDialog parent_instance;
	PamacTransactionSumDialogPrivate * priv;
	GtkLabel* top_label;
	GtkBox* box;
	GtkButton* cancel_button;
};

struct _PamacTransactionSumDialogClass {
	GtkDialogClass parent_class;
};

struct _PamacTransactionGtkShowSummaryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	PamacTransactionSummary* summary;
	gint result;
	Block5Data* _data5_;
	guint64 dsize;
	GtkWindow* application_window;
	GtkApplication* _tmp0_;
	GtkWindow* _tmp1_;
	GtkWindow* _tmp2_;
	GtkWindow* _tmp3_;
	GtkWindow* _tmp4_;
	PamacTransactionSumDialog* _tmp5_;
	GtkBox* box;
	PamacTransactionSumDialog* _tmp6_;
	GtkBox* _tmp7_;
	GPtrArray* pkgs;
	GPtrArray* conflict_pkgs;
	PamacPackage* pkg;
	guint i;
	guint length;
	guint conflicts_length;
	GtkListBox* remove_listbox;
	GPtrArray* _tmp8_;
	GPtrArray* _tmp9_;
	GPtrArray* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	GPtrArray* _tmp13_;
	GPtrArray* _tmp14_;
	GPtrArray* _tmp15_;
	gint _tmp16_;
	gint _tmp17_;
	GtkBox* _tmp18_;
	GtkListBox* _tmp19_;
	GPtrArray* _tmp20_;
	gconstpointer _tmp21_;
	GtkListBox* _tmp22_;
	PamacPackage* _tmp23_;
	GPtrArray* _tmp24_;
	gconstpointer _tmp25_;
	GtkListBox* _tmp26_;
	PamacPackage* _tmp27_;
	guint _tmp28_;
	GtkBox* _tmp29_;
	GtkListBox* _tmp30_;
	GPtrArray* _tmp31_;
	gconstpointer _tmp32_;
	GtkListBox* _tmp33_;
	PamacPackage* _tmp34_;
	GPtrArray* _tmp35_;
	gconstpointer _tmp36_;
	GtkListBox* _tmp37_;
	PamacPackage* _tmp38_;
	guint _tmp39_;
	GPtrArray* _tmp40_;
	GPtrArray* _tmp41_;
	GPtrArray* _tmp42_;
	gint _tmp43_;
	gint _tmp44_;
	GtkListBox* listbox;
	GtkBox* _tmp45_;
	GtkListBox* _tmp46_;
	GPtrArray* _tmp47_;
	gconstpointer _tmp48_;
	PamacPackage* _tmp49_;
	guint64 _tmp50_;
	guint64 _tmp51_;
	GtkListBox* _tmp52_;
	PamacPackage* _tmp53_;
	GPtrArray* _tmp54_;
	gconstpointer _tmp55_;
	PamacPackage* _tmp56_;
	guint64 _tmp57_;
	guint64 _tmp58_;
	GtkListBox* _tmp59_;
	PamacPackage* _tmp60_;
	guint _tmp61_;
	GPtrArray* _tmp62_;
	GPtrArray* _tmp63_;
	GPtrArray* _tmp64_;
	gint _tmp65_;
	gint _tmp66_;
	GtkListBox* _vala1_listbox;
	GtkBox* _tmp67_;
	GtkListBox* _tmp68_;
	GPtrArray* _tmp69_;
	gconstpointer _tmp70_;
	GtkListBox* _tmp71_;
	PamacPackage* _tmp72_;
	GPtrArray* _tmp73_;
	gconstpointer _tmp74_;
	GtkListBox* _tmp75_;
	PamacPackage* _tmp76_;
	guint _tmp77_;
	GtkButton* button;
	GtkButton* _tmp78_;
	GtkButton* _tmp79_;
	GtkButton* _tmp80_;
	GtkButton* _tmp81_;
	GtkButton* _tmp82_;
	GtkBox* _tmp83_;
	GtkButton* _tmp84_;
	GPtrArray* _tmp85_;
	GPtrArray* _tmp86_;
	GPtrArray* _tmp87_;
	gint _tmp88_;
	gint _tmp89_;
	GtkListBox* _vala2_listbox;
	GtkBox* _tmp90_;
	GtkListBox* _tmp91_;
	GPtrArray* _tmp92_;
	gconstpointer _tmp93_;
	PamacPackage* _tmp94_;
	guint64 _tmp95_;
	guint64 _tmp96_;
	GtkListBox* _tmp97_;
	PamacPackage* _tmp98_;
	GPtrArray* _tmp99_;
	gconstpointer _tmp100_;
	PamacPackage* _tmp101_;
	guint64 _tmp102_;
	guint64 _tmp103_;
	GtkListBox* _tmp104_;
	PamacPackage* _tmp105_;
	guint _tmp106_;
	GPtrArray* _tmp107_;
	GPtrArray* _tmp108_;
	GPtrArray* _tmp109_;
	gint _tmp110_;
	gint _tmp111_;
	GtkListBox* _vala3_listbox;
	GtkBox* _tmp112_;
	GtkListBox* _tmp113_;
	GPtrArray* _tmp114_;
	gconstpointer _tmp115_;
	PamacPackage* _tmp116_;
	guint64 _tmp117_;
	guint64 _tmp118_;
	GtkListBox* _tmp119_;
	PamacPackage* _tmp120_;
	GPtrArray* _tmp121_;
	gconstpointer _tmp122_;
	PamacPackage* _tmp123_;
	guint64 _tmp124_;
	guint64 _tmp125_;
	GtkListBox* _tmp126_;
	PamacPackage* _tmp127_;
	guint _tmp128_;
	GPtrArray* _tmp129_;
	GPtrArray* _tmp130_;
	GPtrArray* _tmp131_;
	gint _tmp132_;
	gint _tmp133_;
	gboolean _tmp134_;
	GtkListBox* _vala4_listbox;
	GtkBox* _tmp135_;
	GtkListBox* _tmp136_;
	GPtrArray* _tmp137_;
	gconstpointer _tmp138_;
	PamacPackage* _tmp139_;
	guint64 _tmp140_;
	guint64 _tmp141_;
	GtkListBox* _tmp142_;
	PamacPackage* _tmp143_;
	GPtrArray* _tmp144_;
	gconstpointer _tmp145_;
	PamacPackage* _tmp146_;
	guint64 _tmp147_;
	guint64 _tmp148_;
	GtkListBox* _tmp149_;
	PamacPackage* _tmp150_;
	guint _tmp151_;
	PamacTransactionSumDialog* _tmp152_;
	GtkLabel* _tmp153_;
	PamacTransactionSumDialog* _tmp154_;
	GtkLabel* _tmp155_;
	gchar* _tmp156_;
	gchar* _tmp157_;
	gchar* _tmp158_;
	gchar* _tmp159_;
	PamacTransactionSumDialog* _tmp160_;
	GtkLabel* _tmp161_;
	GtkLabel* label;
	GtkLabel* _tmp162_;
	GtkLabel* _tmp163_;
	GtkLabel* _tmp164_;
	GtkLabel* _tmp165_;
	GtkLabel* _tmp166_;
	GtkBox* _tmp167_;
	GtkLabel* _tmp168_;
	GString* _tmp169_;
	GtkLabel* _tmp170_;
	GString* _tmp171_;
	const gchar* _tmp172_;
	GString* _tmp173_;
	GtkLabel* _tmp174_;
	GtkButton* _vala1_button;
	GtkButton* _tmp175_;
	GtkButton* _tmp176_;
	GtkButton* _tmp177_;
	GtkButton* _tmp178_;
	GtkBox* _tmp179_;
	GtkButton* _tmp180_;
	PamacTransactionSumDialog* _tmp181_;
	GtkButton* _tmp182_;
	PamacTransactionSumDialog* _tmp183_;
	PamacTransactionSumDialog* _tmp184_;
};

struct _Block6Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	gpointer _async_data_;
};

struct _Block7Data {
	int _ref_count_;
	Block6Data * _data6_;
	gint response;
};

struct _PamacTransactionGtkEditBuildFilesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	GPtrArray* pkgnames;
	Block6Data* _data6_;
	GPtrArray* pkgname_collection;
	guint pkgname_index;
	const gchar* pkgname;
	Block7Data* _data7_;
	gchar* action;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	gboolean success;
	const gchar* _tmp6_;
	GtkBox* manager_box;
	GtkNotebook* _tmp7_;
	GtkContainer* _tmp8_;
	GtkBox* _tmp9_;
	GtkNotebook* _tmp10_;
	GtkDialogFlags flags;
	gint use_header_bar;
	GtkSettings* _tmp11_;
	gint _tmp12_;
	GtkWindow* application_window;
	GtkApplication* _tmp13_;
	GtkWindow* _tmp14_;
	GtkWindow* _tmp15_;
	GtkWindow* _tmp16_;
	GtkDialog* dialog;
	const gchar* _tmp17_;
	GtkWindow* _tmp18_;
	GtkDialog* _tmp19_;
	GtkDialog* _tmp20_;
	GtkDialog* _tmp21_;
	GtkDialog* _tmp22_;
	GtkDialog* _tmp23_;
	GtkDialog* _tmp24_;
	GtkDialog* _tmp25_;
	GtkWidget* widget;
	GtkDialog* _tmp26_;
	GtkWidget* _tmp27_;
	GtkWidget* _tmp28_;
	GtkBox* box;
	GtkDialog* _tmp29_;
	GtkBox* _tmp30_;
	GtkBox* _tmp31_;
	GtkBox* _tmp32_;
	GtkNotebook* _tmp33_;
	GtkDialog* _tmp34_;
	GtkDialog* _tmp35_;
	GtkDialog* _tmp36_;
	GtkDialog* _tmp37_;
	GtkBox* _tmp38_;
	GtkNotebook* _tmp39_;
	GtkDialog* _tmp40_;
	GtkBox* _tmp41_;
	GtkNotebook* _tmp42_;
	const gchar* _tmp43_;
};

struct _PamacTransactionGtkCreateBuildFilesTabData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	gchar* filename;
	gboolean editable;
	GFile* file;
	GFile* _tmp0_;
	GString* text;
	GString* _tmp1_;
	GFileInputStream* fis;
	GFile* _tmp2_;
	GFileInputStream* _tmp3_;
	GDataInputStream* dis;
	GFileInputStream* _tmp4_;
	GDataInputStream* _tmp5_;
	gchar* line;
	gchar* _tmp6_;
	GDataInputStream* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	GString* _tmp11_;
	const gchar* _tmp12_;
	GString* _tmp13_;
	GString* _tmp14_;
	const gchar* _tmp15_;
	GtkScrolledWindow* scrolledwindow;
	GtkScrolledWindow* _tmp16_;
	GtkScrolledWindow* _tmp17_;
	GtkTextView* textview;
	GtkTextView* _tmp18_;
	GtkTextView* _tmp19_;
	GtkTextView* _tmp20_;
	GtkTextView* _tmp21_;
	GtkTextView* _tmp22_;
	GtkTextView* _tmp23_;
	GtkTextView* _tmp24_;
	GtkTextView* _tmp25_;
	GtkTextView* _tmp26_;
	GtkTextView* _tmp27_;
	GtkTextView* _tmp28_;
	GtkTextBuffer* _tmp29_;
	GtkTextBuffer* _tmp30_;
	GString* _tmp31_;
	const gchar* _tmp32_;
	GString* _tmp33_;
	GtkTextView* _tmp34_;
	GtkTextBuffer* _tmp35_;
	GtkTextBuffer* _tmp36_;
	GtkTextIter iter;
	GtkTextView* _tmp37_;
	GtkTextBuffer* _tmp38_;
	GtkTextBuffer* _tmp39_;
	GtkTextIter _tmp40_;
	GtkTextView* _tmp41_;
	GtkTextBuffer* _tmp42_;
	GtkTextBuffer* _tmp43_;
	GtkTextIter _tmp44_;
	GtkTextView* _tmp45_;
	GtkScrolledWindow* _tmp46_;
	GtkTextView* _tmp47_;
	GtkLabel* label;
	GFile* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	GtkLabel* _tmp51_;
	GtkLabel* _tmp52_;
	GtkLabel* _tmp53_;
	GtkNotebook* _tmp54_;
	GtkScrolledWindow* _tmp55_;
	GtkLabel* _tmp56_;
	GError* e;
	GError* _tmp57_;
	const gchar* _tmp58_;
	GError* _inner_error0_;
};

struct _PamacTransactionGtkPopulateBuildFilesAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	gchar* pkgname;
	gboolean clone;
	gboolean overwrite;
	gboolean result;
	gint num_pages;
	GtkNotebook* _tmp0_;
	gint i;
	gboolean _tmp1_;
	gint _tmp2_;
	GtkNotebook* _tmp3_;
	GFile* clone_dir;
	PamacDatabase* _tmp4_;
	PamacDatabase* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	GPtrArray* file_paths;
	GPtrArray* _tmp8_;
	GPtrArray* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	GPtrArray* _tmp12_;
	GPtrArray* path_collection;
	guint path_index;
	const gchar* path;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* diff_path;
	gboolean _tmp15_;
	PamacDatabase* _tmp16_;
	PamacDatabase* _tmp17_;
	PamacConfig* _tmp18_;
	PamacConfig* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	PamacDatabase* _tmp22_;
	PamacDatabase* _tmp23_;
	PamacConfig* _tmp24_;
	PamacConfig* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	PamacDatabase* _tmp28_;
	PamacDatabase* _tmp29_;
	PamacConfig* _tmp30_;
	PamacConfig* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	PamacDatabase* _tmp38_;
	PamacDatabase* _tmp39_;
	PamacConfig* _tmp40_;
	PamacConfig* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	gchar* _tmp44_;
	GFile* diff_file;
	const gchar* _tmp45_;
	GFile* _tmp46_;
	GFile* _tmp47_;
	const gchar* _tmp48_;
	const gchar* _tmp49_;
};

struct _PamacTransactionGtkSaveBuildFilesAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	gchar* pkgname;
	gint num_pages;
	GtkNotebook* _tmp0_;
	gint index;
	GtkWidget* child;
	GtkNotebook* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	GtkScrolledWindow* scrolled_window;
	GtkWidget* _tmp4_;
	GtkScrolledWindow* _tmp5_;
	GtkTextView* textview;
	GtkScrolledWindow* _tmp6_;
	GtkWidget* _tmp7_;
	GtkTextView* _tmp8_;
	GtkTextView* _tmp9_;
	GtkTextBuffer* _tmp10_;
	GtkTextBuffer* _tmp11_;
	gchar* file_name;
	gboolean _tmp12_;
	PamacDatabase* _tmp13_;
	PamacDatabase* _tmp14_;
	PamacConfig* _tmp15_;
	PamacConfig* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	PamacDatabase* _tmp19_;
	PamacDatabase* _tmp20_;
	PamacConfig* _tmp21_;
	PamacConfig* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	PamacDatabase* _tmp25_;
	PamacDatabase* _tmp26_;
	PamacConfig* _tmp27_;
	PamacConfig* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	GtkNotebook* _tmp34_;
	GtkWidget* _tmp35_;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	PamacDatabase* _tmp38_;
	PamacDatabase* _tmp39_;
	PamacConfig* _tmp40_;
	PamacConfig* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	GtkNotebook* _tmp44_;
	GtkWidget* _tmp45_;
	const gchar* _tmp46_;
	gchar* _tmp47_;
	GFile* file;
	const gchar* _tmp48_;
	GFile* _tmp49_;
	GtkTextIter start_iter;
	GtkTextIter end_iter;
	GtkTextView* _tmp50_;
	GtkTextBuffer* _tmp51_;
	GtkTextBuffer* _tmp52_;
	GtkTextIter _tmp53_;
	GtkTextView* _tmp54_;
	GtkTextBuffer* _tmp55_;
	GtkTextBuffer* _tmp56_;
	GtkTextIter _tmp57_;
	GFile* _tmp58_;
	GFileOutputStream* fos;
	GFile* _tmp59_;
	GFileOutputStream* _tmp60_;
	gchar* text;
	GtkTextView* _tmp61_;
	GtkTextBuffer* _tmp62_;
	GtkTextBuffer* _tmp63_;
	GtkTextIter _tmp64_;
	GtkTextIter _tmp65_;
	gchar* _tmp66_;
	GFileOutputStream* _tmp67_;
	const gchar* _tmp68_;
	guint8* _tmp69_;
	gint _tmp69__length1;
	gint _tmp70_;
	guint8* _tmp71_;
	gint _tmp71__length1;
	GError* e;
	GError* _tmp72_;
	const gchar* _tmp73_;
	gint _tmp74_;
	GError* _inner_error0_;
};

struct _Block8Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	GtkDialog* dialog;
};

struct _Block9Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	GtkDialog* dialog;
	gchar* message;
};

struct _Block10Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	GtkDialog* dialog;
	gint response;
	gpointer _async_data_;
};

struct _PamacTransactionGtkAskSnapInstallClassicData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionGtk* self;
	gchar* name;
	gboolean result;
	Block10Data* _data10_;
	GtkDialogFlags flags;
	gint use_header_bar;
	GtkSettings* _tmp0_;
	gint _tmp1_;
	GtkWindow* application_window;
	GtkApplication* _tmp2_;
	GtkWindow* _tmp3_;
	GtkWindow* _tmp4_;
	GtkWindow* _tmp5_;
	GtkWindow* _tmp6_;
	GtkDialog* _tmp7_;
	GtkDialog* _tmp8_;
	GtkDialog* _tmp9_;
	GtkDialog* _tmp10_;
	GtkDialog* _tmp11_;
	GtkDialog* _tmp12_;
	GtkDialog* _tmp13_;
	GtkDialog* _tmp14_;
	GtkWidget* widget;
	GtkDialog* _tmp15_;
	GtkWidget* _tmp16_;
	GtkWidget* _tmp17_;
	GtkScrolledWindow* scrolledwindow;
	GtkScrolledWindow* _tmp18_;
	GtkScrolledWindow* _tmp19_;
	GString* textbuffer;
	GString* _tmp20_;
	GString* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	GString* _tmp24_;
	GString* _tmp25_;
	GString* _tmp26_;
	GString* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	GString* _tmp30_;
	GtkLabel* label;
	GString* _tmp31_;
	const gchar* _tmp32_;
	GtkLabel* _tmp33_;
	GtkLabel* _tmp34_;
	GtkLabel* _tmp35_;
	GtkLabel* _tmp36_;
	GtkLabel* _tmp37_;
	GtkLabel* _tmp38_;
	GtkLabel* _tmp39_;
	GtkScrolledWindow* _tmp40_;
	GtkLabel* _tmp41_;
	GtkScrolledWindow* _tmp42_;
	GtkScrolledWindow* _tmp43_;
	GtkBox* box;
	GtkDialog* _tmp44_;
	GtkBox* _tmp45_;
	GtkBox* _tmp46_;
	GtkScrolledWindow* _tmp47_;
	GtkBox* _tmp48_;
	GtkDialog* _tmp49_;
	GtkDialog* _tmp50_;
	GtkDialog* _tmp51_;
	GtkDialog* _tmp52_;
};

struct _Block11Data {
	int _ref_count_;
	PamacTransactionGtk* self;
	GMainLoop* loop;
};

static gint PamacTransactionGtk_private_offset;
static gpointer pamac_transaction_gtk_parent_class = NULL;

static void pamac_transaction_gtk_display_action (PamacTransactionGtk* self,
                                           const gchar* action);
static void pamac_transaction_gtk_display_action_progress (PamacTransactionGtk* self,
                                                    const gchar* action,
                                                    const gchar* status,
                                                    gdouble progress);
static void pamac_transaction_gtk_display_hook_progress (PamacTransactionGtk* self,
                                                  const gchar* action,
                                                  const gchar* details,
                                                  const gchar* status,
                                                  gdouble progress);
static gboolean __lambda4_ (PamacTransactionGtk* self);
static gboolean ___lambda4__gsource_func (gpointer self);
static void pamac_transaction_gtk_real_choose_optdeps_data_free (gpointer _data);
static void pamac_transaction_gtk_real_choose_optdeps (PamacTransaction* base,
                                                const gchar* pkgname,
                                                GPtrArray* optdeps,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static gboolean pamac_transaction_gtk_real_choose_optdeps_co (PamacTransactionGtkChooseOptdepsData* _data_);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void __lambda7_ (Block1Data* _data1_,
                 gint res);
static gboolean _pamac_transaction_gtk_real_choose_optdeps_co_gsource_func (gpointer self);
static void ___lambda7__gtk_dialog_response (GtkDialog* _sender,
                                      gint response_id,
                                      gpointer self);
static void _g_free0_ (gpointer var);
static void pamac_transaction_gtk_real_choose_provider_data_free (gpointer _data);
static void pamac_transaction_gtk_real_choose_provider (PamacTransaction* base,
                                                 const gchar* depend,
                                                 GPtrArray* providers,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
static gboolean pamac_transaction_gtk_real_choose_provider_co (PamacTransactionGtkChooseProviderData* _data_);
VALA_EXTERN GType pamac_choose_provider_dialog_get_type (void) G_GNUC_CONST ;
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
VALA_EXTERN PamacChooseProviderDialog* pamac_choose_provider_dialog_new (GtkWindow* window);
VALA_EXTERN PamacChooseProviderDialog* pamac_choose_provider_dialog_construct (GType object_type,
                                                                   GtkWindow* window);
static void _g_object_unref0_ (gpointer var);
static void __lambda8_ (Block2Data* _data2_);
static gboolean _pamac_transaction_gtk_real_choose_provider_co_gsource_func (gpointer self);
static void ___lambda8__gtk_dialog_response (GtkDialog* _sender,
                                      gint response_id,
                                      gpointer self);
static void pamac_transaction_gtk_real_ask_import_key_data_free (gpointer _data);
static void pamac_transaction_gtk_real_ask_import_key (PamacTransaction* base,
                                                const gchar* pkgname,
                                                const gchar* key,
                                                const gchar* owner,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static gboolean pamac_transaction_gtk_real_ask_import_key_co (PamacTransactionGtkAskImportKeyData* _data_);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void __lambda9_ (Block3Data* _data3_,
                 gint res);
static gboolean _pamac_transaction_gtk_real_ask_import_key_co_gsource_func (gpointer self);
static void ___lambda9__gtk_dialog_response (GtkDialog* _sender,
                                      gint response_id,
                                      gpointer self);
static void pamac_transaction_gtk_real_ask_edit_build_files_data_free (gpointer _data);
static void pamac_transaction_gtk_real_ask_edit_build_files (PamacTransaction* base,
                                                      PamacTransactionSummary* summary,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
static gboolean pamac_transaction_gtk_real_ask_edit_build_files_co (PamacTransactionGtkAskEditBuildFilesData* _data_);
static void pamac_transaction_gtk_show_summary (PamacTransactionGtk* self,
                                         PamacTransactionSummary* summary,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
static gint pamac_transaction_gtk_show_summary_finish (PamacTransactionGtk* self,
                                                GAsyncResult* _res_);
static void pamac_transaction_gtk_ask_edit_build_files_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_);
static void pamac_transaction_gtk_real_ask_commit_data_free (gpointer _data);
static void pamac_transaction_gtk_real_ask_commit (PamacTransaction* base,
                                            PamacTransactionSummary* summary,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static gboolean pamac_transaction_gtk_real_ask_commit_co (PamacTransactionGtkAskCommitData* _data_);
static void pamac_transaction_gtk_ask_commit_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_);
static void pamac_transaction_gtk_transaction_summary_add (PamacTransactionGtk* self,
                                                    const gchar* id);
static PamacAlpmPackage* pamac_transaction_gtk_get_full_alpm_pkg (PamacTransactionGtk* self,
                                                           PamacPackage* pkg);
static void pamac_transaction_gtk_get_icon_pixbuf_data_free (gpointer _data);
static gboolean pamac_transaction_gtk_get_icon_pixbuf_co (PamacTransactionGtkGetIconPixbufData* _data_);
static void pamac_transaction_gtk_get_icon_pixbuf_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
VALA_EXTERN GType pamac_summary_row_get_type (void) G_GNUC_CONST ;
static void pamac_transaction_gtk_set_row_app_icon (PamacTransactionGtk* self,
                                             PamacSummaryRow* row,
                                             PamacPackage* pkg);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static void ____lambda10_ (Block4Data* _data4_,
                    GObject* obj,
                    GAsyncResult* res);
static void _____lambda10__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void ______lambda11_ (Block4Data* _data4_,
                      GObject* obj,
                      GAsyncResult* res);
static void _______lambda11__gasync_ready_callback (GObject* source_object,
                                             GAsyncResult* res,
                                             gpointer self);
static PamacSummaryRow* pamac_transaction_gtk_create_summary_row (PamacTransactionGtk* self,
                                                           PamacPackage* pkg,
                                                           PamacAlpmPackage* full_alpm_pkg,
                                                           const gchar* infos_string);
VALA_EXTERN PamacSummaryRow* pamac_summary_row_new (void);
VALA_EXTERN PamacSummaryRow* pamac_summary_row_construct (GType object_type);
static gchar* pamac_transaction_gtk_get_pkgname_display_name (PamacTransactionGtk* self,
                                                       const gchar* pkgname);
static void pamac_transaction_gtk_add_infos_to_summary (PamacTransactionGtk* self,
                                                 GtkListBox* listbox,
                                                 PamacPackage* pkg,
                                                 const gchar* infos_string);
static void pamac_transaction_gtk_add_remove_to_summary (PamacTransactionGtk* self,
                                                  GtkListBox* listbox,
                                                  PamacPackage* pkg);
static void pamac_transaction_gtk_add_conflict_to_summary (PamacTransactionGtk* self,
                                                    GtkListBox* listbox,
                                                    PamacPackage* pkg);
static void pamac_transaction_gtk_add_downgrade_to_summary (PamacTransactionGtk* self,
                                                     GtkListBox* listbox,
                                                     PamacPackage* pkg);
static void pamac_transaction_gtk_add_build_to_summary (PamacTransactionGtk* self,
                                                 GtkListBox* listbox,
                                                 PamacPackage* pkg);
static void pamac_transaction_gtk_add_install_to_summary (PamacTransactionGtk* self,
                                                   GtkListBox* listbox,
                                                   PamacPackage* pkg);
static void pamac_transaction_gtk_add_reinstall_to_summary (PamacTransactionGtk* self,
                                                     GtkListBox* listbox,
                                                     PamacPackage* pkg);
static void pamac_transaction_gtk_add_upgrade_to_summary (PamacTransactionGtk* self,
                                                   GtkListBox* listbox,
                                                   PamacPackage* pkg);
static GtkListBox* pamac_transaction_gtk_create_listbox (PamacTransactionGtk* self,
                                                  GtkBox* box,
                                                  const gchar* action,
                                                  guint length);
static void pamac_transaction_gtk_show_summary_data_free (gpointer _data);
static gboolean pamac_transaction_gtk_show_summary_co (PamacTransactionGtkShowSummaryData* _data_);
VALA_EXTERN GType pamac_transaction_sum_dialog_get_type (void) G_GNUC_CONST ;
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
VALA_EXTERN PamacTransactionSumDialog* pamac_transaction_sum_dialog_new (GtkWindow* window);
VALA_EXTERN PamacTransactionSumDialog* pamac_transaction_sum_dialog_construct (GType object_type,
                                                                   GtkWindow* window);
static void ___lambda12_ (Block5Data* _data5_);
static void ____lambda12__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void ___lambda13_ (Block5Data* _data5_);
static void ____lambda13__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda16_ (Block5Data* _data5_,
                  gint res);
static gboolean _pamac_transaction_gtk_show_summary_co_gsource_func (gpointer self);
static void ___lambda16__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
static void pamac_transaction_gtk_real_edit_build_files_data_free (gpointer _data);
static void pamac_transaction_gtk_real_edit_build_files (PamacTransaction* base,
                                                  GPtrArray* pkgnames,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static gboolean pamac_transaction_gtk_real_edit_build_files_co (PamacTransactionGtkEditBuildFilesData* _data_);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static void pamac_transaction_gtk_edit_build_files_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void ____lambda17_ (Block7Data* _data7_,
                    gint res);
static gboolean _pamac_transaction_gtk_real_edit_build_files_co_gsource_func (gpointer self);
static void _____lambda17__gtk_dialog_response (GtkDialog* _sender,
                                         gint response_id,
                                         gpointer self);
static void pamac_transaction_gtk_create_build_files_tab_data_free (gpointer _data);
static void pamac_transaction_gtk_create_build_files_tab (PamacTransactionGtk* self,
                                                   const gchar* filename,
                                                   gboolean editable,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static void pamac_transaction_gtk_create_build_files_tab_finish (PamacTransactionGtk* self,
                                                          GAsyncResult* _res_);
static gboolean pamac_transaction_gtk_create_build_files_tab_co (PamacTransactionGtkCreateBuildFilesTabData* _data_);
static void pamac_transaction_gtk_create_build_files_tab_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_);
static void pamac_transaction_gtk_populate_build_files_async_data_free (gpointer _data);
static gboolean pamac_transaction_gtk_populate_build_files_async_co (PamacTransactionGtkPopulateBuildFilesAsyncData* _data_);
static void pamac_transaction_gtk_populate_build_files_async_ready (GObject* source_object,
                                                             GAsyncResult* _res_,
                                                             gpointer _user_data_);
static void pamac_transaction_gtk_save_build_files_async_data_free (gpointer _data);
static gboolean pamac_transaction_gtk_save_build_files_async_co (PamacTransactionGtkSaveBuildFilesAsyncData* _data_);
static void pamac_transaction_gtk_save_build_files_async_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static void ____lambda14_ (PamacTransactionGtk* self);
static void _____lambda14__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static void ___lambda15_ (Block8Data* _data8_);
static void ____lambda15__gtk_dialog_response (GtkDialog* _sender,
                                        gint response_id,
                                        gpointer self);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
static gboolean __lambda18_ (Block9Data* _data9_);
static gboolean ___lambda18__gsource_func (gpointer self);
static void __lambda19_ (Block9Data* _data9_);
static void ___lambda19__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
static void pamac_transaction_gtk_real_ask_snap_install_classic_data_free (gpointer _data);
static void pamac_transaction_gtk_real_ask_snap_install_classic (PamacTransaction* base,
                                                          const gchar* name,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static gboolean pamac_transaction_gtk_real_ask_snap_install_classic_co (PamacTransactionGtkAskSnapInstallClassicData* _data_);
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
static void __lambda20_ (Block10Data* _data10_,
                  gint res);
static gboolean _pamac_transaction_gtk_real_ask_snap_install_classic_co_gsource_func (gpointer self);
static void ___lambda20__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
static GObject * pamac_transaction_gtk_constructor (GType type,
                                             guint n_construct_properties,
                                             GObjectConstructParam * construct_properties);
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static void _pamac_transaction_gtk_display_action_pamac_transaction_emit_action (PamacTransaction* _sender,
                                                                          const gchar* action,
                                                                          gpointer self);
static void _pamac_transaction_gtk_display_action_progress_pamac_transaction_emit_action_progress (PamacTransaction* _sender,
                                                                                            const gchar* action,
                                                                                            const gchar* status,
                                                                                            gdouble progress,
                                                                                            gpointer self);
static void _pamac_transaction_gtk_display_action_progress_pamac_transaction_emit_download_progress (PamacTransaction* _sender,
                                                                                              const gchar* action,
                                                                                              const gchar* status,
                                                                                              gdouble progress,
                                                                                              gpointer self);
static void _pamac_transaction_gtk_display_hook_progress_pamac_transaction_emit_hook_progress (PamacTransaction* _sender,
                                                                                        const gchar* action,
                                                                                        const gchar* details,
                                                                                        const gchar* status,
                                                                                        gdouble progress,
                                                                                        gpointer self);
static void _pamac_transaction_gtk_show_details_pamac_transaction_emit_script_output (PamacTransaction* _sender,
                                                                               const gchar* message,
                                                                               gpointer self);
static void _pamac_transaction_gtk___lambda21_ (PamacTransactionGtk* self,
                                         const gchar* msg);
static void __pamac_transaction_gtk___lambda21__pamac_transaction_emit_warning (PamacTransaction* _sender,
                                                                         const gchar* message,
                                                                         gpointer self);
static void _pamac_transaction_gtk_display_error_pamac_transaction_emit_error (PamacTransaction* _sender,
                                                                        const gchar* message,
                                                                        GPtrArray* details,
                                                                        gpointer self);
static void _pamac_transaction_gtk___lambda22_ (PamacTransactionGtk* self);
static void __pamac_transaction_gtk___lambda22__pamac_transaction_start_downloading (PamacTransaction* _sender,
                                                                              gpointer self);
static void _pamac_transaction_gtk_start_progressbar_pulse_pamac_transaction_start_waiting (PamacTransaction* _sender,
                                                                                     gpointer self);
static void _pamac_transaction_gtk_stop_progressbar_pulse_pamac_transaction_stop_waiting (PamacTransaction* _sender,
                                                                                   gpointer self);
static void _pamac_transaction_gtk_start_progressbar_pulse_pamac_transaction_start_preparing (PamacTransaction* _sender,
                                                                                       gpointer self);
static void _pamac_transaction_gtk_stop_progressbar_pulse_pamac_transaction_stop_preparing (PamacTransaction* _sender,
                                                                                     gpointer self);
static void _pamac_transaction_gtk_start_progressbar_pulse_pamac_transaction_start_building (PamacTransaction* _sender,
                                                                                      gpointer self);
static void _pamac_transaction_gtk_stop_progressbar_pulse_pamac_transaction_stop_building (PamacTransaction* _sender,
                                                                                    gpointer self);
static void _pamac_transaction_gtk___lambda23_ (Block11Data* _data11_,
                                         GObject* obj,
                                         GAsyncResult* res);
static void __lambda24_ (Block11Data* _data11_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda24__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void __pamac_transaction_gtk___lambda23__gasync_ready_callback (GObject* source_object,
                                                                GAsyncResult* res,
                                                                gpointer self);
static void pamac_transaction_gtk_finalize (GObject * obj);
static GType pamac_transaction_gtk_get_type_once (void);
static void _vala_pamac_transaction_gtk_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_pamac_transaction_gtk_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec);

static inline gpointer
pamac_transaction_gtk_get_instance_private (PamacTransactionGtk* self)
{
	return G_STRUCT_MEMBER_P (self, PamacTransactionGtk_private_offset);
}

PamacTransactionGtk*
pamac_transaction_gtk_construct (GType object_type,
                                 PamacDatabase* database,
                                 PamacLocalConfig* local_config,
                                 GtkApplication* application)
{
	PamacTransactionGtk * self = NULL;
	g_return_val_if_fail (database != NULL, NULL);
	g_return_val_if_fail (local_config != NULL, NULL);
	self = (PamacTransactionGtk*) g_object_new (object_type, "database", database, "local-config", local_config, "application", application, NULL);
	return self;
}

PamacTransactionGtk*
pamac_transaction_gtk_new (PamacDatabase* database,
                           PamacLocalConfig* local_config,
                           GtkApplication* application)
{
	return pamac_transaction_gtk_construct (PAMAC_TYPE_TRANSACTION_GTK, database, local_config, application);
}

void
pamac_transaction_gtk_show_details (PamacTransactionGtk* self,
                                    const gchar* message)
{
	GtkTextIter iter = {0};
	GtkTextView* _tmp0_;
	GtkTextBuffer* _tmp1_;
	GtkTextBuffer* _tmp2_;
	GtkTextIter _tmp3_ = {0};
	GtkTextView* _tmp4_;
	GtkTextBuffer* _tmp5_;
	GtkTextBuffer* _tmp6_;
	GtkTextView* _tmp7_;
	GtkTextBuffer* _tmp8_;
	GtkTextBuffer* _tmp9_;
	GtkScrolledWindow* _tmp10_;
	GtkAdjustment* _tmp11_;
	GtkAdjustment* _tmp12_;
	gdouble _tmp13_;
	gdouble _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (message != NULL);
	_tmp0_ = self->details_textview;
	_tmp1_ = gtk_text_view_get_buffer (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_text_buffer_get_end_iter (_tmp2_, &_tmp3_);
	iter = _tmp3_;
	_tmp4_ = self->details_textview;
	_tmp5_ = gtk_text_view_get_buffer (_tmp4_);
	_tmp6_ = _tmp5_;
	gtk_text_buffer_insert (_tmp6_, &iter, message, -1);
	_tmp7_ = self->details_textview;
	_tmp8_ = gtk_text_view_get_buffer (_tmp7_);
	_tmp9_ = _tmp8_;
	gtk_text_buffer_insert (_tmp9_, &iter, "\n", 1);
	_tmp10_ = self->details_window;
	_tmp11_ = gtk_scrolled_window_get_vadjustment (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = gtk_adjustment_get_value (_tmp12_);
	_tmp14_ = _tmp13_;
	if (_tmp14_ >= self->priv->scroll_value) {
		GtkScrolledWindow* _tmp15_;
		GtkAdjustment* _tmp16_;
		GtkAdjustment* _tmp17_;
		gdouble _tmp18_;
		gdouble _tmp19_;
		GtkTextView* _tmp20_;
		GtkTextView* _tmp21_;
		GtkTextBuffer* _tmp22_;
		GtkTextBuffer* _tmp23_;
		GtkTextMark* _tmp24_;
		_tmp15_ = self->details_window;
		_tmp16_ = gtk_scrolled_window_get_vadjustment (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = gtk_adjustment_get_value (_tmp17_);
		_tmp19_ = _tmp18_;
		self->priv->scroll_value = _tmp19_;
		_tmp20_ = self->details_textview;
		_tmp21_ = self->details_textview;
		_tmp22_ = gtk_text_view_get_buffer (_tmp21_);
		_tmp23_ = _tmp22_;
		_tmp24_ = gtk_text_buffer_get_mark (_tmp23_, "scroll");
		gtk_text_view_scroll_mark_onscreen (_tmp20_, _tmp24_);
	}
}

static void
pamac_transaction_gtk_display_action (PamacTransactionGtk* self,
                                      const gchar* action)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	{
		const gchar* _tmp0_;
		_tmp0_ = self->priv->current_action;
		g_rec_mutex_lock (&self->priv->__lock_current_action);
		{
			const gchar* _tmp1_;
			_tmp1_ = self->priv->current_action;
			if (g_strcmp0 (action, _tmp1_) != 0) {
				gchar* _tmp2_;
				PamacProgressBox* _tmp3_;
				GtkLabel* _tmp4_;
				PamacProgressBox* _tmp7_;
				GtkProgressBar* _tmp8_;
				_tmp2_ = g_strdup (action);
				_g_free0 (self->priv->current_action);
				self->priv->current_action = _tmp2_;
				pamac_transaction_gtk_show_details (self, action);
				_tmp3_ = self->progress_box;
				_tmp4_ = _tmp3_->action_label;
				gtk_label_set_label (_tmp4_, action);
				if (self->priv->pulse_timeout_id == ((guint) 0)) {
					PamacProgressBox* _tmp5_;
					GtkProgressBar* _tmp6_;
					_tmp5_ = self->progress_box;
					_tmp6_ = _tmp5_->progressbar;
					gtk_progress_bar_set_fraction (_tmp6_, (gdouble) 0);
				}
				_tmp7_ = self->progress_box;
				_tmp8_ = _tmp7_->progressbar;
				gtk_progress_bar_set_text (_tmp8_, "");
			}
		}
		__finally0:
		{
			const gchar* _tmp9_;
			_tmp9_ = self->priv->current_action;
			g_rec_mutex_unlock (&self->priv->__lock_current_action);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

static void
pamac_transaction_gtk_display_action_progress (PamacTransactionGtk* self,
                                               const gchar* action,
                                               const gchar* status,
                                               gdouble progress)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	g_return_if_fail (status != NULL);
	{
		const gchar* _tmp0_;
		_tmp0_ = self->priv->current_action;
		g_rec_mutex_lock (&self->priv->__lock_current_action);
		{
			const gchar* _tmp1_;
			PamacProgressBox* _tmp5_;
			GtkProgressBar* _tmp6_;
			PamacProgressBox* _tmp7_;
			GtkProgressBar* _tmp8_;
			_tmp1_ = self->priv->current_action;
			if (g_strcmp0 (action, _tmp1_) != 0) {
				gchar* _tmp2_;
				PamacProgressBox* _tmp3_;
				GtkLabel* _tmp4_;
				_tmp2_ = g_strdup (action);
				_g_free0 (self->priv->current_action);
				self->priv->current_action = _tmp2_;
				pamac_transaction_gtk_show_details (self, action);
				_tmp3_ = self->progress_box;
				_tmp4_ = _tmp3_->action_label;
				gtk_label_set_label (_tmp4_, action);
			}
			_tmp5_ = self->progress_box;
			_tmp6_ = _tmp5_->progressbar;
			gtk_progress_bar_set_fraction (_tmp6_, progress);
			_tmp7_ = self->progress_box;
			_tmp8_ = _tmp7_->progressbar;
			gtk_progress_bar_set_text (_tmp8_, status);
		}
		__finally0:
		{
			const gchar* _tmp9_;
			_tmp9_ = self->priv->current_action;
			g_rec_mutex_unlock (&self->priv->__lock_current_action);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

static void
pamac_transaction_gtk_display_hook_progress (PamacTransactionGtk* self,
                                             const gchar* action,
                                             const gchar* details,
                                             const gchar* status,
                                             gdouble progress)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	g_return_if_fail (details != NULL);
	g_return_if_fail (status != NULL);
	{
		const gchar* _tmp0_;
		_tmp0_ = self->priv->current_action;
		g_rec_mutex_lock (&self->priv->__lock_current_action);
		{
			const gchar* _tmp1_;
			PamacProgressBox* _tmp5_;
			GtkProgressBar* _tmp6_;
			PamacProgressBox* _tmp7_;
			GtkProgressBar* _tmp8_;
			_tmp1_ = self->priv->current_action;
			if (g_strcmp0 (action, _tmp1_) != 0) {
				gchar* _tmp2_;
				PamacProgressBox* _tmp3_;
				GtkLabel* _tmp4_;
				_tmp2_ = g_strdup (action);
				_g_free0 (self->priv->current_action);
				self->priv->current_action = _tmp2_;
				pamac_transaction_gtk_show_details (self, action);
				_tmp3_ = self->progress_box;
				_tmp4_ = _tmp3_->action_label;
				gtk_label_set_label (_tmp4_, action);
			}
			pamac_transaction_gtk_show_details (self, details);
			_tmp5_ = self->progress_box;
			_tmp6_ = _tmp5_->progressbar;
			gtk_progress_bar_set_fraction (_tmp6_, progress);
			_tmp7_ = self->progress_box;
			_tmp8_ = _tmp7_->progressbar;
			gtk_progress_bar_set_text (_tmp8_, status);
		}
		__finally0:
		{
			const gchar* _tmp9_;
			_tmp9_ = self->priv->current_action;
			g_rec_mutex_unlock (&self->priv->__lock_current_action);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

void
pamac_transaction_gtk_reset_progress_box (PamacTransactionGtk* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		const gchar* _tmp0_;
		_tmp0_ = self->priv->current_action;
		g_rec_mutex_lock (&self->priv->__lock_current_action);
		{
			gchar* _tmp1_;
			PamacProgressBox* _tmp2_;
			GtkLabel* _tmp3_;
			PamacProgressBox* _tmp4_;
			GtkProgressBar* _tmp5_;
			PamacProgressBox* _tmp6_;
			GtkProgressBar* _tmp7_;
			PamacProgressBox* _tmp8_;
			GtkProgressBar* _tmp9_;
			_tmp1_ = g_strdup ("");
			_g_free0 (self->priv->current_action);
			self->priv->current_action = _tmp1_;
			_tmp2_ = self->progress_box;
			_tmp3_ = _tmp2_->action_label;
			gtk_label_set_label (_tmp3_, "");
			pamac_transaction_gtk_stop_progressbar_pulse (self);
			_tmp4_ = self->progress_box;
			_tmp5_ = _tmp4_->progressbar;
			gtk_progress_bar_set_fraction (_tmp5_, (gdouble) 0);
			_tmp6_ = self->progress_box;
			_tmp7_ = _tmp6_->progressbar;
			gtk_progress_bar_set_text (_tmp7_, "");
			_tmp8_ = self->progress_box;
			_tmp9_ = _tmp8_->progressbar;
			gtk_widget_set_visible ((GtkWidget*) _tmp9_, FALSE);
		}
		__finally0:
		{
			const gchar* _tmp10_;
			_tmp10_ = self->priv->current_action;
			g_rec_mutex_unlock (&self->priv->__lock_current_action);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

static gboolean
__lambda4_ (PamacTransactionGtk* self)
{
	PamacProgressBox* _tmp0_;
	GtkProgressBar* _tmp1_;
	gboolean result;
	_tmp0_ = self->progress_box;
	_tmp1_ = _tmp0_->progressbar;
	gtk_progress_bar_pulse (_tmp1_);
	result = TRUE;
	return result;
}

static gboolean
___lambda4__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda4_ ((PamacTransactionGtk*) self);
	return result;
}

void
pamac_transaction_gtk_start_progressbar_pulse (PamacTransactionGtk* self)
{
	PamacProgressBox* _tmp0_;
	GtkProgressBar* _tmp1_;
	g_return_if_fail (self != NULL);
	pamac_transaction_gtk_stop_progressbar_pulse (self);
	_tmp0_ = self->progress_box;
	_tmp1_ = _tmp0_->progressbar;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, TRUE);
	self->priv->pulse_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 500, ___lambda4__gsource_func, g_object_ref (self), g_object_unref);
}

void
pamac_transaction_gtk_stop_progressbar_pulse (PamacTransactionGtk* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->pulse_timeout_id != ((guint) 0)) {
		PamacProgressBox* _tmp0_;
		GtkProgressBar* _tmp1_;
		g_source_remove (self->priv->pulse_timeout_id);
		self->priv->pulse_timeout_id = (guint) 0;
		_tmp0_ = self->progress_box;
		_tmp1_ = _tmp0_->progressbar;
		gtk_progress_bar_set_fraction (_tmp1_, (gdouble) 0);
	}
}

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

PamacChoosePkgsDialog*
pamac_transaction_gtk_create_choose_pkgs_dialog (PamacTransactionGtk* self)
{
	GtkWindow* application_window = NULL;
	GtkApplication* _tmp0_;
	GtkWindow* _tmp1_;
	GtkWindow* _tmp2_;
	GtkWindow* _tmp3_;
	PamacChoosePkgsDialog* _tmp4_;
	PamacChoosePkgsDialog* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_application;
	_tmp1_ = gtk_application_get_active_window (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	application_window = _tmp3_;
	_tmp4_ = pamac_choose_pkgs_dialog_new (application_window);
	g_object_ref_sink (_tmp4_);
	result = _tmp4_;
	_g_object_unref0 (application_window);
	return result;
}

static void
pamac_transaction_gtk_real_choose_optdeps_data_free (gpointer _data)
{
	PamacTransactionGtkChooseOptdepsData* _data_;
	_data_ = _data;
	_g_free0 (_data_->pkgname);
	_g_ptr_array_unref0 (_data_->optdeps);
	_g_ptr_array_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkChooseOptdepsData, _data_);
}

static gpointer
_g_ptr_array_ref0 (gpointer self)
{
	return self ? g_ptr_array_ref (self) : NULL;
}

static void
pamac_transaction_gtk_real_choose_optdeps (PamacTransaction* base,
                                           const gchar* pkgname,
                                           GPtrArray* optdeps,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	PamacTransactionGtk * self;
	PamacTransactionGtkChooseOptdepsData* _data_;
	PamacTransactionGtk* _tmp0_;
	gchar* _tmp1_;
	GPtrArray* _tmp2_;
	g_return_if_fail (pkgname != NULL);
	g_return_if_fail (optdeps != NULL);
	self = (PamacTransactionGtk*) base;
	_data_ = g_slice_new0 (PamacTransactionGtkChooseOptdepsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_real_choose_optdeps_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (pkgname);
	_g_free0 (_data_->pkgname);
	_data_->pkgname = _tmp1_;
	_tmp2_ = _g_ptr_array_ref0 (optdeps);
	_g_ptr_array_unref0 (_data_->optdeps);
	_data_->optdeps = _tmp2_;
	pamac_transaction_gtk_real_choose_optdeps_co (_data_);
}

static GPtrArray*
pamac_transaction_gtk_choose_optdeps_finish (PamacTransaction* base,
                                             GAsyncResult* _res_)
{
	GPtrArray* result;
	PamacTransactionGtkChooseOptdepsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	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_)) {
		PamacTransactionGtk* self;
		self = _data1_->self;
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

static gboolean
_pamac_transaction_gtk_real_choose_optdeps_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_gtk_real_choose_optdeps_co (self);
	return result;
}

static void
__lambda7_ (Block1Data* _data1_,
            gint res)
{
	PamacTransactionGtk* self;
	self = _data1_->self;
	_data1_->response = res;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _pamac_transaction_gtk_real_choose_optdeps_co_gsource_func, _data1_->_async_data_, NULL);
}

static void
___lambda7__gtk_dialog_response (GtkDialog* _sender,
                                 gint response_id,
                                 gpointer self)
{
	__lambda7_ (self, response_id);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static gboolean
pamac_transaction_gtk_real_choose_optdeps_co (PamacTransactionGtkChooseOptdepsData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data1_ = g_slice_new0 (Block1Data);
	_data_->_data1_->_ref_count_ = 1;
	_data_->_data1_->self = g_object_ref (_data_->self);
	_data_->_data1_->_async_data_ = _data_;
	_data_->_tmp0_ = pamac_transaction_gtk_create_choose_pkgs_dialog (_data_->self);
	_data_->choose_pkgs_dialog = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->choose_pkgs_dialog;
	_data_->_tmp2_ = g_strdup_printf (g_dgettext (NULL, "Choose optional dependencies for %s"), _data_->pkgname);
	_data_->_tmp3_ = _data_->_tmp2_;
	gtk_window_set_title ((GtkWindow*) _data_->_tmp1_, _data_->_tmp3_);
	_g_free0 (_data_->_tmp3_);
	{
		_data_->name_collection = _data_->optdeps;
		for (_data_->name_index = 0; _data_->name_index < _data_->name_collection->len; _data_->name_index = _data_->name_index + 1) {
			_data_->name = (const gchar*) g_ptr_array_index (_data_->name_collection, _data_->name_index);
			{
				_data_->_tmp4_ = _data_->choose_pkgs_dialog;
				_data_->_tmp5_ = _data_->name;
				pamac_choose_pkgs_dialog_add_pkg (_data_->_tmp4_, _data_->_tmp5_);
			}
		}
	}
	_data_->_tmp6_ = _data_->choose_pkgs_dialog;
	_data_->_tmp7_ = _data_->_tmp6_->cancel_button;
	gtk_widget_grab_focus ((GtkWidget*) _data_->_tmp7_);
	_data_->_data1_->response = (gint) GTK_RESPONSE_CANCEL;
	_data_->_tmp8_ = _data_->choose_pkgs_dialog;
	g_signal_connect_data ((GtkDialog*) _data_->_tmp8_, "response", (GCallback) ___lambda7__gtk_dialog_response, block1_data_ref (_data_->_data1_), (GClosureNotify) block1_data_unref, 0);
	_data_->_tmp9_ = _data_->choose_pkgs_dialog;
	gtk_widget_show ((GtkWidget*) _data_->_tmp9_);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	if (_data_->_data1_->response == ((gint) GTK_RESPONSE_OK)) {
		_data_->_tmp10_ = _data_->choose_pkgs_dialog;
		_data_->_tmp11_ = pamac_choose_pkgs_dialog_get_selected_pkgs (_data_->_tmp10_);
		_g_ptr_array_unref0 (_data_->optdeps_to_install);
		_data_->optdeps_to_install = _data_->_tmp11_;
	} else {
		_data_->_tmp12_ = g_ptr_array_new_full ((guint) 0, _g_free0_);
		_g_ptr_array_unref0 (_data_->optdeps_to_install);
		_data_->optdeps_to_install = _data_->_tmp12_;
	}
	_data_->_tmp13_ = _data_->choose_pkgs_dialog;
	gtk_widget_destroy ((GtkWidget*) _data_->_tmp13_);
	_data_->result = _data_->optdeps_to_install;
	_g_object_unref0 (_data_->choose_pkgs_dialog);
	block1_data_unref (_data_->_data1_);
	_data_->_data1_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_gtk_real_choose_provider_data_free (gpointer _data)
{
	PamacTransactionGtkChooseProviderData* _data_;
	_data_ = _data;
	_g_free0 (_data_->depend);
	_g_ptr_array_unref0 (_data_->providers);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkChooseProviderData, _data_);
}

static void
pamac_transaction_gtk_real_choose_provider (PamacTransaction* base,
                                            const gchar* depend,
                                            GPtrArray* providers,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	PamacTransactionGtk * self;
	PamacTransactionGtkChooseProviderData* _data_;
	PamacTransactionGtk* _tmp0_;
	gchar* _tmp1_;
	GPtrArray* _tmp2_;
	g_return_if_fail (depend != NULL);
	g_return_if_fail (providers != NULL);
	self = (PamacTransactionGtk*) base;
	_data_ = g_slice_new0 (PamacTransactionGtkChooseProviderData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_real_choose_provider_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (depend);
	_g_free0 (_data_->depend);
	_data_->depend = _tmp1_;
	_tmp2_ = _g_ptr_array_ref0 (providers);
	_g_ptr_array_unref0 (_data_->providers);
	_data_->providers = _tmp2_;
	pamac_transaction_gtk_real_choose_provider_co (_data_);
}

static gint
pamac_transaction_gtk_choose_provider_finish (PamacTransaction* base,
                                              GAsyncResult* _res_)
{
	gint result;
	PamacTransactionGtkChooseProviderData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	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_)) {
		PamacTransactionGtk* self;
		self = _data2_->self;
		_g_object_unref0 (_data2_->choose_provider_dialog);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static gboolean
_pamac_transaction_gtk_real_choose_provider_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_gtk_real_choose_provider_co (self);
	return result;
}

static void
__lambda8_ (Block2Data* _data2_)
{
	PamacTransactionGtk* self;
	GList* list = NULL;
	GtkBox* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	PamacChooseProviderDialog* _tmp10_;
	self = _data2_->self;
	_tmp0_ = _data2_->box;
	_tmp1_ = gtk_container_get_children ((GtkContainer*) _tmp0_);
	list = _tmp1_;
	_tmp2_ = list;
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp2_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) child_it->data;
			{
				GtkRadioButton* radiobutton = NULL;
				GtkWidget* _tmp3_;
				GtkRadioButton* _tmp4_;
				GtkRadioButton* _tmp5_;
				_tmp3_ = child;
				_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_radio_button_get_type ()) ? ((GtkRadioButton*) _tmp3_) : NULL);
				radiobutton = _tmp4_;
				_tmp5_ = radiobutton;
				if (_tmp5_ != NULL) {
					GtkRadioButton* _tmp6_;
					gboolean _tmp7_;
					gboolean _tmp8_;
					gint _tmp9_;
					_tmp6_ = radiobutton;
					_tmp7_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp6_);
					_tmp8_ = _tmp7_;
					if (_tmp8_) {
						_g_object_unref0 (radiobutton);
						break;
					}
					_tmp9_ = _data2_->index;
					_data2_->index = _tmp9_ + 1;
				}
				_g_object_unref0 (radiobutton);
			}
		}
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _pamac_transaction_gtk_real_choose_provider_co_gsource_func, _data2_->_async_data_, NULL);
	_tmp10_ = _data2_->choose_provider_dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp10_);
	(list == NULL) ? NULL : (list = (g_list_free (list), NULL));
}

static void
___lambda8__gtk_dialog_response (GtkDialog* _sender,
                                 gint response_id,
                                 gpointer self)
{
	__lambda8_ (self);
}

static gboolean
pamac_transaction_gtk_real_choose_provider_co (PamacTransactionGtkChooseProviderData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data2_ = g_slice_new0 (Block2Data);
	_data_->_data2_->_ref_count_ = 1;
	_data_->_data2_->self = g_object_ref (_data_->self);
	_data_->_data2_->_async_data_ = _data_;
	_data_->_tmp0_ = _data_->self->priv->_application;
	_data_->_tmp1_ = gtk_application_get_active_window (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
	_data_->application_window = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->application_window;
	_data_->_tmp5_ = pamac_choose_provider_dialog_new (_data_->_tmp4_);
	g_object_ref_sink (_data_->_tmp5_);
	_data_->_data2_->choose_provider_dialog = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->_data2_->choose_provider_dialog;
	_data_->_tmp7_ = g_strdup_printf (g_dgettext (NULL, "Choose a provider for %s"), _data_->depend);
	_data_->_tmp8_ = _data_->_tmp7_;
	gtk_window_set_title ((GtkWindow*) _data_->_tmp6_, _data_->_tmp8_);
	_g_free0 (_data_->_tmp8_);
	_data_->_tmp9_ = _data_->_data2_->choose_provider_dialog;
	_data_->_tmp10_ = _data_->_tmp9_->box;
	_data_->_data2_->box = _data_->_tmp10_;
	_data_->_tmp11_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_data_->pkgs = _data_->_tmp11_;
	{
		_data_->provider_collection = _data_->providers;
		for (_data_->provider_index = 0; _data_->provider_index < _data_->provider_collection->len; _data_->provider_index = _data_->provider_index + 1) {
			_data_->provider = (const gchar*) g_ptr_array_index (_data_->provider_collection, _data_->provider_index);
			{
				_data_->_tmp12_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
				_data_->_tmp13_ = _data_->_tmp12_;
				_data_->_tmp14_ = _data_->provider;
				_data_->_tmp15_ = pamac_database_get_sync_pkg (_data_->_tmp13_, _data_->_tmp14_);
				_data_->_tmp16_ = _g_object_ref0 (_data_->_tmp15_);
				_data_->pkg = _data_->_tmp16_;
				_data_->_tmp17_ = _data_->pkg;
				if (_data_->_tmp17_ == NULL) {
					_data_->_tmp18_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
					_data_->_tmp19_ = _data_->_tmp18_;
					_data_->_tmp20_ = _data_->provider;
					_data_->_tmp21_ = pamac_database_get_aur_pkg (_data_->_tmp19_, _data_->_tmp20_);
					_data_->_tmp22_ = _g_object_ref0 ((PamacAlpmPackage*) _data_->_tmp21_);
					_g_object_unref0 (_data_->pkg);
					_data_->pkg = _data_->_tmp22_;
				}
				_data_->_tmp23_ = _data_->pkg;
				if (_data_->_tmp23_ != NULL) {
					_data_->_tmp24_ = _data_->pkgs;
					_data_->_tmp25_ = _data_->pkg;
					_data_->_tmp26_ = _g_object_ref0 ((PamacPackage*) _data_->_tmp25_);
					g_ptr_array_add (_data_->_tmp24_, _data_->_tmp26_);
				}
				_g_object_unref0 (_data_->pkg);
			}
		}
	}
	_data_->last_radiobutton = NULL;
	_data_->_tmp27_ = _data_->pkgs;
	{
		_data_->pkg_collection = _data_->_tmp27_;
		for (_data_->pkg_index = 0; _data_->pkg_index < _data_->pkg_collection->len; _data_->pkg_index = _data_->pkg_index + 1) {
			_data_->_vala1_pkg = (PamacPackage*) g_ptr_array_index (_data_->pkg_collection, _data_->pkg_index);
			{
				_data_->_tmp28_ = _data_->_vala1_pkg;
				_data_->_tmp29_ = pamac_package_get_name (_data_->_tmp28_);
				_data_->_tmp30_ = _data_->_tmp29_;
				_data_->_tmp31_ = _data_->_vala1_pkg;
				_data_->_tmp32_ = pamac_package_get_version (_data_->_tmp31_);
				_data_->_tmp33_ = _data_->_tmp32_;
				_data_->_tmp34_ = _data_->_vala1_pkg;
				_data_->_tmp35_ = pamac_package_get_repo (_data_->_tmp34_);
				_data_->_tmp36_ = _data_->_tmp35_;
				_data_->_tmp37_ = g_strdup_printf ("%s  %s  %s", _data_->_tmp30_, _data_->_tmp33_, _data_->_tmp36_);
				_data_->_vala1_provider = _data_->_tmp37_;
				_data_->_tmp38_ = _data_->_vala1_provider;
				_data_->_tmp39_ = (GtkRadioButton*) gtk_radio_button_new_with_label (NULL, _data_->_tmp38_);
				g_object_ref_sink (_data_->_tmp39_);
				_data_->radiobutton = _data_->_tmp39_;
				_data_->_tmp40_ = _data_->radiobutton;
				gtk_widget_set_visible ((GtkWidget*) _data_->_tmp40_, TRUE);
				_data_->_tmp41_ = _data_->last_radiobutton;
				if (_data_->_tmp41_ == NULL) {
					_data_->_tmp42_ = _data_->radiobutton;
					gtk_toggle_button_set_active ((GtkToggleButton*) _data_->_tmp42_, TRUE);
				} else {
					_data_->_tmp43_ = _data_->radiobutton;
					_data_->_tmp44_ = _data_->last_radiobutton;
					_data_->_tmp45_ = gtk_radio_button_get_group (_data_->_tmp44_);
					gtk_radio_button_set_group (_data_->_tmp43_, _data_->_tmp45_);
				}
				_data_->_tmp46_ = _data_->radiobutton;
				_data_->last_radiobutton = _data_->_tmp46_;
				_data_->_tmp47_ = _data_->_data2_->box;
				_data_->_tmp48_ = _data_->radiobutton;
				gtk_container_add ((GtkContainer*) _data_->_tmp47_, (GtkWidget*) _data_->_tmp48_);
				_g_object_unref0 (_data_->radiobutton);
				_g_free0 (_data_->_vala1_provider);
			}
		}
	}
	_data_->_tmp49_ = _data_->_data2_->choose_provider_dialog;
	_data_->_tmp50_ = _data_->_tmp49_->valid_button;
	gtk_widget_grab_focus ((GtkWidget*) _data_->_tmp50_);
	_data_->_data2_->index = 0;
	_data_->_tmp51_ = _data_->_data2_->choose_provider_dialog;
	g_signal_connect_data ((GtkDialog*) _data_->_tmp51_, "response", (GCallback) ___lambda8__gtk_dialog_response, block2_data_ref (_data_->_data2_), (GClosureNotify) block2_data_unref, 0);
	_data_->_tmp52_ = _data_->_data2_->choose_provider_dialog;
	gtk_widget_show ((GtkWidget*) _data_->_tmp52_);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->result = _data_->_data2_->index;
	_g_ptr_array_unref0 (_data_->pkgs);
	_g_object_unref0 (_data_->application_window);
	block2_data_unref (_data_->_data2_);
	_data_->_data2_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_gtk_real_ask_import_key_data_free (gpointer _data)
{
	PamacTransactionGtkAskImportKeyData* _data_;
	_data_ = _data;
	_g_free0 (_data_->pkgname);
	_g_free0 (_data_->key);
	_g_free0 (_data_->owner);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkAskImportKeyData, _data_);
}

static void
pamac_transaction_gtk_real_ask_import_key (PamacTransaction* base,
                                           const gchar* pkgname,
                                           const gchar* key,
                                           const gchar* owner,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	PamacTransactionGtk * self;
	PamacTransactionGtkAskImportKeyData* _data_;
	PamacTransactionGtk* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (pkgname != NULL);
	g_return_if_fail (key != NULL);
	self = (PamacTransactionGtk*) base;
	_data_ = g_slice_new0 (PamacTransactionGtkAskImportKeyData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_real_ask_import_key_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (pkgname);
	_g_free0 (_data_->pkgname);
	_data_->pkgname = _tmp1_;
	_tmp2_ = g_strdup (key);
	_g_free0 (_data_->key);
	_data_->key = _tmp2_;
	_tmp3_ = g_strdup (owner);
	_g_free0 (_data_->owner);
	_data_->owner = _tmp3_;
	pamac_transaction_gtk_real_ask_import_key_co (_data_);
}

static gboolean
pamac_transaction_gtk_ask_import_key_finish (PamacTransaction* base,
                                             GAsyncResult* _res_)
{
	gboolean result;
	PamacTransactionGtkAskImportKeyData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	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_)) {
		PamacTransactionGtk* self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}

static gboolean
_pamac_transaction_gtk_real_ask_import_key_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_gtk_real_ask_import_key_co (self);
	return result;
}

static void
__lambda9_ (Block3Data* _data3_,
            gint res)
{
	PamacTransactionGtk* self;
	GtkDialog* _tmp0_;
	self = _data3_->self;
	_data3_->response = res;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _pamac_transaction_gtk_real_ask_import_key_co_gsource_func, _data3_->_async_data_, NULL);
	_tmp0_ = _data3_->dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}

static void
___lambda9__gtk_dialog_response (GtkDialog* _sender,
                                 gint response_id,
                                 gpointer self)
{
	__lambda9_ (self, response_id);
}

static gboolean
pamac_transaction_gtk_real_ask_import_key_co (PamacTransactionGtkAskImportKeyData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data3_ = g_slice_new0 (Block3Data);
	_data_->_data3_->_ref_count_ = 1;
	_data_->_data3_->self = g_object_ref (_data_->self);
	_data_->_data3_->_async_data_ = _data_;
	_data_->flags = GTK_DIALOG_MODAL;
	_data_->_tmp0_ = gtk_settings_get_default ();
	_data_->_tmp1_ = 0;
	g_object_get ((GObject*) _data_->_tmp0_, "gtk-dialogs-use-header", &_data_->_tmp1_, NULL);
	_data_->use_header_bar = _data_->_tmp1_;
	if (_data_->use_header_bar == 1) {
		_data_->flags |= GTK_DIALOG_USE_HEADER_BAR;
	}
	_data_->_tmp2_ = _data_->self->priv->_application;
	_data_->_tmp3_ = gtk_application_get_active_window (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = _g_object_ref0 (_data_->_tmp4_);
	_data_->application_window = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->application_window;
	_data_->_tmp7_ = (GtkDialog*) gtk_dialog_new_with_buttons (g_dgettext (NULL, "Import PGP key"), _data_->_tmp6_, _data_->flags, NULL);
	g_object_ref_sink (_data_->_tmp7_);
	_data_->_data3_->dialog = _data_->_tmp7_;
	_data_->_tmp8_ = _data_->_data3_->dialog;
	gtk_widget_set_margin_top ((GtkWidget*) _data_->_tmp8_, 3);
	_data_->_tmp9_ = _data_->_data3_->dialog;
	gtk_widget_set_margin_bottom ((GtkWidget*) _data_->_tmp9_, 3);
	_data_->_tmp10_ = _data_->_data3_->dialog;
	gtk_widget_set_margin_start ((GtkWidget*) _data_->_tmp10_, 3);
	_data_->_tmp11_ = _data_->_data3_->dialog;
	gtk_widget_set_margin_end ((GtkWidget*) _data_->_tmp11_, 3);
	_data_->_tmp12_ = _data_->_data3_->dialog;
	gtk_window_set_icon_name ((GtkWindow*) _data_->_tmp12_, "system-software-install");
	_data_->_tmp13_ = _data_->_data3_->dialog;
	gtk_window_set_deletable ((GtkWindow*) _data_->_tmp13_, FALSE);
	_data_->_tmp14_ = _data_->_data3_->dialog;
	gtk_dialog_add_button (_data_->_tmp14_, g_dgettext (NULL, "Trust and Import"), (gint) GTK_RESPONSE_OK);
	_data_->_tmp15_ = _data_->_data3_->dialog;
	_data_->_tmp16_ = gtk_dialog_add_button (_data_->_tmp15_, g_dgettext (NULL, "_Cancel"), (gint) GTK_RESPONSE_CANCEL);
	_data_->widget = _data_->_tmp16_;
	_data_->_tmp17_ = _data_->widget;
	gtk_widget_grab_default (_data_->_tmp17_);
	_data_->_tmp18_ = g_string_new ("");
	_data_->textbuffer = _data_->_tmp18_;
	_data_->_tmp19_ = _data_->textbuffer;
	_data_->_tmp20_ = g_strdup_printf (g_dgettext (NULL, "The PGP key %1$s is needed to verify %2$s source files"), _data_->key, _data_->pkgname);
	_data_->_tmp21_ = _data_->_tmp20_;
	g_string_append (_data_->_tmp19_, _data_->_tmp21_);
	_g_free0 (_data_->_tmp21_);
	_data_->_tmp22_ = _data_->textbuffer;
	g_string_append (_data_->_tmp22_, ".\n");
	_data_->_tmp23_ = _data_->textbuffer;
	_data_->_tmp24_ = g_strdup_printf (g_dgettext (NULL, "Trust %s and import the PGP key"), _data_->owner);
	_data_->_tmp25_ = _data_->_tmp24_;
	g_string_append (_data_->_tmp23_, _data_->_tmp25_);
	_g_free0 (_data_->_tmp25_);
	_data_->_tmp26_ = _data_->textbuffer;
	g_string_append (_data_->_tmp26_, " ?");
	_data_->_tmp27_ = _data_->textbuffer;
	_data_->_tmp28_ = _data_->_tmp27_->str;
	_data_->_tmp29_ = (GtkLabel*) gtk_label_new (_data_->_tmp28_);
	g_object_ref_sink (_data_->_tmp29_);
	_data_->label = _data_->_tmp29_;
	_data_->_tmp30_ = _data_->label;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp30_, TRUE);
	_data_->_tmp31_ = _data_->label;
	gtk_label_set_selectable (_data_->_tmp31_, TRUE);
	_data_->_tmp32_ = _data_->label;
	gtk_widget_set_margin_top ((GtkWidget*) _data_->_tmp32_, 12);
	_data_->_tmp33_ = _data_->label;
	gtk_widget_set_margin_bottom ((GtkWidget*) _data_->_tmp33_, 12);
	_data_->_tmp34_ = _data_->label;
	gtk_widget_set_margin_start ((GtkWidget*) _data_->_tmp34_, 12);
	_data_->_tmp35_ = _data_->label;
	gtk_widget_set_margin_end ((GtkWidget*) _data_->_tmp35_, 12);
	_data_->_tmp36_ = _data_->_data3_->dialog;
	_data_->_tmp37_ = gtk_dialog_get_content_area (_data_->_tmp36_);
	_data_->box = _data_->_tmp37_;
	_data_->_tmp38_ = _data_->box;
	_data_->_tmp39_ = _data_->label;
	gtk_container_add ((GtkContainer*) _data_->_tmp38_, (GtkWidget*) _data_->_tmp39_);
	_data_->_tmp40_ = _data_->box;
	gtk_widget_set_valign ((GtkWidget*) _data_->_tmp40_, GTK_ALIGN_CENTER);
	_data_->_tmp41_ = _data_->box;
	gtk_box_set_spacing (_data_->_tmp41_, 6);
	_data_->_tmp42_ = _data_->_data3_->dialog;
	g_object_set ((GtkWindow*) _data_->_tmp42_, "default-width", 800, NULL);
	_data_->_tmp43_ = _data_->_data3_->dialog;
	g_object_set ((GtkWindow*) _data_->_tmp43_, "default-height", 150, NULL);
	_data_->_data3_->response = (gint) GTK_RESPONSE_CANCEL;
	_data_->_tmp44_ = _data_->_data3_->dialog;
	g_signal_connect_data (_data_->_tmp44_, "response", (GCallback) ___lambda9__gtk_dialog_response, block3_data_ref (_data_->_data3_), (GClosureNotify) block3_data_unref, 0);
	_data_->_tmp45_ = _data_->_data3_->dialog;
	gtk_widget_show ((GtkWidget*) _data_->_tmp45_);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	if (_data_->_data3_->response == ((gint) GTK_RESPONSE_OK)) {
		_data_->result = TRUE;
		_g_object_unref0 (_data_->label);
		_g_string_free0 (_data_->textbuffer);
		_g_object_unref0 (_data_->application_window);
		block3_data_unref (_data_->_data3_);
		_data_->_data3_ = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = FALSE;
	_g_object_unref0 (_data_->label);
	_g_string_free0 (_data_->textbuffer);
	_g_object_unref0 (_data_->application_window);
	block3_data_unref (_data_->_data3_);
	_data_->_data3_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_gtk_real_ask_edit_build_files_data_free (gpointer _data)
{
	PamacTransactionGtkAskEditBuildFilesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->summary);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkAskEditBuildFilesData, _data_);
}

static void
pamac_transaction_gtk_real_ask_edit_build_files (PamacTransaction* base,
                                                 PamacTransactionSummary* summary,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	PamacTransactionGtk * self;
	PamacTransactionGtkAskEditBuildFilesData* _data_;
	PamacTransactionGtk* _tmp0_;
	PamacTransactionSummary* _tmp1_;
	g_return_if_fail (summary != NULL);
	self = (PamacTransactionGtk*) base;
	_data_ = g_slice_new0 (PamacTransactionGtkAskEditBuildFilesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_real_ask_edit_build_files_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (summary);
	_g_object_unref0 (_data_->summary);
	_data_->summary = _tmp1_;
	pamac_transaction_gtk_real_ask_edit_build_files_co (_data_);
}

static gboolean
pamac_transaction_gtk_ask_edit_build_files_finish (PamacTransaction* base,
                                                   GAsyncResult* _res_)
{
	gboolean result;
	PamacTransactionGtkAskEditBuildFilesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
pamac_transaction_gtk_ask_edit_build_files_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_)
{
	PamacTransactionGtkAskEditBuildFilesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_gtk_real_ask_edit_build_files_co (_data_);
}

static gboolean
pamac_transaction_gtk_real_ask_edit_build_files_co (PamacTransactionGtkAskEditBuildFilesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->answer = FALSE;
	_data_->self->priv->summary_shown = TRUE;
	_data_->_state_ = 1;
	pamac_transaction_gtk_show_summary (_data_->self, _data_->summary, pamac_transaction_gtk_ask_edit_build_files_ready, _data_);
	return FALSE;
	_state_1:
	_data_->response = pamac_transaction_gtk_show_summary_finish (_data_->self, _data_->_res_);
	if (_data_->response == ((gint) GTK_RESPONSE_OK)) {
		_data_->self->commit_transaction_answer = TRUE;
	} else {
		if (_data_->response == ((gint) GTK_RESPONSE_CANCEL)) {
			_data_->self->commit_transaction_answer = FALSE;
		} else {
			if (_data_->response == ((gint) GTK_RESPONSE_REJECT)) {
				_data_->answer = TRUE;
			}
		}
	}
	_data_->result = _data_->answer;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_gtk_real_ask_commit_data_free (gpointer _data)
{
	PamacTransactionGtkAskCommitData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->summary);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkAskCommitData, _data_);
}

static void
pamac_transaction_gtk_real_ask_commit (PamacTransaction* base,
                                       PamacTransactionSummary* summary,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	PamacTransactionGtk * self;
	PamacTransactionGtkAskCommitData* _data_;
	PamacTransactionGtk* _tmp0_;
	PamacTransactionSummary* _tmp1_;
	g_return_if_fail (summary != NULL);
	self = (PamacTransactionGtk*) base;
	_data_ = g_slice_new0 (PamacTransactionGtkAskCommitData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_real_ask_commit_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (summary);
	_g_object_unref0 (_data_->summary);
	_data_->summary = _tmp1_;
	pamac_transaction_gtk_real_ask_commit_co (_data_);
}

static gboolean
pamac_transaction_gtk_ask_commit_finish (PamacTransaction* base,
                                         GAsyncResult* _res_)
{
	gboolean result;
	PamacTransactionGtkAskCommitData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gint
vala_g_ptr_array_get_length (GPtrArray* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = (gint) self->len;
	return result;
}

static void
pamac_transaction_gtk_ask_commit_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	PamacTransactionGtkAskCommitData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_gtk_real_ask_commit_co (_data_);
}

static gboolean
pamac_transaction_gtk_real_ask_commit_co (PamacTransactionGtkAskCommitData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->self->priv->summary_shown) {
		_data_->self->priv->summary_shown = FALSE;
		_data_->result = _data_->self->commit_transaction_answer;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		_data_->_tmp4_ = pamac_transaction_summary_get_to_downgrade (_data_->summary);
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_tmp6_ = vala_g_ptr_array_get_length (_data_->_tmp5_);
		_data_->_tmp7_ = _data_->_tmp6_;
		if (_data_->_tmp7_ != 0) {
			_data_->_tmp3_ = TRUE;
		} else {
			_data_->_tmp8_ = pamac_transaction_summary_get_to_install (_data_->summary);
			_data_->_tmp9_ = _data_->_tmp8_;
			_data_->_tmp10_ = vala_g_ptr_array_get_length (_data_->_tmp9_);
			_data_->_tmp11_ = _data_->_tmp10_;
			_data_->_tmp3_ = _data_->_tmp11_ != 0;
		}
		if (_data_->_tmp3_) {
			_data_->_tmp2_ = TRUE;
		} else {
			_data_->_tmp12_ = pamac_transaction_summary_get_to_remove (_data_->summary);
			_data_->_tmp13_ = _data_->_tmp12_;
			_data_->_tmp14_ = vala_g_ptr_array_get_length (_data_->_tmp13_);
			_data_->_tmp15_ = _data_->_tmp14_;
			_data_->_tmp2_ = _data_->_tmp15_ != 0;
		}
		if (_data_->_tmp2_) {
			_data_->_tmp1_ = TRUE;
		} else {
			_data_->_tmp16_ = pamac_transaction_summary_get_conflicts_to_remove (_data_->summary);
			_data_->_tmp17_ = _data_->_tmp16_;
			_data_->_tmp18_ = vala_g_ptr_array_get_length (_data_->_tmp17_);
			_data_->_tmp19_ = _data_->_tmp18_;
			_data_->_tmp1_ = _data_->_tmp19_ != 0;
		}
		if (_data_->_tmp1_) {
			_data_->_tmp0_ = TRUE;
		} else {
			_data_->_tmp20_ = pamac_transaction_summary_get_to_build (_data_->summary);
			_data_->_tmp21_ = _data_->_tmp20_;
			_data_->_tmp22_ = vala_g_ptr_array_get_length (_data_->_tmp21_);
			_data_->_tmp23_ = _data_->_tmp22_;
			_data_->_tmp0_ = _data_->_tmp23_ != 0;
		}
		_data_->must_confirm = _data_->_tmp0_;
		_data_->_tmp26_ = _data_->self->priv->_no_confirm_upgrade;
		if (_data_->_tmp26_) {
			_data_->_tmp25_ = !_data_->must_confirm;
		} else {
			_data_->_tmp25_ = FALSE;
		}
		if (_data_->_tmp25_) {
			_data_->_tmp27_ = pamac_transaction_summary_get_to_upgrade (_data_->summary);
			_data_->_tmp28_ = _data_->_tmp27_;
			_data_->_tmp29_ = vala_g_ptr_array_get_length (_data_->_tmp28_);
			_data_->_tmp30_ = _data_->_tmp29_;
			_data_->_tmp24_ = _data_->_tmp30_ != 0;
		} else {
			_data_->_tmp24_ = FALSE;
		}
		if (_data_->_tmp24_) {
			pamac_transaction_gtk_show_warnings (_data_->self, TRUE);
			_data_->self->commit_transaction_answer = TRUE;
			_data_->result = TRUE;
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_state_ = 1;
		pamac_transaction_gtk_show_summary (_data_->self, _data_->summary, pamac_transaction_gtk_ask_commit_ready, _data_);
		return FALSE;
		_state_1:
		_data_->response = pamac_transaction_gtk_show_summary_finish (_data_->self, _data_->_res_);
		if (_data_->response == ((gint) GTK_RESPONSE_OK)) {
			_data_->self->commit_transaction_answer = TRUE;
			_data_->result = TRUE;
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_data_->self->commit_transaction_answer = FALSE;
	_data_->result = FALSE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
pamac_transaction_gtk_transaction_summary_remove_all (PamacTransactionGtk* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		GHashTable* _tmp0_;
		_tmp0_ = self->priv->transaction_summary;
		g_rec_mutex_lock (&self->priv->__lock_transaction_summary);
		{
			GHashTable* _tmp1_;
			_tmp1_ = self->priv->transaction_summary;
			g_hash_table_remove_all (_tmp1_);
		}
		__finally0:
		{
			GHashTable* _tmp2_;
			_tmp2_ = self->priv->transaction_summary;
			g_rec_mutex_unlock (&self->priv->__lock_transaction_summary);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

static void
pamac_transaction_gtk_transaction_summary_add (PamacTransactionGtk* self,
                                               const gchar* id)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (id != NULL);
	{
		GHashTable* _tmp0_;
		_tmp0_ = self->priv->transaction_summary;
		g_rec_mutex_lock (&self->priv->__lock_transaction_summary);
		{
			GHashTable* _tmp1_;
			gchar* _tmp2_;
			_tmp1_ = self->priv->transaction_summary;
			_tmp2_ = g_strdup (id);
			g_hash_table_add (_tmp1_, _tmp2_);
		}
		__finally0:
		{
			GHashTable* _tmp3_;
			_tmp3_ = self->priv->transaction_summary;
			g_rec_mutex_unlock (&self->priv->__lock_transaction_summary);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

gboolean
pamac_transaction_gtk_transaction_summary_contains (PamacTransactionGtk* self,
                                                    const gchar* id)
{
	gboolean contains = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (id != NULL, FALSE);
	contains = FALSE;
	{
		GHashTable* _tmp0_;
		_tmp0_ = self->priv->transaction_summary;
		g_rec_mutex_lock (&self->priv->__lock_transaction_summary);
		{
			GHashTable* _tmp1_;
			_tmp1_ = self->priv->transaction_summary;
			contains = g_hash_table_contains (_tmp1_, id);
		}
		__finally0:
		{
			GHashTable* _tmp2_;
			_tmp2_ = self->priv->transaction_summary;
			g_rec_mutex_unlock (&self->priv->__lock_transaction_summary);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp3_ = FALSE;
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp3_;
		}
	}
	result = contains;
	return result;
}

guint
pamac_transaction_gtk_transaction_summary_length (PamacTransactionGtk* self)
{
	guint length = 0U;
	GError* _inner_error0_ = NULL;
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	length = (guint) 0;
	{
		GHashTable* _tmp0_;
		_tmp0_ = self->priv->transaction_summary;
		g_rec_mutex_lock (&self->priv->__lock_transaction_summary);
		{
			GHashTable* _tmp1_;
			guint _tmp2_;
			guint _tmp3_;
			_tmp1_ = self->priv->transaction_summary;
			_tmp2_ = g_hash_table_size (_tmp1_);
			_tmp3_ = _tmp2_;
			length = _tmp3_;
		}
		__finally0:
		{
			GHashTable* _tmp4_;
			_tmp4_ = self->priv->transaction_summary;
			g_rec_mutex_unlock (&self->priv->__lock_transaction_summary);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			guint _tmp5_ = 0U;
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp5_;
		}
	}
	result = length;
	return result;
}

static PamacAlpmPackage*
pamac_transaction_gtk_get_full_alpm_pkg (PamacTransactionGtk* self,
                                         PamacPackage* pkg)
{
	PamacAlpmPackage* full_pkg = NULL;
	PamacAlpmPackage* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (pkg != NULL, NULL);
	full_pkg = NULL;
	if (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_ALPM_PACKAGE)) {
		PamacDatabase* _tmp0_;
		PamacDatabase* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		PamacAlpmPackage* _tmp4_;
		PamacAlpmPackage* _tmp5_;
		_tmp0_ = pamac_transaction_get_database ((PamacTransaction*) self);
		_tmp1_ = _tmp0_;
		_tmp2_ = pamac_package_get_name (pkg);
		_tmp3_ = _tmp2_;
		_tmp4_ = pamac_database_get_pkg (_tmp1_, _tmp3_);
		_tmp5_ = _g_object_ref0 (_tmp4_);
		_g_object_unref0 (full_pkg);
		full_pkg = _tmp5_;
	}
	result = full_pkg;
	return result;
}

static void
pamac_transaction_gtk_get_icon_pixbuf_data_free (gpointer _data)
{
	PamacTransactionGtkGetIconPixbufData* _data_;
	_data_ = _data;
	_g_free0 (_data_->url);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkGetIconPixbufData, _data_);
}

void
pamac_transaction_gtk_get_icon_pixbuf (PamacTransactionGtk* self,
                                       const gchar* url,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	PamacTransactionGtkGetIconPixbufData* _data_;
	PamacTransactionGtk* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (url != NULL);
	_data_ = g_slice_new0 (PamacTransactionGtkGetIconPixbufData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_get_icon_pixbuf_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (url);
	_g_free0 (_data_->url);
	_data_->url = _tmp1_;
	pamac_transaction_gtk_get_icon_pixbuf_co (_data_);
}

GdkPixbuf*
pamac_transaction_gtk_get_icon_pixbuf_finish (PamacTransactionGtk* self,
                                              GAsyncResult* _res_)
{
	GdkPixbuf* result;
	PamacTransactionGtkGetIconPixbufData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
pamac_transaction_gtk_get_icon_pixbuf_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	PamacTransactionGtkGetIconPixbufData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_gtk_get_icon_pixbuf_co (_data_);
}

static gboolean
pamac_transaction_gtk_get_icon_pixbuf_co (PamacTransactionGtkGetIconPixbufData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_file_new_for_uri (_data_->url);
	_data_->uri = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->uri;
	_data_->_tmp2_ = g_file_get_basename (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = g_strdup_printf ("/tmp/pamac-app-icons/%s", _data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = g_file_new_for_path (_data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	_g_free0 (_data_->_tmp5_);
	_g_free0 (_data_->_tmp3_);
	_data_->cached_icon = _data_->_tmp7_;
	_data_->pixbuf = NULL;
	_data_->_tmp8_ = _data_->cached_icon;
	if (g_file_query_exists (_data_->_tmp8_, NULL)) {
		{
			_data_->_tmp10_ = _data_->cached_icon;
			_data_->_tmp11_ = g_file_get_path (_data_->_tmp10_);
			_data_->_tmp12_ = _data_->_tmp11_;
			_data_->_tmp13_ = gdk_pixbuf_new_from_file (_data_->_tmp12_, &_data_->_inner_error0_);
			_data_->_tmp14_ = _data_->_tmp13_;
			_g_free0 (_data_->_tmp12_);
			_data_->_tmp9_ = _data_->_tmp14_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_data_->_tmp15_ = _data_->_tmp9_;
			_data_->_tmp9_ = NULL;
			_g_object_unref0 (_data_->pixbuf);
			_data_->pixbuf = _data_->_tmp15_;
			_g_object_unref0 (_data_->_tmp9_);
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp16_ = _data_->e;
			_data_->_tmp17_ = _data_->_tmp16_->message;
			g_warning ("transaction-gtk.vala:416: %s: %s", _data_->url, _data_->_tmp17_);
			_g_error_free0 (_data_->e);
		}
		__finally0:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->pixbuf);
			_g_object_unref0 (_data_->cached_icon);
			_g_object_unref0 (_data_->uri);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	} else {
		{
			_data_->_tmp18_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
			_data_->_tmp19_ = _data_->_tmp18_;
			_data_->_state_ = 1;
			pamac_database_get_url_stream (_data_->_tmp19_, _data_->url, pamac_transaction_gtk_get_icon_pixbuf_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp20_ = pamac_database_get_url_stream_finish (_data_->_tmp19_, _data_->_res_, &_data_->_inner_error0_);
			_data_->inputstream = _data_->_tmp20_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
			_data_->_tmp22_ = _data_->inputstream;
			_data_->_tmp23_ = gdk_pixbuf_new_from_stream (_data_->_tmp22_, NULL, &_data_->_inner_error0_);
			_data_->_tmp21_ = _data_->_tmp23_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->inputstream);
				goto __catch1_g_error;
			}
			_data_->_tmp24_ = _data_->_tmp21_;
			_data_->_tmp21_ = NULL;
			_g_object_unref0 (_data_->pixbuf);
			_data_->pixbuf = _data_->_tmp24_;
			_data_->_tmp25_ = _data_->pixbuf;
			_data_->width = gdk_pixbuf_get_width (_data_->_tmp25_);
			if (_data_->width > 64) {
				_data_->_tmp26_ = _data_->pixbuf;
				_data_->_tmp27_ = gdk_pixbuf_scale_simple (_data_->_tmp26_, 64, 64, GDK_INTERP_BILINEAR);
				_g_object_unref0 (_data_->pixbuf);
				_data_->pixbuf = _data_->_tmp27_;
			}
			_data_->_tmp28_ = _data_->cached_icon;
			_data_->_tmp29_ = g_file_append_to (_data_->_tmp28_, G_FILE_CREATE_NONE, NULL, &_data_->_inner_error0_);
			_data_->os = _data_->_tmp29_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->_tmp21_);
				_g_object_unref0 (_data_->inputstream);
				goto __catch1_g_error;
			}
			_data_->_tmp30_ = _data_->pixbuf;
			_data_->_tmp31_ = _data_->os;
			gdk_pixbuf_save_to_stream (_data_->_tmp30_, (GOutputStream*) _data_->_tmp31_, "png", NULL, &_data_->_inner_error0_, NULL);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->os);
				_g_object_unref0 (_data_->_tmp21_);
				_g_object_unref0 (_data_->inputstream);
				goto __catch1_g_error;
			}
			_g_object_unref0 (_data_->os);
			_g_object_unref0 (_data_->_tmp21_);
			_g_object_unref0 (_data_->inputstream);
		}
		goto __finally1;
		__catch1_g_error:
		{
			_data_->_vala1_e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp32_ = _data_->_vala1_e;
			_data_->_tmp33_ = _data_->_tmp32_->message;
			g_warning ("transaction-gtk.vala:432: %s: %s", _data_->url, _data_->_tmp33_);
			_g_error_free0 (_data_->_vala1_e);
		}
		__finally1:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->pixbuf);
			_g_object_unref0 (_data_->cached_icon);
			_g_object_unref0 (_data_->uri);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_data_->result = _data_->pixbuf;
	_g_object_unref0 (_data_->cached_icon);
	_g_object_unref0 (_data_->uri);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static Block4Data*
block4_data_ref (Block4Data* _data4_)
{
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}

static void
block4_data_unref (void * _userdata_)
{
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		PamacTransactionGtk* self;
		self = _data4_->self;
		_g_object_unref0 (_data4_->pixbuf);
		_g_object_unref0 (_data4_->row);
		_g_object_unref0 (_data4_->pkg);
		_g_object_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}

static void
____lambda10_ (Block4Data* _data4_,
               GObject* obj,
               GAsyncResult* res)
{
	PamacTransactionGtk* self;
	GdkPixbuf* downloaded_pixbuf = NULL;
	GdkPixbuf* _tmp0_;
	GdkPixbuf* _tmp1_;
	self = _data4_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = pamac_transaction_gtk_get_icon_pixbuf_finish (self, res);
	downloaded_pixbuf = _tmp0_;
	_tmp1_ = downloaded_pixbuf;
	if (_tmp1_ != NULL) {
		GtkImage* _tmp2_;
		GdkPixbuf* _tmp3_;
		GdkPixbuf* _tmp4_;
		GdkPixbuf* _tmp5_;
		_tmp2_ = _data4_->row->app_icon;
		_tmp3_ = downloaded_pixbuf;
		_tmp4_ = gdk_pixbuf_scale_simple (_tmp3_, 64, 64, GDK_INTERP_BILINEAR);
		_tmp5_ = _tmp4_;
		g_object_set (_tmp2_, "pixbuf", _tmp5_, NULL);
		_g_object_unref0 (_tmp5_);
	}
	_g_object_unref0 (downloaded_pixbuf);
}

static void
_____lambda10__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda10_ (self, source_object, res);
	block4_data_unref (self);
}

static void
______lambda11_ (Block4Data* _data4_,
                 GObject* obj,
                 GAsyncResult* res)
{
	PamacTransactionGtk* self;
	gchar* downloaded_pixbuf_path = NULL;
	PamacDatabase* _tmp0_;
	PamacDatabase* _tmp1_;
	gchar* _tmp2_;
	GError* _inner_error0_ = NULL;
	self = _data4_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = pamac_transaction_get_database ((PamacTransaction*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pamac_database_get_installed_snap_icon_finish (_tmp1_, res);
	downloaded_pixbuf_path = _tmp2_;
	{
		GdkPixbuf* _tmp3_ = NULL;
		GdkPixbuf* _tmp4_;
		GdkPixbuf* _tmp5_;
		_tmp4_ = gdk_pixbuf_new_from_file_at_scale (downloaded_pixbuf_path, 64, 64, TRUE, &_inner_error0_);
		_tmp3_ = _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp5_ = _tmp3_;
		_tmp3_ = NULL;
		_g_object_unref0 (_data4_->pixbuf);
		_data4_->pixbuf = _tmp5_;
		_g_object_unref0 (_tmp3_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		GError* _tmp8_;
		const gchar* _tmp9_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp6_ = pamac_package_get_name (_data4_->pkg);
		_tmp7_ = _tmp6_;
		_tmp8_ = e;
		_tmp9_ = _tmp8_->message;
		g_warning ("transaction-gtk.vala:469: %s: %s", _tmp7_, _tmp9_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (downloaded_pixbuf_path);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_free0 (downloaded_pixbuf_path);
}

static void
_______lambda11__gasync_ready_callback (GObject* source_object,
                                        GAsyncResult* res,
                                        gpointer self)
{
	______lambda11_ (self, source_object, res);
	block4_data_unref (self);
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static void
pamac_transaction_gtk_set_row_app_icon (PamacTransactionGtk* self,
                                        PamacSummaryRow* row,
                                        PamacPackage* pkg)
{
	Block4Data* _data4_;
	PamacSummaryRow* _tmp0_;
	PamacPackage* _tmp1_;
	GdkPixbuf* package_icon = NULL;
	GtkIconTheme* icon_theme = NULL;
	GtkIconTheme* _tmp2_;
	GtkIconTheme* _tmp3_;
	const gchar* icon = NULL;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	GtkImage* _tmp48_;
	GdkPixbuf* _tmp49_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	g_return_if_fail (pkg != NULL);
	_data4_ = g_slice_new0 (Block4Data);
	_data4_->_ref_count_ = 1;
	_data4_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (row);
	_g_object_unref0 (_data4_->row);
	_data4_->row = _tmp0_;
	_tmp1_ = _g_object_ref0 (pkg);
	_g_object_unref0 (_data4_->pkg);
	_data4_->pkg = _tmp1_;
	package_icon = NULL;
	_tmp2_ = gtk_icon_theme_get_default ();
	_tmp3_ = _g_object_ref0 (_tmp2_);
	icon_theme = _tmp3_;
	{
		GdkPixbuf* _tmp4_ = NULL;
		GdkPixbuf* _tmp5_;
		GdkPixbuf* _tmp6_;
		_tmp5_ = gtk_icon_theme_load_icon (icon_theme, "package-x-generic", 64, 0, &_inner_error0_);
		_tmp4_ = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp6_ = _tmp4_;
		_tmp4_ = NULL;
		_g_object_unref0 (package_icon);
		package_icon = _tmp6_;
		_g_object_unref0 (_tmp4_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		g_warning ("transaction-gtk.vala:445: %s", _tmp8_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (icon_theme);
		_g_object_unref0 (package_icon);
		block4_data_unref (_data4_);
		_data4_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_tmp9_ = pamac_package_get_icon (_data4_->pkg);
	_tmp10_ = _tmp9_;
	icon = _tmp10_;
	_tmp11_ = icon;
	if (_tmp11_ != NULL) {
		const gchar* _tmp12_;
		_tmp12_ = icon;
		if (g_str_has_prefix (_tmp12_, "http")) {
			GdkPixbuf* _tmp13_;
			GdkPixbuf* _tmp14_;
			const gchar* _tmp15_;
			_tmp13_ = package_icon;
			_tmp14_ = _g_object_ref0 (_tmp13_);
			_g_object_unref0 (_data4_->pixbuf);
			_data4_->pixbuf = _tmp14_;
			_tmp15_ = icon;
			pamac_transaction_gtk_get_icon_pixbuf (self, _tmp15_, _____lambda10__gasync_ready_callback, block4_data_ref (_data4_));
		} else {
			{
				GdkPixbuf* _tmp16_ = NULL;
				const gchar* _tmp17_;
				GdkPixbuf* _tmp18_;
				GdkPixbuf* _tmp19_;
				_tmp17_ = icon;
				_tmp18_ = gdk_pixbuf_new_from_file_at_scale (_tmp17_, 64, 64, TRUE, &_inner_error0_);
				_tmp16_ = _tmp18_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch1_g_error;
				}
				_tmp19_ = _tmp16_;
				_tmp16_ = NULL;
				_g_object_unref0 (_data4_->pixbuf);
				_data4_->pixbuf = _tmp19_;
				_g_object_unref0 (_tmp16_);
			}
			goto __finally1;
			__catch1_g_error:
			{
				gboolean _tmp20_ = FALSE;
				g_clear_error (&_inner_error0_);
				if (G_TYPE_CHECK_INSTANCE_TYPE (_data4_->pkg, PAMAC_TYPE_SNAP_PACKAGE)) {
					const gchar* _tmp21_;
					const gchar* _tmp22_;
					_tmp21_ = pamac_package_get_installed_version (_data4_->pkg);
					_tmp22_ = _tmp21_;
					_tmp20_ = _tmp22_ != NULL;
				} else {
					_tmp20_ = FALSE;
				}
				if (_tmp20_) {
					GdkPixbuf* _tmp23_;
					GdkPixbuf* _tmp24_;
					PamacDatabase* _tmp25_;
					PamacDatabase* _tmp26_;
					const gchar* _tmp27_;
					const gchar* _tmp28_;
					_tmp23_ = package_icon;
					_tmp24_ = _g_object_ref0 (_tmp23_);
					_g_object_unref0 (_data4_->pixbuf);
					_data4_->pixbuf = _tmp24_;
					_tmp25_ = pamac_transaction_get_database ((PamacTransaction*) self);
					_tmp26_ = _tmp25_;
					_tmp27_ = pamac_package_get_name (_data4_->pkg);
					_tmp28_ = _tmp27_;
					pamac_database_get_installed_snap_icon_async (_tmp26_, _tmp28_, _______lambda11__gasync_ready_callback, block4_data_ref (_data4_));
				} else {
					gchar* new_icon = NULL;
					const gchar* _tmp29_;
					gchar* _tmp30_;
					const gchar* _tmp31_;
					_tmp29_ = icon;
					_tmp30_ = g_strdup (_tmp29_);
					new_icon = _tmp30_;
					_tmp31_ = icon;
					if (string_contains (_tmp31_, "extra")) {
						const gchar* _tmp32_;
						gchar* _tmp33_;
						_tmp32_ = icon;
						_tmp33_ = string_replace (_tmp32_, "extra", "community");
						_g_free0 (new_icon);
						new_icon = _tmp33_;
					} else {
						const gchar* _tmp34_;
						_tmp34_ = icon;
						if (string_contains (_tmp34_, "community")) {
							const gchar* _tmp35_;
							gchar* _tmp36_;
							_tmp35_ = icon;
							_tmp36_ = string_replace (_tmp35_, "community", "extra");
							_g_free0 (new_icon);
							new_icon = _tmp36_;
						}
					}
					{
						GdkPixbuf* _tmp37_ = NULL;
						const gchar* _tmp38_;
						GdkPixbuf* _tmp39_;
						GdkPixbuf* _tmp40_;
						_tmp38_ = new_icon;
						_tmp39_ = gdk_pixbuf_new_from_file_at_scale (_tmp38_, 64, 64, TRUE, &_inner_error0_);
						_tmp37_ = _tmp39_;
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							goto __catch2_g_error;
						}
						_tmp40_ = _tmp37_;
						_tmp37_ = NULL;
						_g_object_unref0 (_data4_->pixbuf);
						_data4_->pixbuf = _tmp40_;
						_g_object_unref0 (_tmp37_);
					}
					goto __finally2;
					__catch2_g_error:
					{
						GError* e = NULL;
						GdkPixbuf* _tmp41_;
						GdkPixbuf* _tmp42_;
						const gchar* _tmp43_;
						GError* _tmp44_;
						const gchar* _tmp45_;
						e = _inner_error0_;
						_inner_error0_ = NULL;
						_tmp41_ = package_icon;
						_tmp42_ = _g_object_ref0 (_tmp41_);
						_g_object_unref0 (_data4_->pixbuf);
						_data4_->pixbuf = _tmp42_;
						_tmp43_ = icon;
						_tmp44_ = e;
						_tmp45_ = _tmp44_->message;
						g_warning ("transaction-gtk.vala:484: %s: %s", _tmp43_, _tmp45_);
						_g_error_free0 (e);
					}
					__finally2:
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						_g_free0 (new_icon);
						_g_object_unref0 (icon_theme);
						_g_object_unref0 (package_icon);
						block4_data_unref (_data4_);
						_data4_ = NULL;
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
						g_clear_error (&_inner_error0_);
						return;
					}
					_g_free0 (new_icon);
				}
			}
			__finally1:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (icon_theme);
				_g_object_unref0 (package_icon);
				block4_data_unref (_data4_);
				_data4_ = NULL;
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return;
			}
		}
	} else {
		GdkPixbuf* _tmp46_;
		GdkPixbuf* _tmp47_;
		_tmp46_ = package_icon;
		_tmp47_ = _g_object_ref0 (_tmp46_);
		_g_object_unref0 (_data4_->pixbuf);
		_data4_->pixbuf = _tmp47_;
	}
	_tmp48_ = _data4_->row->app_icon;
	_tmp49_ = _data4_->pixbuf;
	g_object_set (_tmp48_, "pixbuf", _tmp49_, NULL);
	_g_object_unref0 (icon_theme);
	_g_object_unref0 (package_icon);
	block4_data_unref (_data4_);
	_data4_ = NULL;
}

static PamacSummaryRow*
pamac_transaction_gtk_create_summary_row (PamacTransactionGtk* self,
                                          PamacPackage* pkg,
                                          PamacAlpmPackage* full_alpm_pkg,
                                          const gchar* infos_string)
{
	PamacSummaryRow* row = NULL;
	PamacSummaryRow* _tmp0_;
	gboolean software_mode = FALSE;
	PamacLocalConfig* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	const gchar* app_name = NULL;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_;
	const gchar* _tmp10_;
	gboolean _tmp26_ = FALSE;
	guint64 download_size = 0ULL;
	guint64 _tmp35_;
	guint64 _tmp36_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	PamacSummaryRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (pkg != NULL, NULL);
	_tmp0_ = pamac_summary_row_new ();
	g_object_ref_sink (_tmp0_);
	row = _tmp0_;
	_tmp1_ = self->priv->_local_config;
	_tmp2_ = pamac_local_config_get_software_mode (_tmp1_);
	_tmp3_ = _tmp2_;
	software_mode = _tmp3_;
	_tmp4_ = pamac_package_get_app_name (pkg);
	_tmp5_ = _tmp4_;
	app_name = _tmp5_;
	_tmp7_ = app_name;
	if (_tmp7_ == NULL) {
		_tmp6_ = full_alpm_pkg != NULL;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp8_ = pamac_package_get_app_name ((PamacPackage*) full_alpm_pkg);
		_tmp9_ = _tmp8_;
		app_name = _tmp9_;
	}
	_tmp10_ = app_name;
	if (_tmp10_ == NULL) {
		PamacSummaryRow* _tmp11_;
		GtkLabel* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		_tmp11_ = row;
		_tmp12_ = _tmp11_->name_label;
		_tmp13_ = pamac_package_get_name (pkg);
		_tmp14_ = _tmp13_;
		gtk_label_set_label (_tmp12_, _tmp14_);
	} else {
		gboolean _tmp15_ = FALSE;
		if (full_alpm_pkg != NULL) {
			_tmp15_ = !software_mode;
		} else {
			_tmp15_ = FALSE;
		}
		if (_tmp15_) {
			PamacSummaryRow* _tmp16_;
			GtkLabel* _tmp17_;
			const gchar* _tmp18_;
			const gchar* _tmp19_;
			const gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			_tmp16_ = row;
			_tmp17_ = _tmp16_->name_label;
			_tmp18_ = app_name;
			_tmp19_ = pamac_package_get_name (pkg);
			_tmp20_ = _tmp19_;
			_tmp21_ = g_strdup_printf ("%s (%s)", _tmp18_, _tmp20_);
			_tmp22_ = _tmp21_;
			gtk_label_set_label (_tmp17_, _tmp22_);
			_g_free0 (_tmp22_);
		} else {
			PamacSummaryRow* _tmp23_;
			GtkLabel* _tmp24_;
			const gchar* _tmp25_;
			_tmp23_ = row;
			_tmp24_ = _tmp23_->name_label;
			_tmp25_ = app_name;
			gtk_label_set_label (_tmp24_, _tmp25_);
		}
	}
	if (infos_string == NULL) {
		_tmp26_ = TRUE;
	} else {
		_tmp26_ = software_mode;
	}
	if (_tmp26_) {
		PamacSummaryRow* _tmp27_;
		GtkLabel* _tmp28_;
		_tmp27_ = row;
		_tmp28_ = _tmp27_->infos_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp28_, FALSE);
	} else {
		PamacSummaryRow* _tmp29_;
		GtkLabel* _tmp30_;
		_tmp29_ = row;
		_tmp30_ = _tmp29_->infos_label;
		gtk_label_set_label (_tmp30_, infos_string);
	}
	if (!software_mode) {
		PamacSummaryRow* _tmp31_;
		GtkLabel* _tmp32_;
		const gchar* _tmp33_;
		const gchar* _tmp34_;
		_tmp31_ = row;
		_tmp32_ = _tmp31_->version_label;
		_tmp33_ = pamac_package_get_version (pkg);
		_tmp34_ = _tmp33_;
		gtk_label_set_label (_tmp32_, _tmp34_);
	}
	_tmp35_ = pamac_package_get_download_size (pkg);
	_tmp36_ = _tmp35_;
	download_size = _tmp36_;
	if (download_size > ((guint64) 0)) {
		PamacSummaryRow* _tmp37_;
		GtkLabel* _tmp38_;
		gchar* _tmp39_;
		gchar* _tmp40_;
		_tmp37_ = row;
		_tmp38_ = _tmp37_->size_label;
		_tmp39_ = g_format_size_full (download_size, G_FORMAT_SIZE_DEFAULT);
		_tmp40_ = _tmp39_;
		gtk_label_set_label (_tmp38_, _tmp40_);
		_g_free0 (_tmp40_);
	}
	_tmp41_ = pamac_package_get_repo (pkg);
	_tmp42_ = _tmp41_;
	if (_tmp42_ != NULL) {
		if (full_alpm_pkg != NULL) {
			gboolean _tmp43_ = FALSE;
			gboolean _tmp44_ = FALSE;
			gboolean _tmp45_ = FALSE;
			const gchar* _tmp46_;
			const gchar* _tmp47_;
			_tmp46_ = pamac_package_get_repo (pkg);
			_tmp47_ = _tmp46_;
			if (g_strcmp0 (_tmp47_, "community") == 0) {
				_tmp45_ = TRUE;
			} else {
				const gchar* _tmp48_;
				const gchar* _tmp49_;
				_tmp48_ = pamac_package_get_repo (pkg);
				_tmp49_ = _tmp48_;
				_tmp45_ = g_strcmp0 (_tmp49_, "extra") == 0;
			}
			if (_tmp45_) {
				_tmp44_ = TRUE;
			} else {
				const gchar* _tmp50_;
				const gchar* _tmp51_;
				_tmp50_ = pamac_package_get_repo (pkg);
				_tmp51_ = _tmp50_;
				_tmp44_ = g_strcmp0 (_tmp51_, "core") == 0;
			}
			if (_tmp44_) {
				_tmp43_ = TRUE;
			} else {
				const gchar* _tmp52_;
				const gchar* _tmp53_;
				_tmp52_ = pamac_package_get_repo (pkg);
				_tmp53_ = _tmp52_;
				_tmp43_ = g_strcmp0 (_tmp53_, "multilib") == 0;
			}
			if (_tmp43_) {
				if (software_mode) {
					PamacSummaryRow* _tmp54_;
					GtkLabel* _tmp55_;
					_tmp54_ = row;
					_tmp55_ = _tmp54_->repo_label;
					gtk_label_set_label (_tmp55_, g_dgettext (NULL, "Official Repositories"));
				} else {
					PamacSummaryRow* _tmp56_;
					GtkLabel* _tmp57_;
					const gchar* _tmp58_;
					const gchar* _tmp59_;
					gchar* _tmp60_;
					gchar* _tmp61_;
					_tmp56_ = row;
					_tmp57_ = _tmp56_->repo_label;
					_tmp58_ = pamac_package_get_repo (pkg);
					_tmp59_ = _tmp58_;
					_tmp60_ = g_strdup_printf ("%s (%s)", g_dgettext (NULL, "Official Repositories"), _tmp59_);
					_tmp61_ = _tmp60_;
					gtk_label_set_label (_tmp57_, _tmp61_);
					_g_free0 (_tmp61_);
				}
			} else {
				const gchar* _tmp62_;
				const gchar* _tmp63_;
				_tmp62_ = pamac_package_get_repo (pkg);
				_tmp63_ = _tmp62_;
				if (g_strcmp0 (_tmp63_, g_dgettext (NULL, "AUR")) == 0) {
					PamacSummaryRow* _tmp64_;
					GtkLabel* _tmp65_;
					const gchar* _tmp66_;
					const gchar* _tmp67_;
					_tmp64_ = row;
					_tmp65_ = _tmp64_->repo_label;
					_tmp66_ = pamac_package_get_repo (pkg);
					_tmp67_ = _tmp66_;
					gtk_label_set_label (_tmp65_, _tmp67_);
				} else {
					PamacSummaryRow* _tmp68_;
					GtkLabel* _tmp69_;
					const gchar* _tmp70_;
					const gchar* _tmp71_;
					gchar* _tmp72_;
					gchar* _tmp73_;
					_tmp68_ = row;
					_tmp69_ = _tmp68_->repo_label;
					_tmp70_ = pamac_package_get_repo (pkg);
					_tmp71_ = _tmp70_;
					_tmp72_ = g_strdup_printf ("%s (%s)", g_dgettext (NULL, "Repositories"), _tmp71_);
					_tmp73_ = _tmp72_;
					gtk_label_set_label (_tmp69_, _tmp73_);
					_g_free0 (_tmp73_);
				}
			}
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_FLATPAK_PACKAGE)) {
				PamacSummaryRow* _tmp74_;
				GtkLabel* _tmp75_;
				const gchar* _tmp76_;
				const gchar* _tmp77_;
				gchar* _tmp78_;
				gchar* _tmp79_;
				_tmp74_ = row;
				_tmp75_ = _tmp74_->repo_label;
				_tmp76_ = pamac_package_get_repo (pkg);
				_tmp77_ = _tmp76_;
				_tmp78_ = g_strdup_printf ("%s (%s)", g_dgettext (NULL, "Flatpak"), _tmp77_);
				_tmp79_ = _tmp78_;
				gtk_label_set_label (_tmp75_, _tmp79_);
				_g_free0 (_tmp79_);
			} else {
				PamacSummaryRow* _tmp80_;
				GtkLabel* _tmp81_;
				const gchar* _tmp82_;
				const gchar* _tmp83_;
				_tmp80_ = row;
				_tmp81_ = _tmp80_->repo_label;
				_tmp82_ = pamac_package_get_repo (pkg);
				_tmp83_ = _tmp82_;
				gtk_label_set_label (_tmp81_, _tmp83_);
			}
		}
	}
	if (full_alpm_pkg != NULL) {
		PamacSummaryRow* _tmp84_;
		_tmp84_ = row;
		pamac_transaction_gtk_set_row_app_icon (self, _tmp84_, (PamacPackage*) full_alpm_pkg);
	} else {
		PamacSummaryRow* _tmp85_;
		_tmp85_ = row;
		pamac_transaction_gtk_set_row_app_icon (self, _tmp85_, pkg);
	}
	result = row;
	return result;
}

static gchar*
pamac_transaction_gtk_get_pkgname_display_name (PamacTransactionGtk* self,
                                                const gchar* pkgname)
{
	PamacAlpmPackage* full_pkg = NULL;
	PamacDatabase* _tmp0_;
	PamacDatabase* _tmp1_;
	PamacAlpmPackage* _tmp2_;
	PamacAlpmPackage* _tmp3_;
	PamacAlpmPackage* _tmp4_;
	gchar* _tmp11_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (pkgname != NULL, NULL);
	_tmp0_ = pamac_transaction_get_database ((PamacTransaction*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pamac_database_get_pkg (_tmp1_, pkgname);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	full_pkg = _tmp3_;
	_tmp4_ = full_pkg;
	if (_tmp4_ != NULL) {
		const gchar* app_name = NULL;
		PamacAlpmPackage* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp5_ = full_pkg;
		_tmp6_ = pamac_package_get_app_name ((PamacPackage*) _tmp5_);
		_tmp7_ = _tmp6_;
		app_name = _tmp7_;
		_tmp8_ = app_name;
		if (_tmp8_ != NULL) {
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = app_name;
			_tmp10_ = g_strdup (_tmp9_);
			result = _tmp10_;
			_g_object_unref0 (full_pkg);
			return result;
		}
	}
	_tmp11_ = g_strdup (pkgname);
	result = _tmp11_;
	_g_object_unref0 (full_pkg);
	return result;
}

static void
pamac_transaction_gtk_add_infos_to_summary (PamacTransactionGtk* self,
                                            GtkListBox* listbox,
                                            PamacPackage* pkg,
                                            const gchar* infos_string)
{
	const gchar* id = NULL;
	PamacAlpmPackage* alpm_pkg = NULL;
	PamacAlpmPackage* _tmp0_;
	PamacAlpmPackage* _tmp1_;
	const gchar* _tmp7_;
	PamacSummaryRow* row = NULL;
	PamacAlpmPackage* _tmp8_;
	PamacSummaryRow* _tmp9_;
	PamacSummaryRow* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	g_return_if_fail (pkg != NULL);
	_tmp0_ = pamac_transaction_gtk_get_full_alpm_pkg (self, pkg);
	alpm_pkg = _tmp0_;
	_tmp1_ = alpm_pkg;
	if (_tmp1_ != NULL) {
		PamacAlpmPackage* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp2_ = alpm_pkg;
		_tmp3_ = pamac_package_get_id ((PamacPackage*) _tmp2_);
		_tmp4_ = _tmp3_;
		id = _tmp4_;
	} else {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp5_ = pamac_package_get_id (pkg);
		_tmp6_ = _tmp5_;
		id = _tmp6_;
	}
	_tmp7_ = id;
	pamac_transaction_gtk_transaction_summary_add (self, _tmp7_);
	_tmp8_ = alpm_pkg;
	_tmp9_ = pamac_transaction_gtk_create_summary_row (self, pkg, _tmp8_, infos_string);
	row = _tmp9_;
	_tmp10_ = row;
	if (_tmp10_ != NULL) {
		PamacSummaryRow* _tmp11_;
		_tmp11_ = row;
		gtk_container_add ((GtkContainer*) listbox, (GtkWidget*) _tmp11_);
	}
	_g_object_unref0 (row);
	_g_object_unref0 (alpm_pkg);
}

static void
pamac_transaction_gtk_add_remove_to_summary (PamacTransactionGtk* self,
                                             GtkListBox* listbox,
                                             PamacPackage* pkg)
{
	gchar* infos = NULL;
	PamacAlpmPackage* alpm_pkg = NULL;
	PamacAlpmPackage* _tmp0_;
	PamacAlpmPackage* _tmp1_;
	const gchar* _tmp24_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	g_return_if_fail (pkg != NULL);
	infos = NULL;
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) pkg) : NULL);
	alpm_pkg = _tmp0_;
	_tmp1_ = alpm_pkg;
	if (_tmp1_ != NULL) {
		GPtrArray* dep_list = NULL;
		PamacAlpmPackage* _tmp2_;
		GPtrArray* _tmp3_;
		GPtrArray* _tmp4_;
		GPtrArray* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		_tmp2_ = alpm_pkg;
		_tmp3_ = pamac_alpm_package_get_depends (_tmp2_);
		_tmp4_ = _tmp3_;
		dep_list = _tmp4_;
		_tmp5_ = dep_list;
		_tmp6_ = vala_g_ptr_array_get_length (_tmp5_);
		_tmp7_ = _tmp6_;
		if (_tmp7_ != 0) {
			GPtrArray* _tmp8_;
			gconstpointer _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			gchar* _tmp12_;
			_tmp8_ = dep_list;
			_tmp9_ = g_ptr_array_index (_tmp8_, (guint) 0);
			_tmp10_ = pamac_transaction_gtk_get_pkgname_display_name (self, (const gchar*) _tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = g_strdup_printf ("%s: %s", g_dgettext (NULL, "Depends On"), _tmp11_);
			_g_free0 (infos);
			infos = _tmp12_;
			_g_free0 (_tmp11_);
		} else {
			GPtrArray* requiredby_list = NULL;
			PamacAlpmPackage* _tmp13_;
			GPtrArray* _tmp14_;
			GPtrArray* _tmp15_;
			GPtrArray* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			_tmp13_ = alpm_pkg;
			_tmp14_ = pamac_alpm_package_get_requiredby (_tmp13_);
			_tmp15_ = _tmp14_;
			requiredby_list = _tmp15_;
			_tmp16_ = requiredby_list;
			_tmp17_ = vala_g_ptr_array_get_length (_tmp16_);
			_tmp18_ = _tmp17_;
			if (_tmp18_ != 0) {
				GPtrArray* _tmp19_;
				gconstpointer _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp22_;
				gchar* _tmp23_;
				_tmp19_ = requiredby_list;
				_tmp20_ = g_ptr_array_index (_tmp19_, (guint) 0);
				_tmp21_ = pamac_transaction_gtk_get_pkgname_display_name (self, (const gchar*) _tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = g_strdup_printf ("%s: %s", g_dgettext (NULL, "Orphan Of"), _tmp22_);
				_g_free0 (infos);
				infos = _tmp23_;
				_g_free0 (_tmp22_);
			}
		}
	}
	_tmp24_ = infos;
	pamac_transaction_gtk_add_infos_to_summary (self, listbox, pkg, _tmp24_);
	_g_object_unref0 (alpm_pkg);
	_g_free0 (infos);
}

static void
pamac_transaction_gtk_add_conflict_to_summary (PamacTransactionGtk* self,
                                               GtkListBox* listbox,
                                               PamacPackage* pkg)
{
	gchar* infos = NULL;
	PamacAlpmPackage* alpm_pkg = NULL;
	PamacAlpmPackage* _tmp0_;
	PamacAlpmPackage* _tmp1_;
	const gchar* _tmp13_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	g_return_if_fail (pkg != NULL);
	infos = NULL;
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) pkg) : NULL);
	alpm_pkg = _tmp0_;
	_tmp1_ = alpm_pkg;
	if (_tmp1_ != NULL) {
		GPtrArray* dep_list = NULL;
		PamacAlpmPackage* _tmp2_;
		GPtrArray* _tmp3_;
		GPtrArray* _tmp4_;
		GPtrArray* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		_tmp2_ = alpm_pkg;
		_tmp3_ = pamac_alpm_package_get_conflicts (_tmp2_);
		_tmp4_ = _tmp3_;
		dep_list = _tmp4_;
		_tmp5_ = dep_list;
		_tmp6_ = vala_g_ptr_array_get_length (_tmp5_);
		_tmp7_ = _tmp6_;
		if (_tmp7_ != 0) {
			GPtrArray* _tmp8_;
			gconstpointer _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			gchar* _tmp12_;
			_tmp8_ = dep_list;
			_tmp9_ = g_ptr_array_index (_tmp8_, (guint) 0);
			_tmp10_ = pamac_transaction_gtk_get_pkgname_display_name (self, (const gchar*) _tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = g_strdup_printf ("(%s: %s)", g_dgettext (NULL, "Conflicts With"), _tmp11_);
			_g_free0 (infos);
			infos = _tmp12_;
			_g_free0 (_tmp11_);
		}
	}
	_tmp13_ = infos;
	pamac_transaction_gtk_add_infos_to_summary (self, listbox, pkg, _tmp13_);
	_g_object_unref0 (alpm_pkg);
	_g_free0 (infos);
}

static void
pamac_transaction_gtk_add_downgrade_to_summary (PamacTransactionGtk* self,
                                                GtkListBox* listbox,
                                                PamacPackage* pkg)
{
	gchar* infos = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	g_return_if_fail (pkg != NULL);
	infos = NULL;
	pamac_transaction_gtk_add_infos_to_summary (self, listbox, pkg, infos);
	_g_free0 (infos);
}

static void
pamac_transaction_gtk_add_build_to_summary (PamacTransactionGtk* self,
                                            GtkListBox* listbox,
                                            PamacPackage* pkg)
{
	gchar* infos = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	g_return_if_fail (pkg != NULL);
	infos = NULL;
	_tmp0_ = pamac_package_get_installed_version (pkg);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp2_ = pamac_package_get_installed_version (pkg);
		_tmp3_ = _tmp2_;
		_tmp4_ = pamac_package_get_version (pkg);
		_tmp5_ = _tmp4_;
		if (g_strcmp0 (_tmp3_, _tmp5_) != 0) {
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			gchar* _tmp8_;
			_tmp6_ = pamac_package_get_installed_version (pkg);
			_tmp7_ = _tmp6_;
			_tmp8_ = g_strdup_printf ("%s", _tmp7_);
			_g_free0 (infos);
			infos = _tmp8_;
		}
	} else {
		PamacAlpmPackage* alpm_pkg = NULL;
		PamacAlpmPackage* _tmp9_;
		PamacAlpmPackage* _tmp10_;
		_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) pkg) : NULL);
		alpm_pkg = _tmp9_;
		_tmp10_ = alpm_pkg;
		if (_tmp10_ != NULL) {
			GPtrArray* dep_list = NULL;
			PamacAlpmPackage* _tmp11_;
			GPtrArray* _tmp12_;
			GPtrArray* _tmp13_;
			GPtrArray* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			_tmp11_ = alpm_pkg;
			_tmp12_ = pamac_alpm_package_get_requiredby (_tmp11_);
			_tmp13_ = _tmp12_;
			dep_list = _tmp13_;
			_tmp14_ = dep_list;
			_tmp15_ = vala_g_ptr_array_get_length (_tmp14_);
			_tmp16_ = _tmp15_;
			if (_tmp16_ != 0) {
				GPtrArray* _tmp17_;
				gconstpointer _tmp18_;
				gchar* _tmp19_;
				_tmp17_ = dep_list;
				_tmp18_ = g_ptr_array_index (_tmp17_, (guint) 0);
				_tmp19_ = g_strdup_printf ("%s: %s", g_dgettext (NULL, "Required By"), (const gchar*) _tmp18_);
				_g_free0 (infos);
				infos = _tmp19_;
			}
		}
		_g_object_unref0 (alpm_pkg);
	}
	_tmp20_ = infos;
	pamac_transaction_gtk_add_infos_to_summary (self, listbox, pkg, _tmp20_);
	_g_free0 (infos);
}

static void
pamac_transaction_gtk_add_install_to_summary (PamacTransactionGtk* self,
                                              GtkListBox* listbox,
                                              PamacPackage* pkg)
{
	gchar* infos = NULL;
	PamacAlpmPackage* alpm_pkg = NULL;
	PamacAlpmPackage* _tmp0_;
	PamacAlpmPackage* _tmp1_;
	const gchar* _tmp24_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	g_return_if_fail (pkg != NULL);
	infos = NULL;
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) pkg) : NULL);
	alpm_pkg = _tmp0_;
	_tmp1_ = alpm_pkg;
	if (_tmp1_ != NULL) {
		gboolean requiredby_found = FALSE;
		GPtrArray* dep_list = NULL;
		PamacAlpmPackage* _tmp2_;
		GPtrArray* _tmp3_;
		GPtrArray* _tmp4_;
		GPtrArray* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		requiredby_found = FALSE;
		_tmp2_ = alpm_pkg;
		_tmp3_ = pamac_alpm_package_get_requiredby (_tmp2_);
		_tmp4_ = _tmp3_;
		dep_list = _tmp4_;
		_tmp5_ = dep_list;
		_tmp6_ = vala_g_ptr_array_get_length (_tmp5_);
		_tmp7_ = _tmp6_;
		if (_tmp7_ != 0) {
			GPtrArray* _tmp8_;
			gconstpointer _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			gchar* _tmp12_;
			requiredby_found = TRUE;
			_tmp8_ = dep_list;
			_tmp9_ = g_ptr_array_index (_tmp8_, (guint) 0);
			_tmp10_ = pamac_transaction_gtk_get_pkgname_display_name (self, (const gchar*) _tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = g_strdup_printf ("%s: %s", g_dgettext (NULL, "Required By"), _tmp11_);
			_g_free0 (infos);
			infos = _tmp12_;
			_g_free0 (_tmp11_);
		}
		if (!requiredby_found) {
			PamacAlpmPackage* _tmp13_;
			GPtrArray* _tmp14_;
			GPtrArray* _tmp15_;
			GPtrArray* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			_tmp13_ = alpm_pkg;
			_tmp14_ = pamac_alpm_package_get_replaces (_tmp13_);
			_tmp15_ = _tmp14_;
			dep_list = _tmp15_;
			_tmp16_ = dep_list;
			_tmp17_ = vala_g_ptr_array_get_length (_tmp16_);
			_tmp18_ = _tmp17_;
			if (_tmp18_ != 0) {
				GPtrArray* _tmp19_;
				gconstpointer _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp22_;
				gchar* _tmp23_;
				_tmp19_ = dep_list;
				_tmp20_ = g_ptr_array_index (_tmp19_, (guint) 0);
				_tmp21_ = pamac_transaction_gtk_get_pkgname_display_name (self, (const gchar*) _tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = g_strdup_printf ("%s: %s", g_dgettext (NULL, "Replaces"), _tmp22_);
				_g_free0 (infos);
				infos = _tmp23_;
				_g_free0 (_tmp22_);
			}
		}
	}
	_tmp24_ = infos;
	pamac_transaction_gtk_add_infos_to_summary (self, listbox, pkg, _tmp24_);
	_g_object_unref0 (alpm_pkg);
	_g_free0 (infos);
}

static void
pamac_transaction_gtk_add_reinstall_to_summary (PamacTransactionGtk* self,
                                                GtkListBox* listbox,
                                                PamacPackage* pkg)
{
	gchar* infos = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	g_return_if_fail (pkg != NULL);
	infos = NULL;
	pamac_transaction_gtk_add_infos_to_summary (self, listbox, pkg, infos);
	_g_free0 (infos);
}

static void
pamac_transaction_gtk_add_upgrade_to_summary (PamacTransactionGtk* self,
                                              GtkListBox* listbox,
                                              PamacPackage* pkg)
{
	gchar* infos = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	g_return_if_fail (pkg != NULL);
	infos = NULL;
	pamac_transaction_gtk_add_infos_to_summary (self, listbox, pkg, infos);
	_g_free0 (infos);
}

static GtkListBox*
pamac_transaction_gtk_create_listbox (PamacTransactionGtk* self,
                                      GtkBox* box,
                                      const gchar* action,
                                      guint length)
{
	gchar* info = NULL;
	GtkExpander* expander = NULL;
	const gchar* _tmp2_;
	GtkExpander* _tmp3_;
	GtkListBox* listbox = NULL;
	GtkListBox* _tmp4_;
	GtkStyleContext* _tmp5_;
	GtkListBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (box != NULL, NULL);
	g_return_val_if_fail (action != NULL, NULL);
	if (length > ((guint) 1)) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup_printf ("<b>%s (%u)</b>", g_dgettext (NULL, action), length);
		_g_free0 (info);
		info = _tmp0_;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup_printf ("<b>%s</b>", g_dgettext (NULL, action));
		_g_free0 (info);
		info = _tmp1_;
	}
	_tmp2_ = info;
	_tmp3_ = (GtkExpander*) gtk_expander_new (_tmp2_);
	g_object_ref_sink (_tmp3_);
	expander = _tmp3_;
	gtk_widget_set_visible ((GtkWidget*) expander, TRUE);
	gtk_expander_set_use_markup (expander, TRUE);
	gtk_expander_set_expanded (expander, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) expander, 12);
	gtk_container_add ((GtkContainer*) box, (GtkWidget*) expander);
	_tmp4_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp4_);
	listbox = _tmp4_;
	gtk_widget_set_visible ((GtkWidget*) listbox, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) listbox, 6);
	gtk_list_box_set_selection_mode (listbox, GTK_SELECTION_NONE);
	_tmp5_ = gtk_widget_get_style_context ((GtkWidget*) listbox);
	gtk_style_context_add_class (_tmp5_, "content");
	gtk_container_add ((GtkContainer*) expander, (GtkWidget*) listbox);
	result = listbox;
	_g_object_unref0 (expander);
	_g_free0 (info);
	return result;
}

static void
pamac_transaction_gtk_show_summary_data_free (gpointer _data)
{
	PamacTransactionGtkShowSummaryData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->summary);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkShowSummaryData, _data_);
}

static void
pamac_transaction_gtk_show_summary (PamacTransactionGtk* self,
                                    PamacTransactionSummary* summary,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	PamacTransactionGtkShowSummaryData* _data_;
	PamacTransactionGtk* _tmp0_;
	PamacTransactionSummary* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (summary != NULL);
	_data_ = g_slice_new0 (PamacTransactionGtkShowSummaryData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_show_summary_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (summary);
	_g_object_unref0 (_data_->summary);
	_data_->summary = _tmp1_;
	pamac_transaction_gtk_show_summary_co (_data_);
}

static gint
pamac_transaction_gtk_show_summary_finish (PamacTransactionGtk* self,
                                           GAsyncResult* _res_)
{
	gint result;
	PamacTransactionGtkShowSummaryData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static Block5Data*
block5_data_ref (Block5Data* _data5_)
{
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}

static void
block5_data_unref (void * _userdata_)
{
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		PamacTransactionGtk* self;
		self = _data5_->self;
		_g_object_unref0 (_data5_->transaction_sum_dialog);
		_g_object_unref0 (self);
		g_slice_free (Block5Data, _data5_);
	}
}

static void
___lambda12_ (Block5Data* _data5_)
{
	PamacTransactionGtk* self;
	PamacTransactionSumDialog* _tmp0_;
	self = _data5_->self;
	_tmp0_ = _data5_->transaction_sum_dialog;
	gtk_dialog_response ((GtkDialog*) _tmp0_, (gint) GTK_RESPONSE_REJECT);
}

static void
____lambda12__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	___lambda12_ (self);
}

static void
___lambda13_ (Block5Data* _data5_)
{
	PamacTransactionGtk* self;
	PamacTransactionSumDialog* _tmp0_;
	self = _data5_->self;
	_tmp0_ = _data5_->transaction_sum_dialog;
	gtk_dialog_response ((GtkDialog*) _tmp0_, (gint) GTK_RESPONSE_REJECT);
}

static void
____lambda13__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	___lambda13_ (self);
}

static gboolean
_pamac_transaction_gtk_show_summary_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_gtk_show_summary_co (self);
	return result;
}

static void
__lambda16_ (Block5Data* _data5_,
             gint res)
{
	PamacTransactionGtk* self;
	PamacTransactionSumDialog* _tmp0_;
	self = _data5_->self;
	_data5_->response = res;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _pamac_transaction_gtk_show_summary_co_gsource_func, _data5_->_async_data_, NULL);
	_tmp0_ = _data5_->transaction_sum_dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}

static void
___lambda16__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda16_ (self, response_id);
}

static gboolean
pamac_transaction_gtk_show_summary_co (PamacTransactionGtkShowSummaryData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data5_ = g_slice_new0 (Block5Data);
	_data_->_data5_->_ref_count_ = 1;
	_data_->_data5_->self = g_object_ref (_data_->self);
	_data_->_data5_->_async_data_ = _data_;
	_data_->dsize = (guint64) 0;
	pamac_transaction_gtk_transaction_summary_remove_all (_data_->self);
	_data_->_tmp0_ = _data_->self->priv->_application;
	_data_->_tmp1_ = gtk_application_get_active_window (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
	_data_->application_window = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->application_window;
	_data_->_tmp5_ = pamac_transaction_sum_dialog_new (_data_->_tmp4_);
	g_object_ref_sink (_data_->_tmp5_);
	_data_->_data5_->transaction_sum_dialog = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->_data5_->transaction_sum_dialog;
	_data_->_tmp7_ = _data_->_tmp6_->box;
	_data_->box = _data_->_tmp7_;
	_data_->remove_listbox = NULL;
	_data_->_tmp8_ = pamac_transaction_summary_get_conflicts_to_remove (_data_->summary);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->conflict_pkgs = _data_->_tmp9_;
	_data_->_tmp10_ = _data_->conflict_pkgs;
	_data_->_tmp11_ = vala_g_ptr_array_get_length (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->conflicts_length = (guint) _data_->_tmp12_;
	_data_->_tmp13_ = pamac_transaction_summary_get_to_remove (_data_->summary);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->pkgs = _data_->_tmp14_;
	_data_->_tmp15_ = _data_->pkgs;
	_data_->_tmp16_ = vala_g_ptr_array_get_length (_data_->_tmp15_);
	_data_->_tmp17_ = _data_->_tmp16_;
	_data_->length = (guint) _data_->_tmp17_;
	if (_data_->length > ((guint) 0)) {
		_data_->_tmp18_ = _data_->box;
		_data_->_tmp19_ = pamac_transaction_gtk_create_listbox (_data_->self, _data_->_tmp18_, "To remove", _data_->length + _data_->conflicts_length);
		_g_object_unref0 (_data_->remove_listbox);
		_data_->remove_listbox = _data_->_tmp19_;
		_data_->_tmp20_ = _data_->pkgs;
		_data_->_tmp21_ = g_ptr_array_index (_data_->_tmp20_, (guint) 0);
		_data_->pkg = (PamacPackage*) _data_->_tmp21_;
		_data_->_tmp22_ = _data_->remove_listbox;
		_data_->_tmp23_ = _data_->pkg;
		pamac_transaction_gtk_add_remove_to_summary (_data_->self, _data_->_tmp22_, _data_->_tmp23_);
		_data_->i = (guint) 1;
		while (TRUE) {
			if (!(_data_->i < _data_->length)) {
				break;
			}
			_data_->_tmp24_ = _data_->pkgs;
			_data_->_tmp25_ = g_ptr_array_index (_data_->_tmp24_, _data_->i);
			_data_->pkg = (PamacPackage*) _data_->_tmp25_;
			_data_->_tmp26_ = _data_->remove_listbox;
			_data_->_tmp27_ = _data_->pkg;
			pamac_transaction_gtk_add_remove_to_summary (_data_->self, _data_->_tmp26_, _data_->_tmp27_);
			_data_->_tmp28_ = _data_->i;
			_data_->i = _data_->_tmp28_ + 1;
		}
	}
	if (_data_->conflicts_length > ((guint) 0)) {
		if (_data_->length == ((guint) 0)) {
			_data_->_tmp29_ = _data_->box;
			_data_->_tmp30_ = pamac_transaction_gtk_create_listbox (_data_->self, _data_->_tmp29_, "To remove", _data_->conflicts_length);
			_g_object_unref0 (_data_->remove_listbox);
			_data_->remove_listbox = _data_->_tmp30_;
		}
		_data_->_tmp31_ = _data_->conflict_pkgs;
		_data_->_tmp32_ = g_ptr_array_index (_data_->_tmp31_, (guint) 0);
		_data_->pkg = (PamacPackage*) _data_->_tmp32_;
		_data_->_tmp33_ = _data_->remove_listbox;
		_data_->_tmp34_ = _data_->pkg;
		pamac_transaction_gtk_add_conflict_to_summary (_data_->self, _data_->_tmp33_, _data_->_tmp34_);
		_data_->i = (guint) 1;
		while (TRUE) {
			if (!(_data_->i < _data_->conflicts_length)) {
				break;
			}
			_data_->_tmp35_ = _data_->conflict_pkgs;
			_data_->_tmp36_ = g_ptr_array_index (_data_->_tmp35_, _data_->i);
			_data_->pkg = (PamacPackage*) _data_->_tmp36_;
			_data_->_tmp37_ = _data_->remove_listbox;
			_data_->_tmp38_ = _data_->pkg;
			pamac_transaction_gtk_add_conflict_to_summary (_data_->self, _data_->_tmp37_, _data_->_tmp38_);
			_data_->_tmp39_ = _data_->i;
			_data_->i = _data_->_tmp39_ + 1;
		}
	}
	_data_->_tmp40_ = pamac_transaction_summary_get_to_downgrade (_data_->summary);
	_data_->_tmp41_ = _data_->_tmp40_;
	_data_->pkgs = _data_->_tmp41_;
	_data_->_tmp42_ = _data_->pkgs;
	_data_->_tmp43_ = vala_g_ptr_array_get_length (_data_->_tmp42_);
	_data_->_tmp44_ = _data_->_tmp43_;
	_data_->length = (guint) _data_->_tmp44_;
	if (_data_->length > ((guint) 0)) {
		_data_->_tmp45_ = _data_->box;
		_data_->_tmp46_ = pamac_transaction_gtk_create_listbox (_data_->self, _data_->_tmp45_, "To downgrade", _data_->length);
		_data_->listbox = _data_->_tmp46_;
		_data_->_tmp47_ = _data_->pkgs;
		_data_->_tmp48_ = g_ptr_array_index (_data_->_tmp47_, (guint) 0);
		_data_->pkg = (PamacPackage*) _data_->_tmp48_;
		_data_->_tmp49_ = _data_->pkg;
		_data_->_tmp50_ = pamac_package_get_download_size (_data_->_tmp49_);
		_data_->_tmp51_ = _data_->_tmp50_;
		_data_->dsize += _data_->_tmp51_;
		_data_->_tmp52_ = _data_->listbox;
		_data_->_tmp53_ = _data_->pkg;
		pamac_transaction_gtk_add_downgrade_to_summary (_data_->self, _data_->_tmp52_, _data_->_tmp53_);
		_data_->i = (guint) 1;
		while (TRUE) {
			if (!(_data_->i < _data_->length)) {
				break;
			}
			_data_->_tmp54_ = _data_->pkgs;
			_data_->_tmp55_ = g_ptr_array_index (_data_->_tmp54_, _data_->i);
			_data_->pkg = (PamacPackage*) _data_->_tmp55_;
			_data_->_tmp56_ = _data_->pkg;
			_data_->_tmp57_ = pamac_package_get_download_size (_data_->_tmp56_);
			_data_->_tmp58_ = _data_->_tmp57_;
			_data_->dsize += _data_->_tmp58_;
			_data_->_tmp59_ = _data_->listbox;
			_data_->_tmp60_ = _data_->pkg;
			pamac_transaction_gtk_add_downgrade_to_summary (_data_->self, _data_->_tmp59_, _data_->_tmp60_);
			_data_->_tmp61_ = _data_->i;
			_data_->i = _data_->_tmp61_ + 1;
		}
		_g_object_unref0 (_data_->listbox);
	}
	_data_->_tmp62_ = pamac_transaction_summary_get_to_build (_data_->summary);
	_data_->_tmp63_ = _data_->_tmp62_;
	_data_->pkgs = _data_->_tmp63_;
	_data_->_tmp64_ = _data_->pkgs;
	_data_->_tmp65_ = vala_g_ptr_array_get_length (_data_->_tmp64_);
	_data_->_tmp66_ = _data_->_tmp65_;
	_data_->length = (guint) _data_->_tmp66_;
	if (_data_->length > ((guint) 0)) {
		_data_->_tmp67_ = _data_->box;
		_data_->_tmp68_ = pamac_transaction_gtk_create_listbox (_data_->self, _data_->_tmp67_, "To build", _data_->length);
		_data_->_vala1_listbox = _data_->_tmp68_;
		_data_->_tmp69_ = _data_->pkgs;
		_data_->_tmp70_ = g_ptr_array_index (_data_->_tmp69_, (guint) 0);
		_data_->pkg = (PamacPackage*) _data_->_tmp70_;
		_data_->_tmp71_ = _data_->_vala1_listbox;
		_data_->_tmp72_ = _data_->pkg;
		pamac_transaction_gtk_add_build_to_summary (_data_->self, _data_->_tmp71_, _data_->_tmp72_);
		_data_->i = (guint) 1;
		while (TRUE) {
			if (!(_data_->i < _data_->length)) {
				break;
			}
			_data_->_tmp73_ = _data_->pkgs;
			_data_->_tmp74_ = g_ptr_array_index (_data_->_tmp73_, _data_->i);
			_data_->pkg = (PamacPackage*) _data_->_tmp74_;
			_data_->_tmp75_ = _data_->_vala1_listbox;
			_data_->_tmp76_ = _data_->pkg;
			pamac_transaction_gtk_add_build_to_summary (_data_->self, _data_->_tmp75_, _data_->_tmp76_);
			_data_->_tmp77_ = _data_->i;
			_data_->i = _data_->_tmp77_ + 1;
		}
		_data_->_tmp78_ = (GtkButton*) gtk_button_new_with_label (g_dgettext (NULL, "Edit build files"));
		g_object_ref_sink (_data_->_tmp78_);
		_data_->button = _data_->_tmp78_;
		_data_->_tmp79_ = _data_->button;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp79_, TRUE);
		_data_->_tmp80_ = _data_->button;
		gtk_widget_set_halign ((GtkWidget*) _data_->_tmp80_, GTK_ALIGN_END);
		_data_->_tmp81_ = _data_->button;
		gtk_widget_set_margin_top ((GtkWidget*) _data_->_tmp81_, 6);
		_data_->_tmp82_ = _data_->button;
		g_signal_connect_data (_data_->_tmp82_, "clicked", (GCallback) ____lambda12__gtk_button_clicked, block5_data_ref (_data_->_data5_), (GClosureNotify) block5_data_unref, 0);
		_data_->_tmp83_ = _data_->box;
		_data_->_tmp84_ = _data_->button;
		gtk_container_add ((GtkContainer*) _data_->_tmp83_, (GtkWidget*) _data_->_tmp84_);
		_g_object_unref0 (_data_->button);
		_g_object_unref0 (_data_->_vala1_listbox);
	}
	_data_->_tmp85_ = pamac_transaction_summary_get_to_install (_data_->summary);
	_data_->_tmp86_ = _data_->_tmp85_;
	_data_->pkgs = _data_->_tmp86_;
	_data_->_tmp87_ = _data_->pkgs;
	_data_->_tmp88_ = vala_g_ptr_array_get_length (_data_->_tmp87_);
	_data_->_tmp89_ = _data_->_tmp88_;
	_data_->length = (guint) _data_->_tmp89_;
	if (_data_->length > ((guint) 0)) {
		_data_->_tmp90_ = _data_->box;
		_data_->_tmp91_ = pamac_transaction_gtk_create_listbox (_data_->self, _data_->_tmp90_, "To install", _data_->length);
		_data_->_vala2_listbox = _data_->_tmp91_;
		_data_->_tmp92_ = _data_->pkgs;
		_data_->_tmp93_ = g_ptr_array_index (_data_->_tmp92_, (guint) 0);
		_data_->pkg = (PamacPackage*) _data_->_tmp93_;
		_data_->_tmp94_ = _data_->pkg;
		_data_->_tmp95_ = pamac_package_get_download_size (_data_->_tmp94_);
		_data_->_tmp96_ = _data_->_tmp95_;
		_data_->dsize += _data_->_tmp96_;
		_data_->_tmp97_ = _data_->_vala2_listbox;
		_data_->_tmp98_ = _data_->pkg;
		pamac_transaction_gtk_add_install_to_summary (_data_->self, _data_->_tmp97_, _data_->_tmp98_);
		_data_->i = (guint) 1;
		while (TRUE) {
			if (!(_data_->i < _data_->length)) {
				break;
			}
			_data_->_tmp99_ = _data_->pkgs;
			_data_->_tmp100_ = g_ptr_array_index (_data_->_tmp99_, _data_->i);
			_data_->pkg = (PamacPackage*) _data_->_tmp100_;
			_data_->_tmp101_ = _data_->pkg;
			_data_->_tmp102_ = pamac_package_get_download_size (_data_->_tmp101_);
			_data_->_tmp103_ = _data_->_tmp102_;
			_data_->dsize += _data_->_tmp103_;
			_data_->_tmp104_ = _data_->_vala2_listbox;
			_data_->_tmp105_ = _data_->pkg;
			pamac_transaction_gtk_add_install_to_summary (_data_->self, _data_->_tmp104_, _data_->_tmp105_);
			_data_->_tmp106_ = _data_->i;
			_data_->i = _data_->_tmp106_ + 1;
		}
		_g_object_unref0 (_data_->_vala2_listbox);
	}
	_data_->_tmp107_ = pamac_transaction_summary_get_to_reinstall (_data_->summary);
	_data_->_tmp108_ = _data_->_tmp107_;
	_data_->pkgs = _data_->_tmp108_;
	_data_->_tmp109_ = _data_->pkgs;
	_data_->_tmp110_ = vala_g_ptr_array_get_length (_data_->_tmp109_);
	_data_->_tmp111_ = _data_->_tmp110_;
	_data_->length = (guint) _data_->_tmp111_;
	if (_data_->length > ((guint) 0)) {
		_data_->_tmp112_ = _data_->box;
		_data_->_tmp113_ = pamac_transaction_gtk_create_listbox (_data_->self, _data_->_tmp112_, "To reinstall", _data_->length);
		_data_->_vala3_listbox = _data_->_tmp113_;
		_data_->_tmp114_ = _data_->pkgs;
		_data_->_tmp115_ = g_ptr_array_index (_data_->_tmp114_, (guint) 0);
		_data_->pkg = (PamacPackage*) _data_->_tmp115_;
		_data_->_tmp116_ = _data_->pkg;
		_data_->_tmp117_ = pamac_package_get_download_size (_data_->_tmp116_);
		_data_->_tmp118_ = _data_->_tmp117_;
		_data_->dsize += _data_->_tmp118_;
		_data_->_tmp119_ = _data_->_vala3_listbox;
		_data_->_tmp120_ = _data_->pkg;
		pamac_transaction_gtk_add_reinstall_to_summary (_data_->self, _data_->_tmp119_, _data_->_tmp120_);
		_data_->i = (guint) 1;
		while (TRUE) {
			if (!(_data_->i < _data_->length)) {
				break;
			}
			_data_->_tmp121_ = _data_->pkgs;
			_data_->_tmp122_ = g_ptr_array_index (_data_->_tmp121_, _data_->i);
			_data_->pkg = (PamacPackage*) _data_->_tmp122_;
			_data_->_tmp123_ = _data_->pkg;
			_data_->_tmp124_ = pamac_package_get_download_size (_data_->_tmp123_);
			_data_->_tmp125_ = _data_->_tmp124_;
			_data_->dsize += _data_->_tmp125_;
			_data_->_tmp126_ = _data_->_vala3_listbox;
			_data_->_tmp127_ = _data_->pkg;
			pamac_transaction_gtk_add_reinstall_to_summary (_data_->self, _data_->_tmp126_, _data_->_tmp127_);
			_data_->_tmp128_ = _data_->i;
			_data_->i = _data_->_tmp128_ + 1;
		}
		_g_object_unref0 (_data_->_vala3_listbox);
	}
	_data_->_tmp129_ = pamac_transaction_summary_get_to_upgrade (_data_->summary);
	_data_->_tmp130_ = _data_->_tmp129_;
	_data_->pkgs = _data_->_tmp130_;
	_data_->_tmp131_ = _data_->pkgs;
	_data_->_tmp132_ = vala_g_ptr_array_get_length (_data_->_tmp131_);
	_data_->_tmp133_ = _data_->_tmp132_;
	_data_->length = (guint) _data_->_tmp133_;
	if (_data_->length > ((guint) 0)) {
		_data_->_tmp134_ = _data_->self->priv->_no_confirm_upgrade;
		if (!_data_->_tmp134_) {
			_data_->_tmp135_ = _data_->box;
			_data_->_tmp136_ = pamac_transaction_gtk_create_listbox (_data_->self, _data_->_tmp135_, "To upgrade", _data_->length);
			_data_->_vala4_listbox = _data_->_tmp136_;
			_data_->_tmp137_ = _data_->pkgs;
			_data_->_tmp138_ = g_ptr_array_index (_data_->_tmp137_, (guint) 0);
			_data_->pkg = (PamacPackage*) _data_->_tmp138_;
			_data_->_tmp139_ = _data_->pkg;
			_data_->_tmp140_ = pamac_package_get_download_size (_data_->_tmp139_);
			_data_->_tmp141_ = _data_->_tmp140_;
			_data_->dsize += _data_->_tmp141_;
			_data_->_tmp142_ = _data_->_vala4_listbox;
			_data_->_tmp143_ = _data_->pkg;
			pamac_transaction_gtk_add_upgrade_to_summary (_data_->self, _data_->_tmp142_, _data_->_tmp143_);
			_data_->i = (guint) 1;
			while (TRUE) {
				if (!(_data_->i < _data_->length)) {
					break;
				}
				_data_->_tmp144_ = _data_->pkgs;
				_data_->_tmp145_ = g_ptr_array_index (_data_->_tmp144_, _data_->i);
				_data_->pkg = (PamacPackage*) _data_->_tmp145_;
				_data_->_tmp146_ = _data_->pkg;
				_data_->_tmp147_ = pamac_package_get_download_size (_data_->_tmp146_);
				_data_->_tmp148_ = _data_->_tmp147_;
				_data_->dsize += _data_->_tmp148_;
				_data_->_tmp149_ = _data_->_vala4_listbox;
				_data_->_tmp150_ = _data_->pkg;
				pamac_transaction_gtk_add_upgrade_to_summary (_data_->self, _data_->_tmp149_, _data_->_tmp150_);
				_data_->_tmp151_ = _data_->i;
				_data_->i = _data_->_tmp151_ + 1;
			}
			_g_object_unref0 (_data_->_vala4_listbox);
		}
	}
	if (_data_->dsize == ((guint64) 0)) {
		_data_->_tmp152_ = _data_->_data5_->transaction_sum_dialog;
		_data_->_tmp153_ = _data_->_tmp152_->top_label;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp153_, FALSE);
	} else {
		_data_->_tmp154_ = _data_->_data5_->transaction_sum_dialog;
		_data_->_tmp155_ = _data_->_tmp154_->top_label;
		_data_->_tmp156_ = g_format_size_full (_data_->dsize, G_FORMAT_SIZE_DEFAULT);
		_data_->_tmp157_ = _data_->_tmp156_;
		_data_->_tmp158_ = g_strdup_printf ("<b>%s: %s</b>", g_dgettext (NULL, "Total download size"), _data_->_tmp157_);
		_data_->_tmp159_ = _data_->_tmp158_;
		gtk_label_set_markup (_data_->_tmp155_, _data_->_tmp159_);
		_g_free0 (_data_->_tmp159_);
		_g_free0 (_data_->_tmp157_);
		_data_->_tmp160_ = _data_->_data5_->transaction_sum_dialog;
		_data_->_tmp161_ = _data_->_tmp160_->top_label;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp161_, TRUE);
	}
	if (pamac_transaction_gtk_transaction_summary_length (_data_->self) == ((guint) 0)) {
		_data_->_tmp162_ = (GtkLabel*) gtk_label_new (NULL);
		g_object_ref_sink (_data_->_tmp162_);
		_data_->label = _data_->_tmp162_;
		_data_->_tmp163_ = _data_->label;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp163_, TRUE);
		_data_->_tmp164_ = _data_->label;
		gtk_widget_set_halign ((GtkWidget*) _data_->_tmp164_, GTK_ALIGN_START);
		_data_->_tmp165_ = _data_->label;
		g_object_set (_data_->_tmp165_, "wrap", TRUE, NULL);
		_data_->_tmp166_ = _data_->label;
		gtk_widget_set_margin_top ((GtkWidget*) _data_->_tmp166_, 12);
		_data_->_tmp167_ = _data_->box;
		_data_->_tmp168_ = _data_->label;
		gtk_container_add ((GtkContainer*) _data_->_tmp167_, (GtkWidget*) _data_->_tmp168_);
		_data_->_tmp169_ = _data_->self->priv->warning_textbuffer;
		if (_data_->_tmp169_->len > ((gssize) 0)) {
			_data_->_tmp170_ = _data_->label;
			_data_->_tmp171_ = _data_->self->priv->warning_textbuffer;
			_data_->_tmp172_ = _data_->_tmp171_->str;
			gtk_label_set_label (_data_->_tmp170_, _data_->_tmp172_);
			_data_->_tmp173_ = g_string_new ("");
			_g_string_free0 (_data_->self->priv->warning_textbuffer);
			_data_->self->priv->warning_textbuffer = _data_->_tmp173_;
		} else {
			_data_->_tmp174_ = _data_->label;
			gtk_label_set_label (_data_->_tmp174_, g_dgettext (NULL, "Failed to prepare transaction"));
		}
		_data_->_tmp175_ = (GtkButton*) gtk_button_new_with_label (g_dgettext (NULL, "Edit build files"));
		g_object_ref_sink (_data_->_tmp175_);
		_data_->_vala1_button = _data_->_tmp175_;
		_data_->_tmp176_ = _data_->_vala1_button;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp176_, TRUE);
		_data_->_tmp177_ = _data_->_vala1_button;
		gtk_widget_set_margin_top ((GtkWidget*) _data_->_tmp177_, 6);
		_data_->_tmp178_ = _data_->_vala1_button;
		g_signal_connect_data (_data_->_tmp178_, "clicked", (GCallback) ____lambda13__gtk_button_clicked, block5_data_ref (_data_->_data5_), (GClosureNotify) block5_data_unref, 0);
		_data_->_tmp179_ = _data_->box;
		_data_->_tmp180_ = _data_->_vala1_button;
		gtk_container_add ((GtkContainer*) _data_->_tmp179_, (GtkWidget*) _data_->_tmp180_);
		_g_object_unref0 (_data_->_vala1_button);
		_g_object_unref0 (_data_->label);
	} else {
		pamac_transaction_gtk_show_warnings (_data_->self, TRUE);
	}
	_data_->_tmp181_ = _data_->_data5_->transaction_sum_dialog;
	_data_->_tmp182_ = _data_->_tmp181_->cancel_button;
	gtk_widget_grab_focus ((GtkWidget*) _data_->_tmp182_);
	_data_->_data5_->response = (gint) GTK_RESPONSE_CANCEL;
	_data_->_tmp183_ = _data_->_data5_->transaction_sum_dialog;
	g_signal_connect_data ((GtkDialog*) _data_->_tmp183_, "response", (GCallback) ___lambda16__gtk_dialog_response, block5_data_ref (_data_->_data5_), (GClosureNotify) block5_data_unref, 0);
	_data_->_tmp184_ = _data_->_data5_->transaction_sum_dialog;
	gtk_widget_show ((GtkWidget*) _data_->_tmp184_);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	if (_data_->_data5_->response == ((gint) GTK_RESPONSE_OK)) {
		g_signal_emit (_data_->self, pamac_transaction_gtk_signals[PAMAC_TRANSACTION_GTK_TRANSACTION_SUM_POPULATED_SIGNAL], 0);
	}
	_data_->result = _data_->_data5_->response;
	_g_object_unref0 (_data_->remove_listbox);
	_g_object_unref0 (_data_->application_window);
	block5_data_unref (_data_->_data5_);
	_data_->_data5_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_gtk_real_edit_build_files_data_free (gpointer _data)
{
	PamacTransactionGtkEditBuildFilesData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->pkgnames);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkEditBuildFilesData, _data_);
}

static void
pamac_transaction_gtk_real_edit_build_files (PamacTransaction* base,
                                             GPtrArray* pkgnames,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	PamacTransactionGtk * self;
	PamacTransactionGtkEditBuildFilesData* _data_;
	PamacTransactionGtk* _tmp0_;
	GPtrArray* _tmp1_;
	g_return_if_fail (pkgnames != NULL);
	self = (PamacTransactionGtk*) base;
	_data_ = g_slice_new0 (PamacTransactionGtkEditBuildFilesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_real_edit_build_files_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_ptr_array_ref0 (pkgnames);
	_g_ptr_array_unref0 (_data_->pkgnames);
	_data_->pkgnames = _tmp1_;
	pamac_transaction_gtk_real_edit_build_files_co (_data_);
}

static void
pamac_transaction_gtk_edit_build_files_finish (PamacTransaction* base,
                                               GAsyncResult* _res_)
{
	PamacTransactionGtkEditBuildFilesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block6Data*
block6_data_ref (Block6Data* _data6_)
{
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}

static void
block6_data_unref (void * _userdata_)
{
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		PamacTransactionGtk* self;
		self = _data6_->self;
		_g_object_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}

static Block7Data*
block7_data_ref (Block7Data* _data7_)
{
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}

static void
block7_data_unref (void * _userdata_)
{
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		PamacTransactionGtk* self;
		self = _data7_->_data6_->self;
		block6_data_unref (_data7_->_data6_);
		_data7_->_data6_ = NULL;
		g_slice_free (Block7Data, _data7_);
	}
}

static void
pamac_transaction_gtk_edit_build_files_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	PamacTransactionGtkEditBuildFilesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_gtk_real_edit_build_files_co (_data_);
}

static gboolean
_pamac_transaction_gtk_real_edit_build_files_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_gtk_real_edit_build_files_co (self);
	return result;
}

static void
____lambda17_ (Block7Data* _data7_,
               gint res)
{
	Block6Data* _data6_;
	PamacTransactionGtk* self;
	_data6_ = _data7_->_data6_;
	self = _data6_->self;
	_data7_->response = res;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _pamac_transaction_gtk_real_edit_build_files_co_gsource_func, _data6_->_async_data_, NULL);
}

static void
_____lambda17__gtk_dialog_response (GtkDialog* _sender,
                                    gint response_id,
                                    gpointer self)
{
	____lambda17_ (self, response_id);
}

static gboolean
pamac_transaction_gtk_real_edit_build_files_co (PamacTransactionGtkEditBuildFilesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data6_ = g_slice_new0 (Block6Data);
	_data_->_data6_->_ref_count_ = 1;
	_data_->_data6_->self = g_object_ref (_data_->self);
	_data_->_data6_->_async_data_ = _data_;
	{
		_data_->pkgname_collection = _data_->pkgnames;
		for (_data_->pkgname_index = 0; _data_->pkgname_index < _data_->pkgname_collection->len; _data_->pkgname_index = _data_->pkgname_index + 1) {
			_data_->pkgname = (const gchar*) g_ptr_array_index (_data_->pkgname_collection, _data_->pkgname_index);
			{
				_data_->_data7_ = g_slice_new0 (Block7Data);
				_data_->_data7_->_ref_count_ = 1;
				_data_->_data7_->_data6_ = block6_data_ref (_data_->_data6_);
				_data_->_tmp0_ = _data_->pkgname;
				_data_->_tmp1_ = g_strdup_printf ("Edit %s build files", _data_->_tmp0_);
				_data_->_tmp2_ = _data_->_tmp1_;
				_data_->_tmp3_ = g_strdup (g_dgettext (NULL, _data_->_tmp2_));
				_data_->_tmp4_ = _data_->_tmp3_;
				_g_free0 (_data_->_tmp2_);
				_data_->action = _data_->_tmp4_;
				_data_->_tmp5_ = _data_->action;
				pamac_transaction_gtk_display_action (_data_->self, _data_->_tmp5_);
				_data_->_tmp6_ = _data_->pkgname;
				_data_->_state_ = 1;
				pamac_transaction_gtk_populate_build_files_async (_data_->self, _data_->_tmp6_, FALSE, FALSE, pamac_transaction_gtk_edit_build_files_ready, _data_);
				return FALSE;
				_state_1:
				_data_->success = pamac_transaction_gtk_populate_build_files_finish (_data_->self, _data_->_res_);
				if (!_data_->success) {
					_g_free0 (_data_->action);
					block7_data_unref (_data_->_data7_);
					_data_->_data7_ = NULL;
					continue;
				}
				_data_->_tmp7_ = _data_->self->build_files_notebook;
				_data_->_tmp8_ = gtk_widget_get_parent ((GtkWidget*) _data_->_tmp7_);
				_data_->manager_box = G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp8_, gtk_box_get_type ()) ? ((GtkBox*) _data_->_tmp8_) : NULL;
				_data_->_tmp9_ = _data_->manager_box;
				_data_->_tmp10_ = _data_->self->build_files_notebook;
				gtk_container_remove ((GtkContainer*) _data_->_tmp9_, (GtkWidget*) _data_->_tmp10_);
				_data_->flags = GTK_DIALOG_MODAL;
				_data_->_tmp11_ = gtk_settings_get_default ();
				_data_->_tmp12_ = 0;
				g_object_get ((GObject*) _data_->_tmp11_, "gtk-dialogs-use-header", &_data_->_tmp12_, NULL);
				_data_->use_header_bar = _data_->_tmp12_;
				if (_data_->use_header_bar == 1) {
					_data_->flags |= GTK_DIALOG_USE_HEADER_BAR;
				}
				_data_->_tmp13_ = _data_->self->priv->_application;
				_data_->_tmp14_ = gtk_application_get_active_window (_data_->_tmp13_);
				_data_->_tmp15_ = _data_->_tmp14_;
				_data_->_tmp16_ = _g_object_ref0 (_data_->_tmp15_);
				_data_->application_window = _data_->_tmp16_;
				_data_->_tmp17_ = _data_->action;
				_data_->_tmp18_ = _data_->application_window;
				_data_->_tmp19_ = (GtkDialog*) gtk_dialog_new_with_buttons (_data_->_tmp17_, _data_->_tmp18_, _data_->flags, NULL);
				g_object_ref_sink (_data_->_tmp19_);
				_data_->dialog = _data_->_tmp19_;
				_data_->_tmp20_ = _data_->dialog;
				gtk_window_set_icon_name ((GtkWindow*) _data_->_tmp20_, "system-software-install");
				_data_->_tmp21_ = _data_->dialog;
				gtk_widget_set_margin_top ((GtkWidget*) _data_->_tmp21_, 6);
				_data_->_tmp22_ = _data_->dialog;
				gtk_widget_set_margin_bottom ((GtkWidget*) _data_->_tmp22_, 6);
				_data_->_tmp23_ = _data_->dialog;
				gtk_widget_set_margin_start ((GtkWidget*) _data_->_tmp23_, 6);
				_data_->_tmp24_ = _data_->dialog;
				gtk_widget_set_margin_end ((GtkWidget*) _data_->_tmp24_, 6);
				_data_->_tmp25_ = _data_->dialog;
				gtk_dialog_add_button (_data_->_tmp25_, g_dgettext (NULL, "Save"), (gint) GTK_RESPONSE_CLOSE);
				_data_->_tmp26_ = _data_->dialog;
				_data_->_tmp27_ = gtk_dialog_add_button (_data_->_tmp26_, g_dgettext (NULL, "_Cancel"), (gint) GTK_RESPONSE_CANCEL);
				_data_->widget = _data_->_tmp27_;
				_data_->_tmp28_ = _data_->widget;
				gtk_widget_grab_default (_data_->_tmp28_);
				_data_->_tmp29_ = _data_->dialog;
				_data_->_tmp30_ = gtk_dialog_get_content_area (_data_->_tmp29_);
				_data_->box = _data_->_tmp30_;
				_data_->_tmp31_ = _data_->box;
				gtk_box_set_spacing (_data_->_tmp31_, 6);
				_data_->_tmp32_ = _data_->box;
				_data_->_tmp33_ = _data_->self->build_files_notebook;
				gtk_container_add ((GtkContainer*) _data_->_tmp32_, (GtkWidget*) _data_->_tmp33_);
				_data_->_tmp34_ = _data_->dialog;
				g_object_set ((GtkWindow*) _data_->_tmp34_, "default-width", 700, NULL);
				_data_->_tmp35_ = _data_->dialog;
				g_object_set ((GtkWindow*) _data_->_tmp35_, "default-height", 500, NULL);
				_data_->_data7_->response = (gint) GTK_RESPONSE_CANCEL;
				_data_->_tmp36_ = _data_->dialog;
				g_signal_connect_data (_data_->_tmp36_, "response", (GCallback) _____lambda17__gtk_dialog_response, block7_data_ref (_data_->_data7_), (GClosureNotify) block7_data_unref, 0);
				_data_->_tmp37_ = _data_->dialog;
				gtk_widget_show ((GtkWidget*) _data_->_tmp37_);
				_data_->_state_ = 2;
				return FALSE;
				_state_2:
				;
				_data_->_tmp38_ = _data_->box;
				_data_->_tmp39_ = _data_->self->build_files_notebook;
				gtk_container_remove ((GtkContainer*) _data_->_tmp38_, (GtkWidget*) _data_->_tmp39_);
				_data_->_tmp40_ = _data_->dialog;
				gtk_widget_destroy ((GtkWidget*) _data_->_tmp40_);
				_data_->_tmp41_ = _data_->manager_box;
				_data_->_tmp42_ = _data_->self->build_files_notebook;
				gtk_container_add ((GtkContainer*) _data_->_tmp41_, (GtkWidget*) _data_->_tmp42_);
				if (_data_->_data7_->response == ((gint) GTK_RESPONSE_CLOSE)) {
					_data_->_tmp43_ = _data_->pkgname;
					_data_->_state_ = 3;
					pamac_transaction_gtk_save_build_files_async (_data_->self, _data_->_tmp43_, pamac_transaction_gtk_edit_build_files_ready, _data_);
					return FALSE;
					_state_3:
					pamac_transaction_gtk_save_build_files_finish (_data_->self, _data_->_res_);
				}
				_g_object_unref0 (_data_->dialog);
				_g_object_unref0 (_data_->application_window);
				_g_free0 (_data_->action);
				block7_data_unref (_data_->_data7_);
				_data_->_data7_ = NULL;
			}
		}
	}
	block6_data_unref (_data_->_data6_);
	_data_->_data6_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_gtk_create_build_files_tab_data_free (gpointer _data)
{
	PamacTransactionGtkCreateBuildFilesTabData* _data_;
	_data_ = _data;
	_g_free0 (_data_->filename);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkCreateBuildFilesTabData, _data_);
}

static void
pamac_transaction_gtk_create_build_files_tab (PamacTransactionGtk* self,
                                              const gchar* filename,
                                              gboolean editable,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	PamacTransactionGtkCreateBuildFilesTabData* _data_;
	PamacTransactionGtk* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (filename != NULL);
	_data_ = g_slice_new0 (PamacTransactionGtkCreateBuildFilesTabData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_create_build_files_tab_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (filename);
	_g_free0 (_data_->filename);
	_data_->filename = _tmp1_;
	_data_->editable = editable;
	pamac_transaction_gtk_create_build_files_tab_co (_data_);
}

static void
pamac_transaction_gtk_create_build_files_tab_finish (PamacTransactionGtk* self,
                                                     GAsyncResult* _res_)
{
	PamacTransactionGtkCreateBuildFilesTabData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
pamac_transaction_gtk_create_build_files_tab_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_)
{
	PamacTransactionGtkCreateBuildFilesTabData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_gtk_create_build_files_tab_co (_data_);
}

static gboolean
pamac_transaction_gtk_create_build_files_tab_co (PamacTransactionGtkCreateBuildFilesTabData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_file_new_for_path (_data_->filename);
	_data_->file = _data_->_tmp0_;
	{
		_data_->_tmp1_ = g_string_new ("");
		_data_->text = _data_->_tmp1_;
		_data_->_tmp2_ = _data_->file;
		_data_->_state_ = 1;
		g_file_read_async (_data_->_tmp2_, G_PRIORITY_DEFAULT, NULL, pamac_transaction_gtk_create_build_files_tab_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp3_ = g_file_read_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error0_);
		_data_->fis = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_string_free0 (_data_->text);
			goto __catch0_g_error;
		}
		_data_->_tmp4_ = _data_->fis;
		_data_->_tmp5_ = g_data_input_stream_new ((GInputStream*) _data_->_tmp4_);
		_data_->dis = _data_->_tmp5_;
		while (TRUE) {
			_data_->_tmp7_ = _data_->dis;
			_data_->_state_ = 2;
			g_data_input_stream_read_line_async (_data_->_tmp7_, G_PRIORITY_DEFAULT, NULL, pamac_transaction_gtk_create_build_files_tab_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp8_ = g_data_input_stream_read_line_finish (_data_->_tmp7_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_tmp6_ = _data_->_tmp8_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_free0 (_data_->line);
				_g_object_unref0 (_data_->dis);
				_g_object_unref0 (_data_->fis);
				_g_string_free0 (_data_->text);
				goto __catch0_g_error;
			}
			_data_->_tmp9_ = _data_->_tmp6_;
			_data_->_tmp6_ = NULL;
			_g_free0 (_data_->line);
			_data_->line = _data_->_tmp9_;
			_data_->_tmp10_ = _data_->line;
			if (!(_data_->_tmp10_ != NULL)) {
				_g_free0 (_data_->_tmp6_);
				break;
			}
			_data_->_tmp11_ = _data_->text;
			_data_->_tmp12_ = _data_->line;
			g_string_append (_data_->_tmp11_, _data_->_tmp12_);
			_data_->_tmp13_ = _data_->text;
			g_string_append (_data_->_tmp13_, "\n");
			_g_free0 (_data_->_tmp6_);
		}
		_data_->_tmp14_ = _data_->text;
		_data_->_tmp15_ = _data_->_tmp14_->str;
		if (!g_utf8_validate (_data_->_tmp15_, (gssize) -1, NULL)) {
			_g_free0 (_data_->line);
			_g_object_unref0 (_data_->dis);
			_g_object_unref0 (_data_->fis);
			_g_string_free0 (_data_->text);
			_g_object_unref0 (_data_->file);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp16_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
		g_object_ref_sink (_data_->_tmp16_);
		_data_->scrolledwindow = _data_->_tmp16_;
		_data_->_tmp17_ = _data_->scrolledwindow;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp17_, TRUE);
		_data_->_tmp18_ = (GtkTextView*) gtk_text_view_new ();
		g_object_ref_sink (_data_->_tmp18_);
		_data_->textview = _data_->_tmp18_;
		_data_->_tmp19_ = _data_->textview;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp19_, TRUE);
		_data_->_tmp20_ = _data_->textview;
		gtk_text_view_set_editable (_data_->_tmp20_, _data_->editable);
		_data_->_tmp21_ = _data_->textview;
		gtk_text_view_set_wrap_mode (_data_->_tmp21_, GTK_WRAP_NONE);
		_data_->_tmp22_ = _data_->textview;
		gtk_text_view_set_monospace (_data_->_tmp22_, TRUE);
		_data_->_tmp23_ = _data_->textview;
		gtk_text_view_set_input_hints (_data_->_tmp23_, GTK_INPUT_HINT_NO_EMOJI);
		_data_->_tmp24_ = _data_->textview;
		gtk_text_view_set_top_margin (_data_->_tmp24_, 8);
		_data_->_tmp25_ = _data_->textview;
		gtk_text_view_set_bottom_margin (_data_->_tmp25_, 8);
		_data_->_tmp26_ = _data_->textview;
		gtk_text_view_set_left_margin (_data_->_tmp26_, 8);
		_data_->_tmp27_ = _data_->textview;
		gtk_text_view_set_right_margin (_data_->_tmp27_, 8);
		_data_->_tmp28_ = _data_->textview;
		_data_->_tmp29_ = gtk_text_view_get_buffer (_data_->_tmp28_);
		_data_->_tmp30_ = _data_->_tmp29_;
		_data_->_tmp31_ = _data_->text;
		_data_->_tmp32_ = _data_->_tmp31_->str;
		_data_->_tmp33_ = _data_->text;
		gtk_text_buffer_set_text (_data_->_tmp30_, _data_->_tmp32_, (gint) _data_->_tmp33_->len);
		_data_->_tmp34_ = _data_->textview;
		_data_->_tmp35_ = gtk_text_view_get_buffer (_data_->_tmp34_);
		_data_->_tmp36_ = _data_->_tmp35_;
		gtk_text_buffer_set_modified (_data_->_tmp36_, FALSE);
		if (_data_->editable) {
			_data_->_tmp37_ = _data_->textview;
			_data_->_tmp38_ = gtk_text_view_get_buffer (_data_->_tmp37_);
			_data_->_tmp39_ = _data_->_tmp38_;
			memset (&_data_->_tmp40_, 0, sizeof (GtkTextIter));
			gtk_text_buffer_get_start_iter (_data_->_tmp39_, &_data_->_tmp40_);
			_data_->iter = _data_->_tmp40_;
			_data_->_tmp41_ = _data_->textview;
			_data_->_tmp42_ = gtk_text_view_get_buffer (_data_->_tmp41_);
			_data_->_tmp43_ = _data_->_tmp42_;
			_data_->_tmp44_ = _data_->iter;
			gtk_text_buffer_place_cursor (_data_->_tmp43_, &_data_->_tmp44_);
		} else {
			_data_->_tmp45_ = _data_->textview;
			gtk_text_view_set_cursor_visible (_data_->_tmp45_, FALSE);
		}
		_data_->_tmp46_ = _data_->scrolledwindow;
		_data_->_tmp47_ = _data_->textview;
		gtk_container_add ((GtkContainer*) _data_->_tmp46_, (GtkWidget*) _data_->_tmp47_);
		_data_->_tmp48_ = _data_->file;
		_data_->_tmp49_ = g_file_get_basename (_data_->_tmp48_);
		_data_->_tmp50_ = _data_->_tmp49_;
		_data_->_tmp51_ = (GtkLabel*) gtk_label_new (_data_->_tmp50_);
		g_object_ref_sink (_data_->_tmp51_);
		_data_->_tmp52_ = _data_->_tmp51_;
		_g_free0 (_data_->_tmp50_);
		_data_->label = _data_->_tmp52_;
		_data_->_tmp53_ = _data_->label;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp53_, TRUE);
		_data_->_tmp54_ = _data_->self->build_files_notebook;
		_data_->_tmp55_ = _data_->scrolledwindow;
		_data_->_tmp56_ = _data_->label;
		gtk_notebook_append_page (_data_->_tmp54_, (GtkWidget*) _data_->_tmp55_, (GtkWidget*) _data_->_tmp56_);
		_g_object_unref0 (_data_->label);
		_g_object_unref0 (_data_->textview);
		_g_object_unref0 (_data_->scrolledwindow);
		_g_free0 (_data_->line);
		_g_object_unref0 (_data_->dis);
		_g_object_unref0 (_data_->fis);
		_g_string_free0 (_data_->text);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp57_ = _data_->e;
		_data_->_tmp58_ = _data_->_tmp57_->message;
		g_warning ("transaction-gtk.vala:961: %s", _data_->_tmp58_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->file);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_gtk_populate_build_files_async_data_free (gpointer _data)
{
	PamacTransactionGtkPopulateBuildFilesAsyncData* _data_;
	_data_ = _data;
	_g_free0 (_data_->pkgname);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkPopulateBuildFilesAsyncData, _data_);
}

void
pamac_transaction_gtk_populate_build_files_async (PamacTransactionGtk* self,
                                                  const gchar* pkgname,
                                                  gboolean clone,
                                                  gboolean overwrite,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	PamacTransactionGtkPopulateBuildFilesAsyncData* _data_;
	PamacTransactionGtk* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pkgname != NULL);
	_data_ = g_slice_new0 (PamacTransactionGtkPopulateBuildFilesAsyncData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_populate_build_files_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (pkgname);
	_g_free0 (_data_->pkgname);
	_data_->pkgname = _tmp1_;
	_data_->clone = clone;
	_data_->overwrite = overwrite;
	pamac_transaction_gtk_populate_build_files_async_co (_data_);
}

gboolean
pamac_transaction_gtk_populate_build_files_finish (PamacTransactionGtk* self,
                                                   GAsyncResult* _res_)
{
	gboolean result;
	PamacTransactionGtkPopulateBuildFilesAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
pamac_transaction_gtk_populate_build_files_async_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_)
{
	PamacTransactionGtkPopulateBuildFilesAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_gtk_populate_build_files_async_co (_data_);
}

static gboolean
pamac_transaction_gtk_populate_build_files_async_co (PamacTransactionGtkPopulateBuildFilesAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->build_files_notebook;
	_data_->num_pages = gtk_notebook_get_n_pages (_data_->_tmp0_);
	{
		_data_->i = _data_->num_pages - 1;
		{
			_data_->_tmp1_ = TRUE;
			while (TRUE) {
				if (!_data_->_tmp1_) {
					_data_->_tmp2_ = _data_->i;
					_data_->i = _data_->_tmp2_ - 1;
				}
				_data_->_tmp1_ = FALSE;
				if (!(_data_->i >= 0)) {
					break;
				}
				_data_->_tmp3_ = _data_->self->build_files_notebook;
				gtk_notebook_remove_page (_data_->_tmp3_, _data_->i);
			}
		}
	}
	if (_data_->clone) {
		_data_->_tmp4_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_state_ = 1;
		pamac_database_clone_build_files_async (_data_->_tmp5_, _data_->pkgname, _data_->overwrite, NULL, pamac_transaction_gtk_populate_build_files_async_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp6_ = pamac_database_clone_build_files_finish (_data_->_tmp5_, _data_->_res_);
		_data_->clone_dir = _data_->_tmp6_;
		_data_->_tmp7_ = _data_->clone_dir;
		if (_data_->_tmp7_ == NULL) {
			_data_->result = FALSE;
			_g_object_unref0 (_data_->clone_dir);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_object_unref0 (_data_->clone_dir);
	}
	_data_->_state_ = 2;
	pamac_transaction_get_build_files_async ((PamacTransaction*) _data_->self, _data_->pkgname, pamac_transaction_gtk_populate_build_files_async_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp8_ = pamac_transaction_get_build_files_finish ((PamacTransaction*) _data_->self, _data_->_res_);
	_data_->file_paths = _data_->_tmp8_;
	_data_->_tmp9_ = _data_->file_paths;
	_data_->_tmp10_ = vala_g_ptr_array_get_length (_data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	if (_data_->_tmp11_ == 0) {
		_data_->result = FALSE;
		_g_ptr_array_unref0 (_data_->file_paths);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp12_ = _data_->file_paths;
	{
		_data_->path_collection = _data_->_tmp12_;
		for (_data_->path_index = 0; _data_->path_index < _data_->path_collection->len; _data_->path_index = _data_->path_index + 1) {
			_data_->path = (const gchar*) g_ptr_array_index (_data_->path_collection, _data_->path_index);
			{
				_data_->_tmp13_ = _data_->path;
				if (string_contains (_data_->_tmp13_, "PKGBUILD")) {
					_data_->_tmp14_ = _data_->path;
					_data_->_state_ = 3;
					pamac_transaction_gtk_create_build_files_tab (_data_->self, _data_->_tmp14_, TRUE, pamac_transaction_gtk_populate_build_files_async_ready, _data_);
					return FALSE;
					_state_3:
					pamac_transaction_gtk_create_build_files_tab_finish (_data_->self, _data_->_res_);
					_data_->_tmp16_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
					_data_->_tmp17_ = _data_->_tmp16_;
					_data_->_tmp18_ = pamac_database_get_config (_data_->_tmp17_);
					_data_->_tmp19_ = _data_->_tmp18_;
					_data_->_tmp20_ = pamac_config_get_aur_build_dir (_data_->_tmp19_);
					_data_->_tmp21_ = _data_->_tmp20_;
					if (g_strcmp0 (_data_->_tmp21_, "/var/tmp") == 0) {
						_data_->_tmp15_ = TRUE;
					} else {
						_data_->_tmp22_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
						_data_->_tmp23_ = _data_->_tmp22_;
						_data_->_tmp24_ = pamac_database_get_config (_data_->_tmp23_);
						_data_->_tmp25_ = _data_->_tmp24_;
						_data_->_tmp26_ = pamac_config_get_aur_build_dir (_data_->_tmp25_);
						_data_->_tmp27_ = _data_->_tmp26_;
						_data_->_tmp15_ = g_strcmp0 (_data_->_tmp27_, "/tmp") == 0;
					}
					if (_data_->_tmp15_) {
						_data_->_tmp28_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
						_data_->_tmp29_ = _data_->_tmp28_;
						_data_->_tmp30_ = pamac_database_get_config (_data_->_tmp29_);
						_data_->_tmp31_ = _data_->_tmp30_;
						_data_->_tmp32_ = pamac_config_get_aur_build_dir (_data_->_tmp31_);
						_data_->_tmp33_ = _data_->_tmp32_;
						_data_->_tmp34_ = g_get_user_name ();
						_data_->_tmp35_ = g_strdup_printf ("pamac-build-%s", _data_->_tmp34_);
						_data_->_tmp36_ = _data_->_tmp35_;
						_data_->_tmp37_ = g_build_filename (_data_->_tmp33_, _data_->_tmp36_, _data_->pkgname, "diff", NULL);
						_g_free0 (_data_->diff_path);
						_data_->diff_path = _data_->_tmp37_;
						_g_free0 (_data_->_tmp36_);
					} else {
						_data_->_tmp38_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
						_data_->_tmp39_ = _data_->_tmp38_;
						_data_->_tmp40_ = pamac_database_get_config (_data_->_tmp39_);
						_data_->_tmp41_ = _data_->_tmp40_;
						_data_->_tmp42_ = pamac_config_get_aur_build_dir (_data_->_tmp41_);
						_data_->_tmp43_ = _data_->_tmp42_;
						_data_->_tmp44_ = g_build_filename (_data_->_tmp43_, _data_->pkgname, "diff", NULL);
						_g_free0 (_data_->diff_path);
						_data_->diff_path = _data_->_tmp44_;
					}
					_data_->_tmp45_ = _data_->diff_path;
					_data_->_tmp46_ = g_file_new_for_path (_data_->_tmp45_);
					_data_->diff_file = _data_->_tmp46_;
					_data_->_tmp47_ = _data_->diff_file;
					if (g_file_query_exists (_data_->_tmp47_, NULL)) {
						_data_->_tmp48_ = _data_->diff_path;
						_data_->_state_ = 4;
						pamac_transaction_gtk_create_build_files_tab (_data_->self, _data_->_tmp48_, FALSE, pamac_transaction_gtk_populate_build_files_async_ready, _data_);
						return FALSE;
						_state_4:
						pamac_transaction_gtk_create_build_files_tab_finish (_data_->self, _data_->_res_);
					}
					_g_object_unref0 (_data_->diff_file);
					_g_free0 (_data_->diff_path);
				} else {
					_data_->_tmp49_ = _data_->path;
					_data_->_state_ = 5;
					pamac_transaction_gtk_create_build_files_tab (_data_->self, _data_->_tmp49_, TRUE, pamac_transaction_gtk_populate_build_files_async_ready, _data_);
					return FALSE;
					_state_5:
					pamac_transaction_gtk_create_build_files_tab_finish (_data_->self, _data_->_res_);
				}
			}
		}
	}
	_data_->result = TRUE;
	_g_ptr_array_unref0 (_data_->file_paths);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_gtk_save_build_files_async_data_free (gpointer _data)
{
	PamacTransactionGtkSaveBuildFilesAsyncData* _data_;
	_data_ = _data;
	_g_free0 (_data_->pkgname);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkSaveBuildFilesAsyncData, _data_);
}

void
pamac_transaction_gtk_save_build_files_async (PamacTransactionGtk* self,
                                              const gchar* pkgname,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	PamacTransactionGtkSaveBuildFilesAsyncData* _data_;
	PamacTransactionGtk* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pkgname != NULL);
	_data_ = g_slice_new0 (PamacTransactionGtkSaveBuildFilesAsyncData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_save_build_files_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (pkgname);
	_g_free0 (_data_->pkgname);
	_data_->pkgname = _tmp1_;
	pamac_transaction_gtk_save_build_files_async_co (_data_);
}

void
pamac_transaction_gtk_save_build_files_finish (PamacTransactionGtk* self,
                                               GAsyncResult* _res_)
{
	PamacTransactionGtkSaveBuildFilesAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
pamac_transaction_gtk_save_build_files_async_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_)
{
	PamacTransactionGtkSaveBuildFilesAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_gtk_save_build_files_async_co (_data_);
}

static guint8*
string_get_data (const gchar* self,
                 gint* result_length1)
{
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	g_return_val_if_fail (self != NULL, NULL);
	res = (guint8*) self;
	res_length1 = -1;
	_res_size_ = res_length1;
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	res_length1 = (gint) _tmp1_;
	_tmp2_ = res;
	_tmp2__length1 = res_length1;
	if (result_length1) {
		*result_length1 = _tmp2__length1;
	}
	result = _tmp2_;
	return result;
}

static gboolean
pamac_transaction_gtk_save_build_files_async_co (PamacTransactionGtkSaveBuildFilesAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->build_files_notebook;
	_data_->num_pages = gtk_notebook_get_n_pages (_data_->_tmp0_);
	_data_->index = 0;
	while (TRUE) {
		if (!(_data_->index < _data_->num_pages)) {
			break;
		}
		_data_->_tmp1_ = _data_->self->build_files_notebook;
		_data_->_tmp2_ = gtk_notebook_get_nth_page (_data_->_tmp1_, _data_->index);
		_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
		_data_->child = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->child;
		_data_->_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp4_, gtk_scrolled_window_get_type ()) ? ((GtkScrolledWindow*) _data_->_tmp4_) : NULL);
		_data_->scrolled_window = _data_->_tmp5_;
		_data_->_tmp6_ = _data_->scrolled_window;
		_data_->_tmp7_ = gtk_bin_get_child ((GtkBin*) _data_->_tmp6_);
		_data_->_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp7_, gtk_text_view_get_type ()) ? ((GtkTextView*) _data_->_tmp7_) : NULL);
		_data_->textview = _data_->_tmp8_;
		_data_->_tmp9_ = _data_->textview;
		_data_->_tmp10_ = gtk_text_view_get_buffer (_data_->_tmp9_);
		_data_->_tmp11_ = _data_->_tmp10_;
		if (gtk_text_buffer_get_modified (_data_->_tmp11_) == TRUE) {
			_data_->_tmp13_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
			_data_->_tmp14_ = _data_->_tmp13_;
			_data_->_tmp15_ = pamac_database_get_config (_data_->_tmp14_);
			_data_->_tmp16_ = _data_->_tmp15_;
			_data_->_tmp17_ = pamac_config_get_aur_build_dir (_data_->_tmp16_);
			_data_->_tmp18_ = _data_->_tmp17_;
			if (g_strcmp0 (_data_->_tmp18_, "/var/tmp") == 0) {
				_data_->_tmp12_ = TRUE;
			} else {
				_data_->_tmp19_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
				_data_->_tmp20_ = _data_->_tmp19_;
				_data_->_tmp21_ = pamac_database_get_config (_data_->_tmp20_);
				_data_->_tmp22_ = _data_->_tmp21_;
				_data_->_tmp23_ = pamac_config_get_aur_build_dir (_data_->_tmp22_);
				_data_->_tmp24_ = _data_->_tmp23_;
				_data_->_tmp12_ = g_strcmp0 (_data_->_tmp24_, "/tmp") == 0;
			}
			if (_data_->_tmp12_) {
				_data_->_tmp25_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
				_data_->_tmp26_ = _data_->_tmp25_;
				_data_->_tmp27_ = pamac_database_get_config (_data_->_tmp26_);
				_data_->_tmp28_ = _data_->_tmp27_;
				_data_->_tmp29_ = pamac_config_get_aur_build_dir (_data_->_tmp28_);
				_data_->_tmp30_ = _data_->_tmp29_;
				_data_->_tmp31_ = g_get_user_name ();
				_data_->_tmp32_ = g_strdup_printf ("pamac-build-%s", _data_->_tmp31_);
				_data_->_tmp33_ = _data_->_tmp32_;
				_data_->_tmp34_ = _data_->self->build_files_notebook;
				_data_->_tmp35_ = _data_->child;
				_data_->_tmp36_ = gtk_notebook_get_tab_label_text (_data_->_tmp34_, _data_->_tmp35_);
				_data_->_tmp37_ = g_build_filename (_data_->_tmp30_, _data_->_tmp33_, _data_->pkgname, _data_->_tmp36_, NULL);
				_g_free0 (_data_->file_name);
				_data_->file_name = _data_->_tmp37_;
				_g_free0 (_data_->_tmp33_);
			} else {
				_data_->_tmp38_ = pamac_transaction_get_database ((PamacTransaction*) _data_->self);
				_data_->_tmp39_ = _data_->_tmp38_;
				_data_->_tmp40_ = pamac_database_get_config (_data_->_tmp39_);
				_data_->_tmp41_ = _data_->_tmp40_;
				_data_->_tmp42_ = pamac_config_get_aur_build_dir (_data_->_tmp41_);
				_data_->_tmp43_ = _data_->_tmp42_;
				_data_->_tmp44_ = _data_->self->build_files_notebook;
				_data_->_tmp45_ = _data_->child;
				_data_->_tmp46_ = gtk_notebook_get_tab_label_text (_data_->_tmp44_, _data_->_tmp45_);
				_data_->_tmp47_ = g_build_filename (_data_->_tmp43_, _data_->pkgname, _data_->_tmp46_, NULL);
				_g_free0 (_data_->file_name);
				_data_->file_name = _data_->_tmp47_;
			}
			_data_->_tmp48_ = _data_->file_name;
			_data_->_tmp49_ = g_file_new_for_path (_data_->_tmp48_);
			_data_->file = _data_->_tmp49_;
			_data_->_tmp50_ = _data_->textview;
			_data_->_tmp51_ = gtk_text_view_get_buffer (_data_->_tmp50_);
			_data_->_tmp52_ = _data_->_tmp51_;
			memset (&_data_->_tmp53_, 0, sizeof (GtkTextIter));
			gtk_text_buffer_get_start_iter (_data_->_tmp52_, &_data_->_tmp53_);
			_data_->start_iter = _data_->_tmp53_;
			_data_->_tmp54_ = _data_->textview;
			_data_->_tmp55_ = gtk_text_view_get_buffer (_data_->_tmp54_);
			_data_->_tmp56_ = _data_->_tmp55_;
			memset (&_data_->_tmp57_, 0, sizeof (GtkTextIter));
			gtk_text_buffer_get_end_iter (_data_->_tmp56_, &_data_->_tmp57_);
			_data_->end_iter = _data_->_tmp57_;
			{
				_data_->_tmp58_ = _data_->file;
				_data_->_state_ = 1;
				g_file_delete_async (_data_->_tmp58_, G_PRIORITY_DEFAULT, NULL, pamac_transaction_gtk_save_build_files_async_ready, _data_);
				return FALSE;
				_state_1:
				g_file_delete_finish (_data_->_tmp58_, _data_->_res_, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				_data_->_tmp59_ = _data_->file;
				_data_->_state_ = 2;
				g_file_create_async (_data_->_tmp59_, G_FILE_CREATE_NONE, G_PRIORITY_DEFAULT, NULL, pamac_transaction_gtk_save_build_files_async_ready, _data_);
				return FALSE;
				_state_2:
				_data_->_tmp60_ = g_file_create_finish (_data_->_tmp59_, _data_->_res_, &_data_->_inner_error0_);
				_data_->fos = _data_->_tmp60_;
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				_data_->_tmp61_ = _data_->textview;
				_data_->_tmp62_ = gtk_text_view_get_buffer (_data_->_tmp61_);
				_data_->_tmp63_ = _data_->_tmp62_;
				_data_->_tmp64_ = _data_->start_iter;
				_data_->_tmp65_ = _data_->end_iter;
				_data_->_tmp66_ = gtk_text_buffer_get_text (_data_->_tmp63_, &_data_->_tmp64_, &_data_->_tmp65_, FALSE);
				_data_->text = _data_->_tmp66_;
				_data_->_tmp67_ = _data_->fos;
				_data_->_tmp68_ = _data_->text;
				_data_->_tmp70_ = 0;
				_data_->_tmp69_ = string_get_data (_data_->_tmp68_, &_data_->_tmp70_);
				_data_->_tmp69__length1 = _data_->_tmp70_;
				_data_->_tmp71_ = _data_->_tmp69_;
				_data_->_tmp71__length1 = _data_->_tmp69__length1;
				_data_->_state_ = 3;
				g_output_stream_write_all_async ((GOutputStream*) _data_->_tmp67_, _data_->_tmp71_, (gsize) _data_->_tmp71__length1, G_PRIORITY_DEFAULT, NULL, pamac_transaction_gtk_save_build_files_async_ready, _data_);
				return FALSE;
				_state_3:
				g_output_stream_write_all_finish ((GOutputStream*) _data_->_tmp67_, _data_->_res_, NULL, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_free0 (_data_->text);
					_g_object_unref0 (_data_->fos);
					goto __catch0_g_error;
				}
				_g_free0 (_data_->text);
				_g_object_unref0 (_data_->fos);
			}
			goto __finally0;
			__catch0_g_error:
			{
				_data_->e = _data_->_inner_error0_;
				_data_->_inner_error0_ = NULL;
				_data_->_tmp72_ = _data_->e;
				_data_->_tmp73_ = _data_->_tmp72_->message;
				g_warning ("transaction-gtk.vala:1030: %s", _data_->_tmp73_);
				_g_error_free0 (_data_->e);
			}
			__finally0:
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->file);
				_g_free0 (_data_->file_name);
				_g_object_unref0 (_data_->textview);
				_g_object_unref0 (_data_->scrolled_window);
				_g_object_unref0 (_data_->child);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
				g_clear_error (&_data_->_inner_error0_);
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_g_object_unref0 (_data_->file);
			_g_free0 (_data_->file_name);
		}
		_data_->_tmp74_ = _data_->index;
		_data_->index = _data_->_tmp74_ + 1;
		_g_object_unref0 (_data_->textview);
		_g_object_unref0 (_data_->scrolled_window);
		_g_object_unref0 (_data_->child);
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
pamac_transaction_gtk_clear_warnings (PamacTransactionGtk* self)
{
	GString* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_string_new ("");
	_g_string_free0 (self->priv->warning_textbuffer);
	self->priv->warning_textbuffer = _tmp0_;
}

static Block8Data*
block8_data_ref (Block8Data* _data8_)
{
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}

static void
block8_data_unref (void * _userdata_)
{
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		PamacTransactionGtk* self;
		self = _data8_->self;
		_g_object_unref0 (_data8_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}

static void
____lambda14_ (PamacTransactionGtk* self)
{
	GError* _inner_error0_ = NULL;
	{
		g_spawn_command_line_sync ("reboot", NULL, NULL, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_SPAWN_ERROR) {
				goto __catch0_g_spawn_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
	goto __finally0;
	__catch0_g_spawn_error:
	{
		GError* e = NULL;
		GError* _tmp0_;
		const gchar* _tmp1_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp0_ = e;
		_tmp1_ = _tmp0_->message;
		g_warning ("transaction-gtk.vala:1090: %s", _tmp1_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
_____lambda14__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	____lambda14_ ((PamacTransactionGtk*) self);
}

static void
___lambda15_ (Block8Data* _data8_)
{
	PamacTransactionGtk* self;
	GtkDialog* _tmp0_;
	GString* _tmp1_;
	self = _data8_->self;
	_tmp0_ = _data8_->dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
	_tmp1_ = g_string_new ("");
	_g_string_free0 (self->priv->warning_textbuffer);
	self->priv->warning_textbuffer = _tmp1_;
}

static void
____lambda15__gtk_dialog_response (GtkDialog* _sender,
                                   gint response_id,
                                   gpointer self)
{
	___lambda15_ (self);
}

void
pamac_transaction_gtk_show_warnings (PamacTransactionGtk* self,
                                     gboolean block)
{
	GString* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->warning_textbuffer;
	if (_tmp0_->len > ((gssize) 0)) {
		Block8Data* _data8_;
		GtkDialogFlags flags = 0U;
		gint use_header_bar = 0;
		GtkSettings* _tmp1_;
		gint _tmp2_ = 0;
		GtkWindow* application_window = NULL;
		GtkApplication* _tmp3_;
		GtkWindow* _tmp4_;
		GtkWindow* _tmp5_;
		GtkWindow* _tmp6_;
		GtkWindow* _tmp7_;
		GtkDialog* _tmp8_;
		GtkDialog* _tmp9_;
		GtkDialog* _tmp10_;
		GtkDialog* _tmp11_;
		GtkDialog* _tmp12_;
		GtkDialog* _tmp13_;
		GtkDialog* _tmp14_;
		GtkWidget* widget = NULL;
		GtkDialog* _tmp15_;
		GtkWidget* _tmp16_;
		GtkScrolledWindow* scrolledwindow = NULL;
		GtkScrolledWindow* _tmp17_;
		GtkScrolledWindow* _tmp18_;
		GtkLabel* label = NULL;
		GString* _tmp19_;
		const gchar* _tmp20_;
		GtkLabel* _tmp21_;
		GtkLabel* _tmp22_;
		GtkLabel* _tmp23_;
		GtkLabel* _tmp24_;
		GtkLabel* _tmp25_;
		GtkLabel* _tmp26_;
		GtkLabel* _tmp27_;
		GtkScrolledWindow* _tmp28_;
		GtkLabel* _tmp29_;
		GtkScrolledWindow* _tmp30_;
		GtkScrolledWindow* _tmp31_;
		GtkBox* box = NULL;
		GtkDialog* _tmp32_;
		GtkBox* _tmp33_;
		GtkBox* _tmp34_;
		GtkScrolledWindow* _tmp35_;
		GtkBox* _tmp36_;
		GString* _tmp37_;
		const gchar* _tmp38_;
		GtkWidget* _tmp49_;
		GtkWidget* _tmp50_;
		GtkDialog* _tmp51_;
		GtkDialog* _tmp52_;
		GtkDialog* _tmp53_;
		GtkDialog* _tmp54_;
		_data8_ = g_slice_new0 (Block8Data);
		_data8_->_ref_count_ = 1;
		_data8_->self = g_object_ref (self);
		flags = 0;
		if (block) {
			flags |= GTK_DIALOG_MODAL;
		}
		_tmp1_ = gtk_settings_get_default ();
		g_object_get ((GObject*) _tmp1_, "gtk-dialogs-use-header", &_tmp2_, NULL);
		use_header_bar = _tmp2_;
		if (use_header_bar == 1) {
			flags |= GTK_DIALOG_USE_HEADER_BAR;
		}
		_tmp3_ = self->priv->_application;
		_tmp4_ = gtk_application_get_active_window (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = _g_object_ref0 (_tmp5_);
		application_window = _tmp6_;
		_tmp7_ = application_window;
		_tmp8_ = (GtkDialog*) gtk_dialog_new_with_buttons (g_dgettext (NULL, "Warning"), _tmp7_, flags, NULL);
		g_object_ref_sink (_tmp8_);
		_data8_->dialog = _tmp8_;
		_tmp9_ = _data8_->dialog;
		gtk_widget_set_margin_top ((GtkWidget*) _tmp9_, 3);
		_tmp10_ = _data8_->dialog;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp10_, 3);
		_tmp11_ = _data8_->dialog;
		gtk_widget_set_margin_start ((GtkWidget*) _tmp11_, 3);
		_tmp12_ = _data8_->dialog;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp12_, 3);
		_tmp13_ = _data8_->dialog;
		gtk_window_set_icon_name ((GtkWindow*) _tmp13_, "system-software-install");
		_tmp14_ = _data8_->dialog;
		gtk_window_set_deletable ((GtkWindow*) _tmp14_, FALSE);
		_tmp15_ = _data8_->dialog;
		_tmp16_ = gtk_dialog_add_button (_tmp15_, g_dgettext (NULL, "_Close"), (gint) GTK_RESPONSE_CLOSE);
		widget = _tmp16_;
		_tmp17_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
		g_object_ref_sink (_tmp17_);
		scrolledwindow = _tmp17_;
		_tmp18_ = scrolledwindow;
		gtk_widget_set_visible ((GtkWidget*) _tmp18_, TRUE);
		_tmp19_ = self->priv->warning_textbuffer;
		_tmp20_ = _tmp19_->str;
		_tmp21_ = (GtkLabel*) gtk_label_new (_tmp20_);
		g_object_ref_sink (_tmp21_);
		label = _tmp21_;
		_tmp22_ = label;
		gtk_widget_set_visible ((GtkWidget*) _tmp22_, TRUE);
		_tmp23_ = label;
		gtk_label_set_selectable (_tmp23_, TRUE);
		_tmp24_ = label;
		gtk_widget_set_margin_top ((GtkWidget*) _tmp24_, 12);
		_tmp25_ = label;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp25_, 12);
		_tmp26_ = label;
		gtk_widget_set_margin_start ((GtkWidget*) _tmp26_, 12);
		_tmp27_ = label;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp27_, 12);
		_tmp28_ = scrolledwindow;
		_tmp29_ = label;
		gtk_container_add ((GtkContainer*) _tmp28_, (GtkWidget*) _tmp29_);
		_tmp30_ = scrolledwindow;
		gtk_widget_set_hexpand ((GtkWidget*) _tmp30_, TRUE);
		_tmp31_ = scrolledwindow;
		gtk_widget_set_vexpand ((GtkWidget*) _tmp31_, TRUE);
		_tmp32_ = _data8_->dialog;
		_tmp33_ = gtk_dialog_get_content_area (_tmp32_);
		box = _tmp33_;
		_tmp34_ = box;
		_tmp35_ = scrolledwindow;
		gtk_container_add ((GtkContainer*) _tmp34_, (GtkWidget*) _tmp35_);
		_tmp36_ = box;
		gtk_box_set_spacing (_tmp36_, 12);
		_tmp37_ = self->priv->warning_textbuffer;
		_tmp38_ = _tmp37_->str;
		if (string_contains (_tmp38_, g_dgettext (NULL, "A restart is required for the changes to take effect"))) {
			GtkButton* button = NULL;
			GtkButton* _tmp39_;
			GtkButton* _tmp40_;
			GtkButton* _tmp41_;
			GtkButton* _tmp42_;
			GtkButton* _tmp43_;
			GtkButton* _tmp44_;
			GtkButton* _tmp45_;
			GtkButton* _tmp46_;
			GtkBox* _tmp47_;
			GtkButton* _tmp48_;
			_tmp39_ = (GtkButton*) gtk_button_new_with_label (g_dgettext (NULL, "Restart"));
			g_object_ref_sink (_tmp39_);
			button = _tmp39_;
			_tmp40_ = button;
			gtk_widget_set_visible ((GtkWidget*) _tmp40_, TRUE);
			_tmp41_ = button;
			gtk_widget_set_margin_top ((GtkWidget*) _tmp41_, 12);
			_tmp42_ = button;
			gtk_widget_set_margin_bottom ((GtkWidget*) _tmp42_, 12);
			_tmp43_ = button;
			gtk_widget_set_margin_start ((GtkWidget*) _tmp43_, 12);
			_tmp44_ = button;
			gtk_widget_set_margin_end ((GtkWidget*) _tmp44_, 12);
			_tmp45_ = button;
			gtk_widget_set_halign ((GtkWidget*) _tmp45_, GTK_ALIGN_END);
			_tmp46_ = button;
			g_signal_connect_object (_tmp46_, "clicked", (GCallback) _____lambda14__gtk_button_clicked, self, 0);
			_tmp47_ = box;
			_tmp48_ = button;
			gtk_container_add ((GtkContainer*) _tmp47_, (GtkWidget*) _tmp48_);
			_g_object_unref0 (button);
		}
		_tmp49_ = widget;
		gtk_widget_grab_default (_tmp49_);
		_tmp50_ = widget;
		g_object_set (_tmp50_, "has-focus", TRUE, NULL);
		_tmp51_ = _data8_->dialog;
		g_object_set ((GtkWindow*) _tmp51_, "default-width", 600, NULL);
		_tmp52_ = _data8_->dialog;
		g_object_set ((GtkWindow*) _tmp52_, "default-height", 300, NULL);
		_tmp53_ = _data8_->dialog;
		g_signal_connect_data (_tmp53_, "response", (GCallback) ____lambda15__gtk_dialog_response, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
		_tmp54_ = _data8_->dialog;
		gtk_widget_show ((GtkWidget*) _tmp54_);
		_g_object_unref0 (label);
		_g_object_unref0 (scrolledwindow);
		_g_object_unref0 (application_window);
		block8_data_unref (_data8_);
		_data8_ = NULL;
	}
}

static Block9Data*
block9_data_ref (Block9Data* _data9_)
{
	g_atomic_int_inc (&_data9_->_ref_count_);
	return _data9_;
}

static void
block9_data_unref (void * _userdata_)
{
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
		PamacTransactionGtk* self;
		self = _data9_->self;
		_g_object_unref0 (_data9_->dialog);
		_g_free0 (_data9_->message);
		_g_object_unref0 (self);
		g_slice_free (Block9Data, _data9_);
	}
}

static gboolean
__lambda18_ (Block9Data* _data9_)
{
	PamacTransactionGtk* self;
	gboolean result;
	self = _data9_->self;
	pamac_transaction_gtk_show_notification (self, _data9_->message);
	result = FALSE;
	return result;
}

static gboolean
___lambda18__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda18_ (self);
	return result;
}

static void
__lambda19_ (Block9Data* _data9_)
{
	PamacTransactionGtk* self;
	GtkDialog* _tmp0_;
	self = _data9_->self;
	_tmp0_ = _data9_->dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}

static void
___lambda19__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda19_ (self);
}

void
pamac_transaction_gtk_display_error (PamacTransactionGtk* self,
                                     const gchar* message,
                                     GPtrArray* details)
{
	Block9Data* _data9_;
	gchar* _tmp0_;
	GtkDialogFlags flags = 0U;
	gint use_header_bar = 0;
	GtkSettings* _tmp1_;
	gint _tmp2_ = 0;
	GtkWindow* application_window = NULL;
	GtkApplication* _tmp3_;
	GtkWindow* _tmp4_;
	GtkWindow* _tmp5_;
	GtkWindow* _tmp6_;
	GtkWindow* _tmp7_;
	GtkDialog* _tmp8_;
	GtkDialog* _tmp9_;
	GtkDialog* _tmp10_;
	GtkDialog* _tmp11_;
	GtkDialog* _tmp12_;
	GtkDialog* _tmp13_;
	GString* textbuffer = NULL;
	GString* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	GtkDialog* _tmp25_;
	GtkWidget* widget = NULL;
	GtkDialog* _tmp26_;
	GtkWidget* _tmp27_;
	GtkScrolledWindow* scrolledwindow = NULL;
	GtkScrolledWindow* _tmp28_;
	GtkLabel* label = NULL;
	GString* _tmp29_;
	const gchar* _tmp30_;
	GtkLabel* _tmp31_;
	GtkBox* box = NULL;
	GtkDialog* _tmp32_;
	GtkBox* _tmp33_;
	GtkDialog* _tmp34_;
	GtkDialog* _tmp35_;
	GtkDialog* _tmp36_;
	GtkDialog* _tmp37_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (message != NULL);
	g_return_if_fail (details != NULL);
	_data9_ = g_slice_new0 (Block9Data);
	_data9_->_ref_count_ = 1;
	_data9_->self = g_object_ref (self);
	_tmp0_ = g_strdup (message);
	_g_free0 (_data9_->message);
	_data9_->message = _tmp0_;
	pamac_transaction_gtk_reset_progress_box (self);
	flags = GTK_DIALOG_MODAL;
	_tmp1_ = gtk_settings_get_default ();
	g_object_get ((GObject*) _tmp1_, "gtk-dialogs-use-header", &_tmp2_, NULL);
	use_header_bar = _tmp2_;
	if (use_header_bar == 1) {
		flags |= GTK_DIALOG_USE_HEADER_BAR;
	}
	_tmp3_ = self->priv->_application;
	_tmp4_ = gtk_application_get_active_window (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (_tmp5_);
	application_window = _tmp6_;
	_tmp7_ = application_window;
	_tmp8_ = (GtkDialog*) gtk_dialog_new_with_buttons (_data9_->message, _tmp7_, flags, NULL);
	g_object_ref_sink (_tmp8_);
	_data9_->dialog = _tmp8_;
	_tmp9_ = _data9_->dialog;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp9_, 3);
	_tmp10_ = _data9_->dialog;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp10_, 3);
	_tmp11_ = _data9_->dialog;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp11_, 3);
	_tmp12_ = _data9_->dialog;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp12_, 3);
	_tmp13_ = _data9_->dialog;
	gtk_window_set_icon_name ((GtkWindow*) _tmp13_, "system-software-install");
	_tmp14_ = g_string_new ("");
	textbuffer = _tmp14_;
	_tmp15_ = vala_g_ptr_array_get_length (details);
	_tmp16_ = _tmp15_;
	if (_tmp16_ != 0) {
		gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp17_ = g_strconcat (_data9_->message, ":", NULL);
		_tmp18_ = _tmp17_;
		pamac_transaction_gtk_show_details (self, _tmp18_);
		_g_free0 (_tmp18_);
		{
			GPtrArray* detail_collection = NULL;
			guint detail_index = 0U;
			detail_collection = details;
			for (detail_index = 0; detail_index < detail_collection->len; detail_index = detail_index + 1) {
				const gchar* detail = NULL;
				detail = (const gchar*) g_ptr_array_index (detail_collection, detail_index);
				{
					const gchar* _tmp19_;
					GString* _tmp20_;
					const gchar* _tmp21_;
					gchar* _tmp22_;
					gchar* _tmp23_;
					_tmp19_ = detail;
					pamac_transaction_gtk_show_details (self, _tmp19_);
					_tmp20_ = textbuffer;
					_tmp21_ = detail;
					_tmp22_ = g_strconcat (_tmp21_, "\n", NULL);
					_tmp23_ = _tmp22_;
					g_string_append (_tmp20_, _tmp23_);
					_g_free0 (_tmp23_);
				}
			}
		}
	} else {
		GString* _tmp24_;
		pamac_transaction_gtk_show_details (self, _data9_->message);
		_tmp24_ = textbuffer;
		g_string_append (_tmp24_, _data9_->message);
	}
	_tmp25_ = _data9_->dialog;
	gtk_window_set_deletable ((GtkWindow*) _tmp25_, FALSE);
	_tmp26_ = _data9_->dialog;
	_tmp27_ = gtk_dialog_add_button (_tmp26_, g_dgettext (NULL, "_Close"), (gint) GTK_RESPONSE_CLOSE);
	widget = _tmp27_;
	gtk_widget_grab_default (widget);
	_tmp28_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp28_);
	scrolledwindow = _tmp28_;
	gtk_widget_set_visible ((GtkWidget*) scrolledwindow, TRUE);
	_tmp29_ = textbuffer;
	_tmp30_ = _tmp29_->str;
	_tmp31_ = (GtkLabel*) gtk_label_new (_tmp30_);
	g_object_ref_sink (_tmp31_);
	label = _tmp31_;
	gtk_widget_set_visible ((GtkWidget*) label, TRUE);
	gtk_label_set_selectable (label, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) label, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) label, 12);
	gtk_widget_set_margin_start ((GtkWidget*) label, 12);
	gtk_widget_set_margin_end ((GtkWidget*) label, 12);
	gtk_container_add ((GtkContainer*) scrolledwindow, (GtkWidget*) label);
	gtk_widget_set_hexpand ((GtkWidget*) scrolledwindow, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) scrolledwindow, TRUE);
	_tmp32_ = _data9_->dialog;
	_tmp33_ = gtk_dialog_get_content_area (_tmp32_);
	box = _tmp33_;
	gtk_container_add ((GtkContainer*) box, (GtkWidget*) scrolledwindow);
	gtk_box_set_spacing (box, 6);
	_tmp34_ = _data9_->dialog;
	g_object_set ((GtkWindow*) _tmp34_, "default-width", 600, NULL);
	_tmp35_ = _data9_->dialog;
	g_object_set ((GtkWindow*) _tmp35_, "default-height", 300, NULL);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 1000, ___lambda18__gsource_func, block9_data_ref (_data9_), block9_data_unref);
	_tmp36_ = _data9_->dialog;
	g_signal_connect_data (_tmp36_, "response", (GCallback) ___lambda19__gtk_dialog_response, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	_tmp37_ = _data9_->dialog;
	gtk_widget_show ((GtkWidget*) _tmp37_);
	_g_object_unref0 (label);
	_g_object_unref0 (scrolledwindow);
	_g_string_free0 (textbuffer);
	_g_object_unref0 (application_window);
	block9_data_unref (_data9_);
	_data9_ = NULL;
}

static void
pamac_transaction_gtk_real_ask_snap_install_classic_data_free (gpointer _data)
{
	PamacTransactionGtkAskSnapInstallClassicData* _data_;
	_data_ = _data;
	_g_free0 (_data_->name);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionGtkAskSnapInstallClassicData, _data_);
}

static void
pamac_transaction_gtk_real_ask_snap_install_classic (PamacTransaction* base,
                                                     const gchar* name,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	PamacTransactionGtk * self;
	PamacTransactionGtkAskSnapInstallClassicData* _data_;
	PamacTransactionGtk* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (name != NULL);
	self = (PamacTransactionGtk*) base;
	_data_ = g_slice_new0 (PamacTransactionGtkAskSnapInstallClassicData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_gtk_real_ask_snap_install_classic_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (name);
	_g_free0 (_data_->name);
	_data_->name = _tmp1_;
	pamac_transaction_gtk_real_ask_snap_install_classic_co (_data_);
}

static gboolean
pamac_transaction_gtk_ask_snap_install_classic_finish (PamacTransaction* base,
                                                       GAsyncResult* _res_)
{
	gboolean result;
	PamacTransactionGtkAskSnapInstallClassicData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static Block10Data*
block10_data_ref (Block10Data* _data10_)
{
	g_atomic_int_inc (&_data10_->_ref_count_);
	return _data10_;
}

static void
block10_data_unref (void * _userdata_)
{
	Block10Data* _data10_;
	_data10_ = (Block10Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
		PamacTransactionGtk* self;
		self = _data10_->self;
		_g_object_unref0 (_data10_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}

static gboolean
_pamac_transaction_gtk_real_ask_snap_install_classic_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_gtk_real_ask_snap_install_classic_co (self);
	return result;
}

static void
__lambda20_ (Block10Data* _data10_,
             gint res)
{
	PamacTransactionGtk* self;
	GtkDialog* _tmp0_;
	self = _data10_->self;
	_data10_->response = res;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _pamac_transaction_gtk_real_ask_snap_install_classic_co_gsource_func, _data10_->_async_data_, NULL);
	_tmp0_ = _data10_->dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}

static void
___lambda20__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda20_ (self, response_id);
}

static gboolean
pamac_transaction_gtk_real_ask_snap_install_classic_co (PamacTransactionGtkAskSnapInstallClassicData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data10_ = g_slice_new0 (Block10Data);
	_data_->_data10_->_ref_count_ = 1;
	_data_->_data10_->self = g_object_ref (_data_->self);
	_data_->_data10_->_async_data_ = _data_;
	_data_->flags = GTK_DIALOG_MODAL;
	_data_->_tmp0_ = gtk_settings_get_default ();
	_data_->_tmp1_ = 0;
	g_object_get ((GObject*) _data_->_tmp0_, "gtk-dialogs-use-header", &_data_->_tmp1_, NULL);
	_data_->use_header_bar = _data_->_tmp1_;
	if (_data_->use_header_bar == 1) {
		_data_->flags |= GTK_DIALOG_USE_HEADER_BAR;
	}
	_data_->_tmp2_ = _data_->self->priv->_application;
	_data_->_tmp3_ = gtk_application_get_active_window (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = _g_object_ref0 (_data_->_tmp4_);
	_data_->application_window = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->application_window;
	_data_->_tmp7_ = (GtkDialog*) gtk_dialog_new_with_buttons (g_dgettext (NULL, "Warning"), _data_->_tmp6_, _data_->flags, NULL);
	g_object_ref_sink (_data_->_tmp7_);
	_data_->_data10_->dialog = _data_->_tmp7_;
	_data_->_tmp8_ = _data_->_data10_->dialog;
	gtk_widget_set_margin_top ((GtkWidget*) _data_->_tmp8_, 3);
	_data_->_tmp9_ = _data_->_data10_->dialog;
	gtk_widget_set_margin_bottom ((GtkWidget*) _data_->_tmp9_, 3);
	_data_->_tmp10_ = _data_->_data10_->dialog;
	gtk_widget_set_margin_start ((GtkWidget*) _data_->_tmp10_, 3);
	_data_->_tmp11_ = _data_->_data10_->dialog;
	gtk_widget_set_margin_end ((GtkWidget*) _data_->_tmp11_, 3);
	_data_->_tmp12_ = _data_->_data10_->dialog;
	gtk_window_set_icon_name ((GtkWindow*) _data_->_tmp12_, "system-software-install");
	_data_->_tmp13_ = _data_->_data10_->dialog;
	gtk_window_set_deletable ((GtkWindow*) _data_->_tmp13_, FALSE);
	_data_->_tmp14_ = _data_->_data10_->dialog;
	gtk_dialog_add_button (_data_->_tmp14_, g_dgettext (NULL, "Install"), (gint) GTK_RESPONSE_OK);
	_data_->_tmp15_ = _data_->_data10_->dialog;
	_data_->_tmp16_ = gtk_dialog_add_button (_data_->_tmp15_, g_dgettext (NULL, "_Cancel"), (gint) GTK_RESPONSE_CANCEL);
	_data_->widget = _data_->_tmp16_;
	_data_->_tmp17_ = _data_->widget;
	gtk_widget_grab_default (_data_->_tmp17_);
	_data_->_tmp18_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_data_->_tmp18_);
	_data_->scrolledwindow = _data_->_tmp18_;
	_data_->_tmp19_ = _data_->scrolledwindow;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp19_, TRUE);
	_data_->_tmp20_ = g_string_new ("");
	_data_->textbuffer = _data_->_tmp20_;
	_data_->_tmp21_ = _data_->textbuffer;
	_data_->_tmp22_ = g_strdup_printf (g_dgettext (NULL, "The snap %s was published using classic confinement"), _data_->name);
	_data_->_tmp23_ = _data_->_tmp22_;
	g_string_append (_data_->_tmp21_, _data_->_tmp23_);
	_g_free0 (_data_->_tmp23_);
	_data_->_tmp24_ = _data_->textbuffer;
	g_string_append (_data_->_tmp24_, ".\n");
	_data_->_tmp25_ = _data_->textbuffer;
	g_string_append (_data_->_tmp25_, "It thus may perform arbitrary system changes outside of the security s" \
"andbox that snaps are usually confined to, which may put your system a" \
"t risk");
	_data_->_tmp26_ = _data_->textbuffer;
	g_string_append (_data_->_tmp26_, ".\n");
	_data_->_tmp27_ = _data_->textbuffer;
	_data_->_tmp28_ = g_strdup_printf (g_dgettext (NULL, "Install %s anyway"), _data_->name);
	_data_->_tmp29_ = _data_->_tmp28_;
	g_string_append (_data_->_tmp27_, _data_->_tmp29_);
	_g_free0 (_data_->_tmp29_);
	_data_->_tmp30_ = _data_->textbuffer;
	g_string_append (_data_->_tmp30_, " ?");
	_data_->_tmp31_ = _data_->textbuffer;
	_data_->_tmp32_ = _data_->_tmp31_->str;
	_data_->_tmp33_ = (GtkLabel*) gtk_label_new (_data_->_tmp32_);
	g_object_ref_sink (_data_->_tmp33_);
	_data_->label = _data_->_tmp33_;
	_data_->_tmp34_ = _data_->label;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp34_, TRUE);
	_data_->_tmp35_ = _data_->label;
	gtk_label_set_selectable (_data_->_tmp35_, TRUE);
	_data_->_tmp36_ = _data_->label;
	gtk_widget_set_margin_top ((GtkWidget*) _data_->_tmp36_, 12);
	_data_->_tmp37_ = _data_->label;
	gtk_widget_set_margin_bottom ((GtkWidget*) _data_->_tmp37_, 12);
	_data_->_tmp38_ = _data_->label;
	gtk_widget_set_margin_start ((GtkWidget*) _data_->_tmp38_, 12);
	_data_->_tmp39_ = _data_->label;
	gtk_widget_set_margin_end ((GtkWidget*) _data_->_tmp39_, 12);
	_data_->_tmp40_ = _data_->scrolledwindow;
	_data_->_tmp41_ = _data_->label;
	gtk_container_add ((GtkContainer*) _data_->_tmp40_, (GtkWidget*) _data_->_tmp41_);
	_data_->_tmp42_ = _data_->scrolledwindow;
	gtk_widget_set_hexpand ((GtkWidget*) _data_->_tmp42_, TRUE);
	_data_->_tmp43_ = _data_->scrolledwindow;
	gtk_widget_set_vexpand ((GtkWidget*) _data_->_tmp43_, TRUE);
	_data_->_tmp44_ = _data_->_data10_->dialog;
	_data_->_tmp45_ = gtk_dialog_get_content_area (_data_->_tmp44_);
	_data_->box = _data_->_tmp45_;
	_data_->_tmp46_ = _data_->box;
	_data_->_tmp47_ = _data_->scrolledwindow;
	gtk_container_add ((GtkContainer*) _data_->_tmp46_, (GtkWidget*) _data_->_tmp47_);
	_data_->_tmp48_ = _data_->box;
	gtk_box_set_spacing (_data_->_tmp48_, 6);
	_data_->_tmp49_ = _data_->_data10_->dialog;
	g_object_set ((GtkWindow*) _data_->_tmp49_, "default-width", 900, NULL);
	_data_->_tmp50_ = _data_->_data10_->dialog;
	g_object_set ((GtkWindow*) _data_->_tmp50_, "default-height", 150, NULL);
	_data_->_data10_->response = (gint) GTK_RESPONSE_CANCEL;
	_data_->_tmp51_ = _data_->_data10_->dialog;
	g_signal_connect_data (_data_->_tmp51_, "response", (GCallback) ___lambda20__gtk_dialog_response, block10_data_ref (_data_->_data10_), (GClosureNotify) block10_data_unref, 0);
	_data_->_tmp52_ = _data_->_data10_->dialog;
	gtk_widget_show ((GtkWidget*) _data_->_tmp52_);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	if (_data_->_data10_->response == ((gint) GTK_RESPONSE_OK)) {
		_data_->result = TRUE;
		_g_object_unref0 (_data_->label);
		_g_string_free0 (_data_->textbuffer);
		_g_object_unref0 (_data_->scrolledwindow);
		_g_object_unref0 (_data_->application_window);
		block10_data_unref (_data_->_data10_);
		_data_->_data10_ = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = FALSE;
	_g_object_unref0 (_data_->label);
	_g_string_free0 (_data_->textbuffer);
	_g_object_unref0 (_data_->scrolledwindow);
	_g_object_unref0 (_data_->application_window);
	block10_data_unref (_data_->_data10_);
	_data_->_data10_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
pamac_transaction_gtk_show_notification (PamacTransactionGtk* self,
                                         const gchar* message)
{
	GNotification* notification = NULL;
	GNotification* _tmp0_;
	GtkApplication* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (message != NULL);
	_tmp0_ = g_notification_new (g_dgettext (NULL, "Package Manager"));
	notification = _tmp0_;
	g_notification_set_body (notification, message);
	_tmp1_ = self->priv->_application;
	g_application_send_notification ((GApplication*) _tmp1_, "pamac-manager", notification);
	_g_object_unref0 (notification);
}

GtkApplication*
pamac_transaction_gtk_get_application (PamacTransactionGtk* self)
{
	GtkApplication* result;
	GtkApplication* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_application;
	result = _tmp0_;
	return result;
}

static void
pamac_transaction_gtk_set_application (PamacTransactionGtk* self,
                                       GtkApplication* value)
{
	GtkApplication* old_value;
	g_return_if_fail (self != NULL);
	old_value = pamac_transaction_gtk_get_application (self);
	if (old_value != value) {
		GtkApplication* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_application);
		self->priv->_application = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pamac_transaction_gtk_properties[PAMAC_TRANSACTION_GTK_APPLICATION_PROPERTY]);
	}
}

PamacLocalConfig*
pamac_transaction_gtk_get_local_config (PamacTransactionGtk* self)
{
	PamacLocalConfig* result;
	PamacLocalConfig* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_local_config;
	result = _tmp0_;
	return result;
}

static void
pamac_transaction_gtk_set_local_config (PamacTransactionGtk* self,
                                        PamacLocalConfig* value)
{
	PamacLocalConfig* old_value;
	g_return_if_fail (self != NULL);
	old_value = pamac_transaction_gtk_get_local_config (self);
	if (old_value != value) {
		PamacLocalConfig* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_local_config);
		self->priv->_local_config = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pamac_transaction_gtk_properties[PAMAC_TRANSACTION_GTK_LOCAL_CONFIG_PROPERTY]);
	}
}

gboolean
pamac_transaction_gtk_get_no_confirm_upgrade (PamacTransactionGtk* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_no_confirm_upgrade;
	return result;
}

void
pamac_transaction_gtk_set_no_confirm_upgrade (PamacTransactionGtk* self,
                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pamac_transaction_gtk_get_no_confirm_upgrade (self);
	if (old_value != value) {
		self->priv->_no_confirm_upgrade = value;
		g_object_notify_by_pspec ((GObject *) self, pamac_transaction_gtk_properties[PAMAC_TRANSACTION_GTK_NO_CONFIRM_UPGRADE_PROPERTY]);
	}
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		PamacTransactionGtk* self;
		self = _data11_->self;
		_g_main_loop_unref0 (_data11_->loop);
		_g_object_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

static void
_pamac_transaction_gtk_display_action_pamac_transaction_emit_action (PamacTransaction* _sender,
                                                                     const gchar* action,
                                                                     gpointer self)
{
	pamac_transaction_gtk_display_action ((PamacTransactionGtk*) self, action);
}

static void
_pamac_transaction_gtk_display_action_progress_pamac_transaction_emit_action_progress (PamacTransaction* _sender,
                                                                                       const gchar* action,
                                                                                       const gchar* status,
                                                                                       gdouble progress,
                                                                                       gpointer self)
{
	pamac_transaction_gtk_display_action_progress ((PamacTransactionGtk*) self, action, status, progress);
}

static void
_pamac_transaction_gtk_display_action_progress_pamac_transaction_emit_download_progress (PamacTransaction* _sender,
                                                                                         const gchar* action,
                                                                                         const gchar* status,
                                                                                         gdouble progress,
                                                                                         gpointer self)
{
	pamac_transaction_gtk_display_action_progress ((PamacTransactionGtk*) self, action, status, progress);
}

static void
_pamac_transaction_gtk_display_hook_progress_pamac_transaction_emit_hook_progress (PamacTransaction* _sender,
                                                                                   const gchar* action,
                                                                                   const gchar* details,
                                                                                   const gchar* status,
                                                                                   gdouble progress,
                                                                                   gpointer self)
{
	pamac_transaction_gtk_display_hook_progress ((PamacTransactionGtk*) self, action, details, status, progress);
}

static void
_pamac_transaction_gtk_show_details_pamac_transaction_emit_script_output (PamacTransaction* _sender,
                                                                          const gchar* message,
                                                                          gpointer self)
{
	pamac_transaction_gtk_show_details ((PamacTransactionGtk*) self, message);
}

static void
_pamac_transaction_gtk___lambda21_ (PamacTransactionGtk* self,
                                    const gchar* msg)
{
	GString* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (msg != NULL);
	pamac_transaction_gtk_show_details (self, msg);
	_tmp0_ = self->priv->warning_textbuffer;
	_tmp1_ = g_strconcat (msg, "\n", NULL);
	_tmp2_ = _tmp1_;
	g_string_append (_tmp0_, _tmp2_);
	_g_free0 (_tmp2_);
}

static void
__pamac_transaction_gtk___lambda21__pamac_transaction_emit_warning (PamacTransaction* _sender,
                                                                    const gchar* message,
                                                                    gpointer self)
{
	_pamac_transaction_gtk___lambda21_ ((PamacTransactionGtk*) self, message);
}

static void
_pamac_transaction_gtk_display_error_pamac_transaction_emit_error (PamacTransaction* _sender,
                                                                   const gchar* message,
                                                                   GPtrArray* details,
                                                                   gpointer self)
{
	pamac_transaction_gtk_display_error ((PamacTransactionGtk*) self, message, details);
}

static void
_pamac_transaction_gtk___lambda22_ (PamacTransactionGtk* self)
{
	PamacProgressBox* _tmp0_;
	GtkProgressBar* _tmp1_;
	_tmp0_ = self->progress_box;
	_tmp1_ = _tmp0_->progressbar;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, TRUE);
}

static void
__pamac_transaction_gtk___lambda22__pamac_transaction_start_downloading (PamacTransaction* _sender,
                                                                         gpointer self)
{
	_pamac_transaction_gtk___lambda22_ ((PamacTransactionGtk*) self);
}

static void
_pamac_transaction_gtk_start_progressbar_pulse_pamac_transaction_start_waiting (PamacTransaction* _sender,
                                                                                gpointer self)
{
	pamac_transaction_gtk_start_progressbar_pulse ((PamacTransactionGtk*) self);
}

static void
_pamac_transaction_gtk_stop_progressbar_pulse_pamac_transaction_stop_waiting (PamacTransaction* _sender,
                                                                              gpointer self)
{
	pamac_transaction_gtk_stop_progressbar_pulse ((PamacTransactionGtk*) self);
}

static void
_pamac_transaction_gtk_start_progressbar_pulse_pamac_transaction_start_preparing (PamacTransaction* _sender,
                                                                                  gpointer self)
{
	pamac_transaction_gtk_start_progressbar_pulse ((PamacTransactionGtk*) self);
}

static void
_pamac_transaction_gtk_stop_progressbar_pulse_pamac_transaction_stop_preparing (PamacTransaction* _sender,
                                                                                gpointer self)
{
	pamac_transaction_gtk_stop_progressbar_pulse ((PamacTransactionGtk*) self);
}

static void
_pamac_transaction_gtk_start_progressbar_pulse_pamac_transaction_start_building (PamacTransaction* _sender,
                                                                                 gpointer self)
{
	pamac_transaction_gtk_start_progressbar_pulse ((PamacTransactionGtk*) self);
}

static void
_pamac_transaction_gtk_stop_progressbar_pulse_pamac_transaction_stop_building (PamacTransaction* _sender,
                                                                               gpointer self)
{
	pamac_transaction_gtk_stop_progressbar_pulse ((PamacTransactionGtk*) self);
}

static void
__lambda24_ (Block11Data* _data11_,
             GObject* obj,
             GAsyncResult* res)
{
	PamacTransactionGtk* self;
	GMainLoop* _tmp0_;
	self = _data11_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = _data11_->loop;
	g_main_loop_quit (_tmp0_);
}

static void
___lambda24__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda24_ (self, source_object, res);
	block11_data_unref (self);
}

static void
_pamac_transaction_gtk___lambda23_ (Block11Data* _data11_,
                                    GObject* obj,
                                    GAsyncResult* res)
{
	PamacTransactionGtk* self;
	PamacDatabase* _tmp0_;
	PamacDatabase* _tmp1_;
	self = _data11_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = pamac_transaction_get_database ((PamacTransaction*) self);
	_tmp1_ = _tmp0_;
	pamac_database_refresh_flatpak_appstream_data_async (_tmp1_, ___lambda24__gasync_ready_callback, block11_data_ref (_data11_));
}

static void
__pamac_transaction_gtk___lambda23__gasync_ready_callback (GObject* source_object,
                                                           GAsyncResult* res,
                                                           gpointer self)
{
	_pamac_transaction_gtk___lambda23_ (self, source_object, res);
	block11_data_unref (self);
}

static GObject *
pamac_transaction_gtk_constructor (GType type,
                                   guint n_construct_properties,
                                   GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	PamacTransactionGtk * self;
	Block11Data* _data11_;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GString* _tmp3_;
	gchar* _tmp4_;
	PamacProgressBox* _tmp5_;
	PamacProgressBox* _tmp6_;
	GtkProgressBar* _tmp7_;
	PamacProgressBox* _tmp8_;
	GtkProgressBar* _tmp9_;
	GtkScrolledWindow* _tmp10_;
	GtkScrolledWindow* _tmp11_;
	GtkScrolledWindow* _tmp12_;
	GtkScrolledWindow* _tmp13_;
	GtkTextView* _tmp14_;
	GtkTextView* _tmp15_;
	GtkTextView* _tmp16_;
	GtkTextView* _tmp17_;
	GtkTextView* _tmp18_;
	GtkTextView* _tmp19_;
	GtkTextView* _tmp20_;
	GtkTextView* _tmp21_;
	GtkTextView* _tmp22_;
	GtkTextView* _tmp23_;
	GtkTextIter iter = {0};
	GtkTextView* _tmp24_;
	GtkTextBuffer* _tmp25_;
	GtkTextBuffer* _tmp26_;
	GtkTextIter _tmp27_ = {0};
	GtkTextView* _tmp28_;
	GtkTextBuffer* _tmp29_;
	GtkTextBuffer* _tmp30_;
	GtkTextIter _tmp31_;
	GtkScrolledWindow* _tmp32_;
	GtkTextView* _tmp33_;
	GtkNotebook* _tmp34_;
	GtkNotebook* _tmp35_;
	GtkNotebook* _tmp36_;
	GtkNotebook* _tmp37_;
	GtkNotebook* _tmp38_;
	GtkNotebook* _tmp39_;
	GtkNotebook* _tmp40_;
	GMainLoop* _tmp41_;
	GMainLoop* _tmp42_;
	parent_class = G_OBJECT_CLASS (pamac_transaction_gtk_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PAMAC_TYPE_TRANSACTION_GTK, PamacTransactionGtk);
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	_data11_->self = g_object_ref (self);
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, NULL, _g_free0_);
	_g_hash_table_unref0 (self->priv->transaction_summary);
	self->priv->transaction_summary = _tmp2_;
	_tmp3_ = g_string_new ("");
	_g_string_free0 (self->priv->warning_textbuffer);
	self->priv->warning_textbuffer = _tmp3_;
	_tmp4_ = g_strdup ("");
	_g_free0 (self->priv->current_action);
	self->priv->current_action = _tmp4_;
	_tmp5_ = pamac_progress_box_new ();
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->progress_box);
	self->progress_box = _tmp5_;
	_tmp6_ = self->progress_box;
	_tmp7_ = _tmp6_->progressbar;
	gtk_progress_bar_set_text (_tmp7_, "");
	_tmp8_ = self->progress_box;
	_tmp9_ = _tmp8_->progressbar;
	gtk_widget_set_visible ((GtkWidget*) _tmp9_, FALSE);
	_tmp10_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->details_window);
	self->details_window = _tmp10_;
	_tmp11_ = self->details_window;
	gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE);
	_tmp12_ = self->details_window;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp12_, TRUE);
	_tmp13_ = self->details_window;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp13_, TRUE);
	_tmp14_ = (GtkTextView*) gtk_text_view_new ();
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->details_textview);
	self->details_textview = _tmp14_;
	_tmp15_ = self->details_textview;
	gtk_widget_set_visible ((GtkWidget*) _tmp15_, TRUE);
	_tmp16_ = self->details_textview;
	gtk_text_view_set_editable (_tmp16_, FALSE);
	_tmp17_ = self->details_textview;
	gtk_text_view_set_wrap_mode (_tmp17_, GTK_WRAP_NONE);
	_tmp18_ = self->details_textview;
	gtk_text_view_set_monospace (_tmp18_, TRUE);
	_tmp19_ = self->details_textview;
	gtk_text_view_set_input_hints (_tmp19_, GTK_INPUT_HINT_NO_EMOJI);
	_tmp20_ = self->details_textview;
	gtk_text_view_set_top_margin (_tmp20_, 8);
	_tmp21_ = self->details_textview;
	gtk_text_view_set_bottom_margin (_tmp21_, 8);
	_tmp22_ = self->details_textview;
	gtk_text_view_set_left_margin (_tmp22_, 8);
	_tmp23_ = self->details_textview;
	gtk_text_view_set_right_margin (_tmp23_, 8);
	_tmp24_ = self->details_textview;
	_tmp25_ = gtk_text_view_get_buffer (_tmp24_);
	_tmp26_ = _tmp25_;
	gtk_text_buffer_get_end_iter (_tmp26_, &_tmp27_);
	iter = _tmp27_;
	_tmp28_ = self->details_textview;
	_tmp29_ = gtk_text_view_get_buffer (_tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = iter;
	gtk_text_buffer_create_mark (_tmp30_, "scroll", &_tmp31_, FALSE);
	_tmp32_ = self->details_window;
	_tmp33_ = self->details_textview;
	gtk_container_add ((GtkContainer*) _tmp32_, (GtkWidget*) _tmp33_);
	_tmp34_ = (GtkNotebook*) gtk_notebook_new ();
	g_object_ref_sink (_tmp34_);
	_g_object_unref0 (self->build_files_notebook);
	self->build_files_notebook = _tmp34_;
	_tmp35_ = self->build_files_notebook;
	gtk_widget_set_visible ((GtkWidget*) _tmp35_, TRUE);
	_tmp36_ = self->build_files_notebook;
	gtk_notebook_set_show_border (_tmp36_, FALSE);
	_tmp37_ = self->build_files_notebook;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp37_, TRUE);
	_tmp38_ = self->build_files_notebook;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp38_, TRUE);
	_tmp39_ = self->build_files_notebook;
	gtk_notebook_set_scrollable (_tmp39_, TRUE);
	_tmp40_ = self->build_files_notebook;
	g_object_set (_tmp40_, "enable-popup", TRUE, NULL);
	g_signal_connect_object ((PamacTransaction*) self, "emit-action", (GCallback) _pamac_transaction_gtk_display_action_pamac_transaction_emit_action, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "emit-action-progress", (GCallback) _pamac_transaction_gtk_display_action_progress_pamac_transaction_emit_action_progress, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "emit-download-progress", (GCallback) _pamac_transaction_gtk_display_action_progress_pamac_transaction_emit_download_progress, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "emit-hook-progress", (GCallback) _pamac_transaction_gtk_display_hook_progress_pamac_transaction_emit_hook_progress, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "emit-script-output", (GCallback) _pamac_transaction_gtk_show_details_pamac_transaction_emit_script_output, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "emit-warning", (GCallback) __pamac_transaction_gtk___lambda21__pamac_transaction_emit_warning, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "emit-error", (GCallback) _pamac_transaction_gtk_display_error_pamac_transaction_emit_error, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "start-downloading", (GCallback) __pamac_transaction_gtk___lambda22__pamac_transaction_start_downloading, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "start-waiting", (GCallback) _pamac_transaction_gtk_start_progressbar_pulse_pamac_transaction_start_waiting, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "stop-waiting", (GCallback) _pamac_transaction_gtk_stop_progressbar_pulse_pamac_transaction_stop_waiting, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "start-preparing", (GCallback) _pamac_transaction_gtk_start_progressbar_pulse_pamac_transaction_start_preparing, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "stop-preparing", (GCallback) _pamac_transaction_gtk_stop_progressbar_pulse_pamac_transaction_stop_preparing, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "start-building", (GCallback) _pamac_transaction_gtk_start_progressbar_pulse_pamac_transaction_start_building, self, 0);
	g_signal_connect_object ((PamacTransaction*) self, "stop-building", (GCallback) _pamac_transaction_gtk_stop_progressbar_pulse_pamac_transaction_stop_building, self, 0);
	pamac_transaction_gtk_set_no_confirm_upgrade (self, FALSE);
	self->priv->summary_shown = FALSE;
	self->commit_transaction_answer = FALSE;
	_tmp41_ = g_main_loop_new (NULL, FALSE);
	_data11_->loop = _tmp41_;
	pamac_transaction_check_dbs ((PamacTransaction*) self, __pamac_transaction_gtk___lambda23__gasync_ready_callback, block11_data_ref (_data11_));
	_tmp42_ = _data11_->loop;
	g_main_loop_run (_tmp42_);
	block11_data_unref (_data11_);
	_data11_ = NULL;
	return obj;
}

static void
pamac_transaction_gtk_class_init (PamacTransactionGtkClass * klass,
                                  gpointer klass_data)
{
	pamac_transaction_gtk_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PamacTransactionGtk_private_offset);
	((PamacTransactionClass *) klass)->choose_optdeps = (void (*) (PamacTransaction*, const gchar*, GPtrArray*, GAsyncReadyCallback, gpointer)) pamac_transaction_gtk_real_choose_optdeps;
	((PamacTransactionClass *) klass)->choose_optdeps_finish = (GPtrArray* (*) (PamacTransaction*, GAsyncResult*)) pamac_transaction_gtk_choose_optdeps_finish;
	((PamacTransactionClass *) klass)->choose_provider = (void (*) (PamacTransaction*, const gchar*, GPtrArray*, GAsyncReadyCallback, gpointer)) pamac_transaction_gtk_real_choose_provider;
	((PamacTransactionClass *) klass)->choose_provider_finish = (gint (*) (PamacTransaction*, GAsyncResult*)) pamac_transaction_gtk_choose_provider_finish;
	((PamacTransactionClass *) klass)->ask_import_key = (void (*) (PamacTransaction*, const gchar*, const gchar*, const gchar*, GAsyncReadyCallback, gpointer)) pamac_transaction_gtk_real_ask_import_key;
	((PamacTransactionClass *) klass)->ask_import_key_finish = (gboolean (*) (PamacTransaction*, GAsyncResult*)) pamac_transaction_gtk_ask_import_key_finish;
	((PamacTransactionClass *) klass)->ask_edit_build_files = (void (*) (PamacTransaction*, PamacTransactionSummary*, GAsyncReadyCallback, gpointer)) pamac_transaction_gtk_real_ask_edit_build_files;
	((PamacTransactionClass *) klass)->ask_edit_build_files_finish = (gboolean (*) (PamacTransaction*, GAsyncResult*)) pamac_transaction_gtk_ask_edit_build_files_finish;
	((PamacTransactionClass *) klass)->ask_commit = (void (*) (PamacTransaction*, PamacTransactionSummary*, GAsyncReadyCallback, gpointer)) pamac_transaction_gtk_real_ask_commit;
	((PamacTransactionClass *) klass)->ask_commit_finish = (gboolean (*) (PamacTransaction*, GAsyncResult*)) pamac_transaction_gtk_ask_commit_finish;
	((PamacTransactionClass *) klass)->edit_build_files = (void (*) (PamacTransaction*, GPtrArray*, GAsyncReadyCallback, gpointer)) pamac_transaction_gtk_real_edit_build_files;
	((PamacTransactionClass *) klass)->edit_build_files_finish = (void (*) (PamacTransaction*, GAsyncResult*)) pamac_transaction_gtk_edit_build_files_finish;
	((PamacTransactionClass *) klass)->ask_snap_install_classic = (void (*) (PamacTransaction*, const gchar*, GAsyncReadyCallback, gpointer)) pamac_transaction_gtk_real_ask_snap_install_classic;
	((PamacTransactionClass *) klass)->ask_snap_install_classic_finish = (gboolean (*) (PamacTransaction*, GAsyncResult*)) pamac_transaction_gtk_ask_snap_install_classic_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_pamac_transaction_gtk_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_pamac_transaction_gtk_set_property;
	G_OBJECT_CLASS (klass)->constructor = pamac_transaction_gtk_constructor;
	G_OBJECT_CLASS (klass)->finalize = pamac_transaction_gtk_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_TRANSACTION_GTK_APPLICATION_PROPERTY, pamac_transaction_gtk_properties[PAMAC_TRANSACTION_GTK_APPLICATION_PROPERTY] = g_param_spec_object ("application", "application", "application", gtk_application_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_TRANSACTION_GTK_LOCAL_CONFIG_PROPERTY, pamac_transaction_gtk_properties[PAMAC_TRANSACTION_GTK_LOCAL_CONFIG_PROPERTY] = g_param_spec_object ("local-config", "local-config", "local-config", PAMAC_TYPE_LOCAL_CONFIG, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_TRANSACTION_GTK_NO_CONFIRM_UPGRADE_PROPERTY, pamac_transaction_gtk_properties[PAMAC_TRANSACTION_GTK_NO_CONFIRM_UPGRADE_PROPERTY] = g_param_spec_boolean ("no-confirm-upgrade", "no-confirm-upgrade", "no-confirm-upgrade", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	pamac_transaction_gtk_signals[PAMAC_TRANSACTION_GTK_TRANSACTION_SUM_POPULATED_SIGNAL] = g_signal_new ("transaction-sum-populated", PAMAC_TYPE_TRANSACTION_GTK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
pamac_transaction_gtk_instance_init (PamacTransactionGtk * self,
                                     gpointer klass)
{
	self->priv = pamac_transaction_gtk_get_instance_private (self);
	g_rec_mutex_init (&self->priv->__lock_transaction_summary);
	g_rec_mutex_init (&self->priv->__lock_current_action);
}

static void
pamac_transaction_gtk_finalize (GObject * obj)
{
	PamacTransactionGtk * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PAMAC_TYPE_TRANSACTION_GTK, PamacTransactionGtk);
	g_rec_mutex_clear (&self->priv->__lock_transaction_summary);
	_g_hash_table_unref0 (self->priv->transaction_summary);
	_g_string_free0 (self->priv->warning_textbuffer);
	g_rec_mutex_clear (&self->priv->__lock_current_action);
	_g_free0 (self->priv->current_action);
	_g_object_unref0 (self->progress_box);
	_g_object_unref0 (self->details_window);
	_g_object_unref0 (self->details_textview);
	_g_object_unref0 (self->build_files_notebook);
	_g_object_unref0 (self->priv->_application);
	_g_object_unref0 (self->priv->_local_config);
	G_OBJECT_CLASS (pamac_transaction_gtk_parent_class)->finalize (obj);
}

static GType
pamac_transaction_gtk_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PamacTransactionGtkClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pamac_transaction_gtk_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PamacTransactionGtk), 0, (GInstanceInitFunc) pamac_transaction_gtk_instance_init, NULL };
	GType pamac_transaction_gtk_type_id;
	pamac_transaction_gtk_type_id = g_type_register_static (PAMAC_TYPE_TRANSACTION, "PamacTransactionGtk", &g_define_type_info, 0);
	PamacTransactionGtk_private_offset = g_type_add_instance_private (pamac_transaction_gtk_type_id, sizeof (PamacTransactionGtkPrivate));
	return pamac_transaction_gtk_type_id;
}

GType
pamac_transaction_gtk_get_type (void)
{
	static volatile gsize pamac_transaction_gtk_type_id__once = 0;
	if (g_once_init_enter (&pamac_transaction_gtk_type_id__once)) {
		GType pamac_transaction_gtk_type_id;
		pamac_transaction_gtk_type_id = pamac_transaction_gtk_get_type_once ();
		g_once_init_leave (&pamac_transaction_gtk_type_id__once, pamac_transaction_gtk_type_id);
	}
	return pamac_transaction_gtk_type_id__once;
}

static void
_vala_pamac_transaction_gtk_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	PamacTransactionGtk * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PAMAC_TYPE_TRANSACTION_GTK, PamacTransactionGtk);
	switch (property_id) {
		case PAMAC_TRANSACTION_GTK_APPLICATION_PROPERTY:
		g_value_set_object (value, pamac_transaction_gtk_get_application (self));
		break;
		case PAMAC_TRANSACTION_GTK_LOCAL_CONFIG_PROPERTY:
		g_value_set_object (value, pamac_transaction_gtk_get_local_config (self));
		break;
		case PAMAC_TRANSACTION_GTK_NO_CONFIRM_UPGRADE_PROPERTY:
		g_value_set_boolean (value, pamac_transaction_gtk_get_no_confirm_upgrade (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_pamac_transaction_gtk_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	PamacTransactionGtk * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PAMAC_TYPE_TRANSACTION_GTK, PamacTransactionGtk);
	switch (property_id) {
		case PAMAC_TRANSACTION_GTK_APPLICATION_PROPERTY:
		pamac_transaction_gtk_set_application (self, g_value_get_object (value));
		break;
		case PAMAC_TRANSACTION_GTK_LOCAL_CONFIG_PROPERTY:
		pamac_transaction_gtk_set_local_config (self, g_value_get_object (value));
		break;
		case PAMAC_TRANSACTION_GTK_NO_CONFIRM_UPGRADE_PROPERTY:
		pamac_transaction_gtk_set_no_confirm_upgrade (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

