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

/*
 *  pamac-vala
 *
 *  Copyright (C) 2014-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 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a get of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

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

#define VERSION "10.7.0"
#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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define PAMAC_TYPE_MANAGER_WINDOW (pamac_manager_window_get_type ())
#define PAMAC_MANAGER_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_MANAGER_WINDOW, PamacManagerWindow))
#define PAMAC_MANAGER_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_MANAGER_WINDOW, PamacManagerWindowClass))
#define PAMAC_IS_MANAGER_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_MANAGER_WINDOW))
#define PAMAC_IS_MANAGER_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_MANAGER_WINDOW))
#define PAMAC_MANAGER_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_MANAGER_WINDOW, PamacManagerWindowClass))

typedef struct _PamacManagerWindow PamacManagerWindow;
typedef struct _PamacManagerWindowClass PamacManagerWindowClass;
typedef struct _PamacManagerWindowPrivate PamacManagerWindowPrivate;

#define PAMAC_TYPE_BACK_ROW (pamac_back_row_get_type ())
#define PAMAC_BACK_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_BACK_ROW, PamacBackRow))
#define PAMAC_BACK_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_BACK_ROW, PamacBackRowClass))
#define PAMAC_IS_BACK_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_BACK_ROW))
#define PAMAC_IS_BACK_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_BACK_ROW))
#define PAMAC_BACK_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_BACK_ROW, PamacBackRowClass))

typedef struct _PamacBackRow PamacBackRow;
typedef struct _PamacBackRowClass PamacBackRowClass;

#define PAMAC_TYPE_SIMPLE_ROW (pamac_simple_row_get_type ())
#define PAMAC_SIMPLE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_SIMPLE_ROW, PamacSimpleRow))
#define PAMAC_SIMPLE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_SIMPLE_ROW, PamacSimpleRowClass))
#define PAMAC_IS_SIMPLE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_SIMPLE_ROW))
#define PAMAC_IS_SIMPLE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_SIMPLE_ROW))
#define PAMAC_SIMPLE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_SIMPLE_ROW, PamacSimpleRowClass))

typedef struct _PamacSimpleRow PamacSimpleRow;
typedef struct _PamacSimpleRowClass PamacSimpleRowClass;

#define PAMAC_TYPE_PREFERENCES_WINDOW (pamac_preferences_window_get_type ())
#define PAMAC_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_PREFERENCES_WINDOW, PamacPreferencesWindow))
#define PAMAC_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_PREFERENCES_WINDOW, PamacPreferencesWindowClass))
#define PAMAC_IS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_PREFERENCES_WINDOW))
#define PAMAC_IS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_PREFERENCES_WINDOW))
#define PAMAC_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_PREFERENCES_WINDOW, PamacPreferencesWindowClass))

typedef struct _PamacPreferencesWindow PamacPreferencesWindow;
typedef struct _PamacPreferencesWindowClass PamacPreferencesWindowClass;
enum  {
	PAMAC_MANAGER_WINDOW_0_PROPERTY,
	PAMAC_MANAGER_WINDOW_DATABASE_PROPERTY,
	PAMAC_MANAGER_WINDOW_MOBILE_PROPERTY,
	PAMAC_MANAGER_WINDOW_ENABLE_AUR_PROPERTY,
	PAMAC_MANAGER_WINDOW_NUM_PROPERTIES
};
static GParamSpec* pamac_manager_window_properties[PAMAC_MANAGER_WINDOW_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
typedef struct _Block8Data Block8Data;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

#define PAMAC_TYPE_HISTORY_DIALOG (pamac_history_dialog_get_type ())
#define PAMAC_HISTORY_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_HISTORY_DIALOG, PamacHistoryDialog))
#define PAMAC_HISTORY_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_HISTORY_DIALOG, PamacHistoryDialogClass))
#define PAMAC_IS_HISTORY_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_HISTORY_DIALOG))
#define PAMAC_IS_HISTORY_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_HISTORY_DIALOG))
#define PAMAC_HISTORY_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_HISTORY_DIALOG, PamacHistoryDialogClass))

typedef struct _PamacHistoryDialog PamacHistoryDialog;
typedef struct _PamacHistoryDialogClass PamacHistoryDialogClass;
typedef struct _Block9Data Block9Data;
typedef struct _Block10Data Block10Data;

#define PAMAC_TYPE_PACKAGE_ROW (pamac_package_row_get_type ())
#define PAMAC_PACKAGE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_PACKAGE_ROW, PamacPackageRow))
#define PAMAC_PACKAGE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_PACKAGE_ROW, PamacPackageRowClass))
#define PAMAC_IS_PACKAGE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_PACKAGE_ROW))
#define PAMAC_IS_PACKAGE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_PACKAGE_ROW))
#define PAMAC_PACKAGE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_PACKAGE_ROW, PamacPackageRowClass))

typedef struct _PamacPackageRow PamacPackageRow;
typedef struct _PamacPackageRowClass PamacPackageRowClass;
typedef struct _PamacPackageRowPrivate PamacPackageRowPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _PamacManagerWindowGetScreenshotsImagesData PamacManagerWindowGetScreenshotsImagesData;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _Block11Data Block11Data;
typedef struct _Block12Data Block12Data;
typedef struct _Block13Data Block13Data;
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
typedef struct _Block14Data Block14Data;
typedef struct _Block15Data Block15Data;
typedef struct _Block16Data Block16Data;
typedef struct _Block17Data Block17Data;

#define PAMAC_TYPE_UPDATES_DIALOG (pamac_updates_dialog_get_type ())
#define PAMAC_UPDATES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_UPDATES_DIALOG, PamacUpdatesDialog))
#define PAMAC_UPDATES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_UPDATES_DIALOG, PamacUpdatesDialogClass))
#define PAMAC_IS_UPDATES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_UPDATES_DIALOG))
#define PAMAC_IS_UPDATES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_UPDATES_DIALOG))
#define PAMAC_UPDATES_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_UPDATES_DIALOG, PamacUpdatesDialogClass))

typedef struct _PamacUpdatesDialog PamacUpdatesDialog;
typedef struct _PamacUpdatesDialogClass PamacUpdatesDialogClass;
typedef struct _Block18Data Block18Data;
typedef struct _PamacUpdatesDialogPrivate PamacUpdatesDialogPrivate;
typedef struct _Block19Data Block19Data;
typedef struct _PamacManagerWindowGetPendingAurPkgsData PamacManagerWindowGetPendingAurPkgsData;
typedef struct _PamacManagerWindowGetPendingPkgsData PamacManagerWindowGetPendingPkgsData;
typedef struct _Block20Data Block20Data;
typedef struct _PamacManagerWindowSearchAllPkgsData PamacManagerWindowSearchAllPkgsData;
typedef struct _Block21Data Block21Data;
typedef struct _Block22Data Block22Data;
typedef struct _Block23Data Block23Data;
typedef struct _PamacManagerWindowGetAllInstalledData PamacManagerWindowGetAllInstalledData;
typedef struct _Block24Data Block24Data;
typedef struct _Block25Data Block25Data;
typedef struct _PamacManagerWindowGetCategoryPkgsData PamacManagerWindowGetCategoryPkgsData;
typedef struct _Block26Data Block26Data;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

struct _PamacManagerWindow {
	HdyApplicationWindow parent_instance;
	PamacManagerWindowPrivate * priv;
	GtkStack* main_stack;
	GtkButton* button_back;
	HdyLeaflet* packages_leaflet;
	GtkButton* search_button;
	GtkSearchEntry* search_entry;
	HdyFlap* browse_flap;
	GtkStack* view_stack;
	HdyViewSwitcherTitle* view_stack_switcher;
	GtkBox* main_details_box;
	GtkButton* details_button;
	GtkButton* apply_button;
	GtkRevealer* infobox_revealer;
	GQueue* display_package_queue;
	PamacTransactionGtk* transaction;
	PamacLocalConfig* local_config;
	gboolean important_details;
	gboolean transaction_running;
	gboolean generate_mirrors_list;
};

struct _PamacManagerWindowClass {
	HdyApplicationWindowClass parent_class;
};

struct _PamacManagerWindowPrivate {
	GtkIconTheme* icon_theme;
	GdkPixbuf* package_icon;
	HdyHeaderBar* headerbar;
	GtkMenuButton* menu_button;
	GtkFlowBox* packages_listbox;
	GtkRevealer* notification_revealer;
	GtkLabel* notification_label;
	GtkButton* notification_button;
	GtkToggleButton* reveal_sidebar_button;
	GtkToggleButton* reveal_details_button;
	GtkScrolledWindow* browse_head_box_scrolledwindow;
	GtkLabel* sortby_label;
	GtkListBox* filters_listbox;
	GtkListBox* categories_listbox;
	GtkListBox* groups_listbox;
	GtkListBox* repos_listbox;
	GtkListBox* installed_listbox;
	GtkListBox* search_listbox;
	GtkListBox* updates_listbox;
	GtkStack* packages_stack;
	GtkStack* browse_stack;
	GtkButton* remove_all_button;
	GtkButton* install_all_button;
	GtkButton* ignore_all_button;
	GtkComboBoxText* sortby_combobox;
	GtkScrolledWindow* packages_scrolledwindow;
	GtkLabel* updated_label;
	GtkLabel* last_refresh_label;
	GtkLabel* no_item_label;
	GtkLabel* checking_label;
	GtkScrolledWindow* details_scrolledwindow;
	GtkStack* properties_stack;
	GtkStackSwitcher* properties_stack_switcher;
	GtkScrolledWindow* files_scrolledwindow;
	GtkBox* build_files_box;
	GtkBox* deps_box;
	GtkGrid* details_grid;
	GtkLabel* name_label;
	GtkImage* app_image;
	GtkBox* screenshots_box;
	HdyCarousel* screenshots_carousel;
	GtkButton* previous_screenshot_button;
	GtkButton* next_screenshot_button;
	GtkLabel* desc_label;
	GtkLabel* long_desc_label;
	GtkLabel* link_label;
	GtkButton* launch_button;
	GtkToggleButton* remove_togglebutton;
	GtkToggleButton* reinstall_togglebutton;
	GtkToggleButton* install_togglebutton;
	GtkToggleButton* build_togglebutton;
	GtkTextView* files_textview;
	GtkBox* transaction_infobox;
	GtkButton* cancel_button;
	PamacPackage* current_package_displayed;
	gchar* current_launchable;
	gchar* current_files;
	gchar* current_build_files;
	GHashTable* previous_to_install;
	GHashTable* previous_to_remove;
	GHashTable* previous_to_build;
	PamacDatabaseGtk* _database;
	gboolean _mobile;
	gboolean waiting;
	gboolean _enable_aur;
	gboolean updates_checked;
	GPtrArray* repos_updates;
	GPtrArray* aur_updates;
	GPtrArray* flatpak_updates;
	PamacBackRow* categories_backrow;
	PamacSimpleRow* filters_pending_row;
	GtkListBoxRow* filters_pending_row_separator;
	PamacSimpleRow* categories_pending_row;
	GtkListBoxRow* categories_pending_row_separator;
	PamacSimpleRow* installed_snap_row;
	PamacSimpleRow* installed_flatpak_row;
	PamacSimpleRow* search_aur_row;
	PamacSimpleRow* search_snap_row;
	PamacSimpleRow* search_flatpak_row;
	PamacSimpleRow* updates_repos_row;
	PamacSimpleRow* updates_aur_row;
	PamacSimpleRow* updates_flatpak_row;
	PamacSimpleRow* updates_ignored_row;
	gint current_filters_index;
	gchar* previous_view_stack_visible_child_name;
	gchar* current_packages_list_name;
	GPtrArray* current_packages_list;
	guint current_packages_list_length;
	guint current_packages_list_index;
	GPtrArray* current_screenshots;
	guint current_screenshots_index;
	guint screenshots_overlay_timeout_id;
	gboolean scroll_to_top;
	guint in_app_notification_timeout_id;
	gboolean first_details_click;
	GHashTable* previous_snap_to_install;
	GHashTable* previous_snap_to_remove;
	GHashTable* previous_flatpak_to_install;
	GHashTable* previous_flatpak_to_remove;
	PamacPreferencesWindow* preferences_window;
	GSimpleAction* preferences_action;
	GSimpleAction* refresh_action;
	GSimpleAction* install_local_action;
};

struct _Block8Data {
	int _ref_count_;
	PamacManagerWindow* self;
	GSimpleAction* software_mode_action;
	PamacDatabaseGtk* database;
};

struct _Block9Data {
	int _ref_count_;
	PamacManagerWindow* self;
	PamacHistoryDialog* history_dialog;
};

struct _Block10Data {
	int _ref_count_;
	PamacManagerWindow* self;
	GtkFileChooserDialog* chooser;
};

struct _PamacPackageRow {
	GtkFlowBoxChild parent_instance;
	PamacPackageRowPrivate * priv;
	GtkImage* app_icon;
	GtkLabel* name_label;
	GtkLabel* desc_label;
	GtkLabel* old_version_label;
	GtkLabel* version_label;
	GtkLabel* repo_label;
	GtkLabel* size_label;
	GtkToggleButton* action_togglebutton;
	GtkImage* action_icon;
	PamacPackage* pkg;
};

struct _PamacPackageRowClass {
	GtkFlowBoxChildClass parent_class;
};

struct _PamacManagerWindowGetScreenshotsImagesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacManagerWindow* self;
	GPtrArray* urls;
	GPtrArray* url_collection;
	guint url_index;
	const gchar* url;
	GtkImage* image;
	GFile* uri;
	const gchar* _tmp0_;
	GFile* _tmp1_;
	GFile* cached_screenshot;
	GFile* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GFile* _tmp7_;
	GFile* _tmp8_;
	GFile* _tmp9_;
	GFile* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkImage* _tmp13_;
	GtkImage* _tmp14_;
	GInputStream* inputstream;
	PamacDatabaseGtk* _tmp15_;
	const gchar* _tmp16_;
	GInputStream* _tmp17_;
	GdkPixbuf* pixbuf;
	GInputStream* _tmp18_;
	GdkPixbuf* _tmp19_;
	GFileOutputStream* os;
	GFile* _tmp20_;
	GFileOutputStream* _tmp21_;
	GdkPixbuf* _tmp22_;
	GFileOutputStream* _tmp23_;
	GdkPixbuf* _tmp24_;
	GtkImage* _tmp25_;
	GtkImage* _tmp26_;
	GError* e;
	const gchar* _tmp27_;
	GError* _tmp28_;
	const gchar* _tmp29_;
	GtkImage* _tmp30_;
	GPtrArray* _tmp31_;
	GtkImage* _tmp32_;
	GtkImage* _tmp33_;
	HdyCarousel* _tmp34_;
	GtkImage* _tmp35_;
	GPtrArray* _tmp36_;
	gint _tmp37_;
	gint _tmp38_;
	GtkButton* _tmp39_;
	GPtrArray* _tmp40_;
	gint _tmp41_;
	gint _tmp42_;
	GtkBox* _tmp43_;
	GError* _inner_error0_;
};

struct _Block11Data {
	int _ref_count_;
	PamacManagerWindow* self;
	PamacSnapPackage* snap_pkg;
};

struct _Block12Data {
	int _ref_count_;
	Block11Data * _data11_;
	gchar* channel_name;
};

struct _Block13Data {
	int _ref_count_;
	PamacManagerWindow* self;
	PamacAlpmPackage* alpm_pkg;
};

struct _Block14Data {
	int _ref_count_;
	GPtrArray* self;
	GCompareFunc compare_func;
};

struct _Block15Data {
	int _ref_count_;
	PamacManagerWindow* self;
	GdkPixbuf* pixbuf;
	PamacPackageRow* row;
	PamacPackage* pkg;
};

struct _Block16Data {
	int _ref_count_;
	PamacManagerWindow* self;
	PamacPackage* pkg;
};

struct _Block17Data {
	int _ref_count_;
	PamacManagerWindow* self;
	PamacPackageRow* row;
	PamacPackage* pkg;
};

struct _Block18Data {
	int _ref_count_;
	PamacManagerWindow* self;
	PamacUpdatesDialog* updates_dialog;
};

struct _PamacUpdatesDialog {
	GtkDialog parent_instance;
	PamacUpdatesDialogPrivate * priv;
	GtkLabel* label;
	GtkListBox* listbox;
};

struct _PamacUpdatesDialogClass {
	GtkDialogClass parent_class;
};

struct _Block19Data {
	int _ref_count_;
	PamacManagerWindow* self;
	gchar* depstring;
};

struct _PamacManagerWindowGetPendingAurPkgsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacManagerWindow* self;
	GPtrArray* result;
	GPtrArray* aur_pkgs;
	GPtrArray* _tmp0_;
	GPtrArray* to_build_array;
	GHashTable* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	GPtrArray* _tmp4_;
	GHashTableIter _name_it;
	GHashTable* _tmp5_;
	GHashTableIter _tmp6_;
	const gchar* name;
	gconstpointer _tmp7_;
	const gchar* _tmp8_;
	GPtrArray* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	GHashTable* table;
	PamacDatabaseGtk* _tmp12_;
	GPtrArray* _tmp13_;
	GHashTable* _tmp14_;
	GHashTableIter iter;
	GHashTable* _tmp15_;
	PamacAURPackage* aur_pkg;
	gconstpointer _tmp16_;
	gboolean _tmp17_;
	PamacAURPackage* _tmp18_;
	GPtrArray* _tmp19_;
	PamacAURPackage* _tmp20_;
};

struct _PamacManagerWindowGetPendingPkgsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacManagerWindow* self;
	GPtrArray* result;
	GPtrArray* pkgs;
	GPtrArray* _tmp0_;
	GHashTableIter _pkgname_it;
	GHashTable* _tmp1_;
	GHashTableIter _tmp2_;
	const gchar* pkgname;
	gconstpointer _tmp3_;
	const gchar* _tmp4_;
	PamacAlpmPackage* pkg;
	PamacDatabaseGtk* _tmp5_;
	const gchar* _tmp6_;
	PamacAlpmPackage* _tmp7_;
	PamacAlpmPackage* _tmp8_;
	PamacAlpmPackage* _tmp9_;
	PamacDatabaseGtk* _tmp10_;
	const gchar* _tmp11_;
	PamacAlpmPackage* _tmp12_;
	PamacAlpmPackage* _tmp13_;
	PamacAlpmPackage* _tmp14_;
	GPtrArray* _tmp15_;
	PamacAlpmPackage* _tmp16_;
	GHashTableIter _vala1__pkgname_it;
	GHashTable* _tmp17_;
	GHashTableIter _tmp18_;
	const gchar* _vala1_pkgname;
	gconstpointer _tmp19_;
	const gchar* _tmp20_;
	PamacAlpmPackage* _vala1_pkg;
	PamacDatabaseGtk* _tmp21_;
	const gchar* _tmp22_;
	PamacAlpmPackage* _tmp23_;
	PamacAlpmPackage* _tmp24_;
	PamacAlpmPackage* _tmp25_;
	GPtrArray* _tmp26_;
	PamacAlpmPackage* _tmp27_;
	GHashTableIter snap_iter;
	GHashTable* _tmp28_;
	PamacSnapPackage* snap_pkg;
	gconstpointer _tmp29_;
	gboolean _tmp30_;
	GPtrArray* _tmp31_;
	PamacSnapPackage* _tmp32_;
	GHashTable* _tmp33_;
	gconstpointer _tmp34_;
	gboolean _tmp35_;
	GPtrArray* _tmp36_;
	PamacSnapPackage* _tmp37_;
	GHashTableIter flatpak_iter;
	GHashTable* _tmp38_;
	PamacFlatpakPackage* flatpak_pkg;
	gconstpointer _tmp39_;
	gboolean _tmp40_;
	GPtrArray* _tmp41_;
	PamacFlatpakPackage* _tmp42_;
	GHashTable* _tmp43_;
	gconstpointer _tmp44_;
	gboolean _tmp45_;
	GPtrArray* _tmp46_;
	PamacFlatpakPackage* _tmp47_;
	GHashTable* _tmp48_;
	guint _tmp49_;
	guint _tmp50_;
	GPtrArray* aur_pkgs;
	GPtrArray* _tmp51_;
	GPtrArray* _tmp52_;
	GPtrArray* aur_pkg_collection;
	guint aur_pkg_index;
	PamacPackage* aur_pkg;
	GPtrArray* _tmp53_;
	PamacPackage* _tmp54_;
};

struct _Block20Data {
	int _ref_count_;
	PamacManagerWindow* self;
	GPtrArray* pkgs;
	GPtrArray* aur_pkgs;
	GPtrArray* snaps;
	GPtrArray* flatpaks;
	gpointer _async_data_;
};

struct _PamacManagerWindowSearchAllPkgsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacManagerWindow* self;
	GPtrArray* result;
	Block20Data* _data20_;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	GPtrArray* _tmp3_;
	PamacDatabaseGtk* _tmp4_;
	const gchar* _tmp5_;
	gboolean _tmp6_;
	PamacDatabaseGtk* _tmp7_;
	const gchar* _tmp8_;
	PamacDatabaseGtk* _tmp9_;
	PamacConfig* _tmp10_;
	PamacConfig* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	PamacDatabaseGtk* _tmp14_;
	const gchar* _tmp15_;
	PamacDatabaseGtk* _tmp16_;
	PamacConfig* _tmp17_;
	PamacConfig* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	PamacDatabaseGtk* _tmp21_;
	const gchar* _tmp22_;
	gboolean _tmp23_;
	PamacDatabaseGtk* _tmp24_;
	PamacConfig* _tmp25_;
	PamacConfig* _tmp26_;
	gboolean _tmp27_;
	gboolean _tmp28_;
	PamacDatabaseGtk* _tmp29_;
	PamacConfig* _tmp30_;
	PamacConfig* _tmp31_;
	gboolean _tmp32_;
	gboolean _tmp33_;
	GPtrArray* _tmp34_;
	GPtrArray* pkg_collection;
	guint pkg_index;
	PamacAURPackage* pkg;
	PamacAURPackage* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	GPtrArray* _tmp38_;
	PamacAURPackage* _tmp39_;
	GPtrArray* _tmp40_;
	GPtrArray* _tmp41_;
	GPtrArray* _tmp42_;
	GPtrArray* _tmp43_;
	GPtrArray* _tmp44_;
	GPtrArray* _tmp45_;
};

struct _Block21Data {
	int _ref_count_;
	PamacManagerWindow* self;
	const gchar* category_name;
	gchar* category;
};

struct _Block22Data {
	int _ref_count_;
	PamacManagerWindow* self;
	const gchar* group_name;
};

struct _Block23Data {
	int _ref_count_;
	PamacManagerWindow* self;
	GPtrArray* pkgs;
	GPtrArray* snaps;
	GPtrArray* flatpaks;
	gpointer _async_data_;
};

struct _PamacManagerWindowGetAllInstalledData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacManagerWindow* self;
	GPtrArray* result;
	Block23Data* _data23_;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	PamacDatabaseGtk* _tmp3_;
	PamacDatabaseGtk* _tmp4_;
	PamacConfig* _tmp5_;
	PamacConfig* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	PamacDatabaseGtk* _tmp9_;
	PamacDatabaseGtk* _tmp10_;
	PamacConfig* _tmp11_;
	PamacConfig* _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	PamacDatabaseGtk* _tmp15_;
	PamacDatabaseGtk* _tmp16_;
	PamacConfig* _tmp17_;
	PamacConfig* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	PamacDatabaseGtk* _tmp21_;
	PamacConfig* _tmp22_;
	PamacConfig* _tmp23_;
	gboolean _tmp24_;
	gboolean _tmp25_;
	GPtrArray* _tmp26_;
	GPtrArray* _tmp27_;
	GPtrArray* _tmp28_;
	GPtrArray* _tmp29_;
	GPtrArray* _tmp30_;
	GPtrArray* _tmp31_;
};

struct _Block24Data {
	int _ref_count_;
	PamacManagerWindow* self;
	const gchar* repo;
};

struct _Block25Data {
	int _ref_count_;
	PamacManagerWindow* self;
	GPtrArray* pkgs;
	GPtrArray* snaps;
	GPtrArray* flatpaks;
	gpointer _async_data_;
};

struct _PamacManagerWindowGetCategoryPkgsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacManagerWindow* self;
	gchar* category;
	GPtrArray* result;
	Block25Data* _data25_;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	GPtrArray* _tmp3_;
	PamacDatabaseGtk* _tmp4_;
	PamacDatabaseGtk* _tmp5_;
	PamacConfig* _tmp6_;
	PamacConfig* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	PamacDatabaseGtk* _tmp10_;
	PamacDatabaseGtk* _tmp11_;
	PamacConfig* _tmp12_;
	PamacConfig* _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	PamacDatabaseGtk* _tmp16_;
	PamacDatabaseGtk* _tmp17_;
	PamacConfig* _tmp18_;
	PamacConfig* _tmp19_;
	gboolean _tmp20_;
	gboolean _tmp21_;
	PamacDatabaseGtk* _tmp22_;
	PamacConfig* _tmp23_;
	PamacConfig* _tmp24_;
	gboolean _tmp25_;
	gboolean _tmp26_;
	GPtrArray* _tmp27_;
	GPtrArray* _tmp28_;
	GPtrArray* _tmp29_;
	GPtrArray* _tmp30_;
	GPtrArray* _tmp31_;
	GPtrArray* _tmp32_;
};

struct _Block26Data {
	int _ref_count_;
	PamacManagerWindow* self;
	gboolean check_aur_updates_backup;
};

VALA_EXTERN gchar* pamac_search_string;
gchar* pamac_search_string = NULL;
VALA_EXTERN GPtrArray* pamac_repos_names;
GPtrArray* pamac_repos_names = NULL;
VALA_EXTERN GHashTable* pamac_to_install;
GHashTable* pamac_to_install = NULL;
VALA_EXTERN GHashTable* pamac_to_remove;
GHashTable* pamac_to_remove = NULL;
VALA_EXTERN GHashTable* pamac_to_load;
GHashTable* pamac_to_load = NULL;
VALA_EXTERN GHashTable* pamac_to_build;
GHashTable* pamac_to_build = NULL;
VALA_EXTERN GHashTable* pamac_to_update;
GHashTable* pamac_to_update = NULL;
VALA_EXTERN GHashTable* pamac_temporary_ignorepkgs;
GHashTable* pamac_temporary_ignorepkgs = NULL;
VALA_EXTERN GHashTable* pamac_snap_to_install;
GHashTable* pamac_snap_to_install = NULL;
VALA_EXTERN GHashTable* pamac_snap_to_remove;
GHashTable* pamac_snap_to_remove = NULL;
VALA_EXTERN GHashTable* pamac_flatpak_to_install;
GHashTable* pamac_flatpak_to_install = NULL;
VALA_EXTERN GHashTable* pamac_flatpak_to_remove;
GHashTable* pamac_flatpak_to_remove = NULL;
static gint PamacManagerWindow_private_offset;
static gpointer pamac_manager_window_parent_class = NULL;

VALA_EXTERN gint pamac_sort_search_pkgs_by_relevance (PamacPackage* pkg_a,
                                          PamacPackage* pkg_b);
VALA_EXTERN gint pamac_sort_pkgs_by_relevance (PamacPackage* pkg_a,
                                   PamacPackage* pkg_b);
VALA_EXTERN gint pamac_sort_pkgs_by_name (PamacPackage* pkg_a,
                              PamacPackage* pkg_b);
VALA_EXTERN gint pamac_sort_pkgs_by_repo_real (PamacPackage* pkg_a,
                                   PamacPackage* pkg_b);
VALA_EXTERN gint pamac_compare_pkgs_by_name (PamacPackage* pkg_a,
                                 PamacPackage* pkg_b);
VALA_EXTERN gint pamac_sort_pkgs_by_repo (PamacPackage* pkg_a,
                              PamacPackage* pkg_b);
VALA_EXTERN gint pamac_sort_pkgs_by_installed_size (PamacPackage* pkg_a,
                                        PamacPackage* pkg_b);
VALA_EXTERN gint pamac_sort_pkgs_by_download_size (PamacPackage* pkg_a,
                                       PamacPackage* pkg_b);
VALA_EXTERN gint pamac_sort_aur_by_relevance (PamacPackage* pkg_1,
                                  PamacPackage* pkg_2);
VALA_EXTERN gint pamac_sort_pkgs_by_date (PamacPackage* pkg_a,
                              PamacPackage* pkg_b);
VALA_EXTERN gint pamac_sort_aur_by_date (PamacPackage* pkg_1,
                             PamacPackage* pkg_2);
VALA_EXTERN GType pamac_manager_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacManagerWindow, g_object_unref)
VALA_EXTERN GType pamac_back_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacBackRow, g_object_unref)
VALA_EXTERN GType pamac_simple_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacSimpleRow, g_object_unref)
VALA_EXTERN GType pamac_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacPreferencesWindow, g_object_unref)
static void _g_object_unref0_ (gpointer var);
static inline void _g_queue_free__g_object_unref0_ (GQueue* self);
VALA_EXTERN PamacManagerWindow* pamac_manager_window_new (GtkApplication* application,
                                              PamacDatabaseGtk* database,
                                              gboolean mobile);
VALA_EXTERN PamacManagerWindow* pamac_manager_window_construct (GType object_type,
                                                    GtkApplication* application,
                                                    PamacDatabaseGtk* database,
                                                    gboolean mobile);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static void pamac_manager_window_on_screenshots_carousel_enter (PamacManagerWindow* self);
static void _pamac_manager_window_on_screenshots_carousel_enter_gtk_event_controller_motion_enter (GtkEventControllerMotion* _sender,
                                                                                            gdouble x,
                                                                                            gdouble y,
                                                                                            gpointer self);
static void pamac_manager_window_on_screenshots_carousel_leave (PamacManagerWindow* self);
static void _pamac_manager_window_on_screenshots_carousel_leave_gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                                            gpointer self);
static void pamac_manager_window_create_all_listbox (PamacManagerWindow* self);
static void pamac_manager_window_check_aur_support (PamacManagerWindow* self);
static void pamac_manager_window_check_snap_support (PamacManagerWindow* self);
static void pamac_manager_window_check_flatpak_support (PamacManagerWindow* self);
static void __lambda4_ (PamacManagerWindow* self);
static void ___lambda4__g_simple_action_activate (GSimpleAction* _sender,
                                           GVariant* parameter,
                                           gpointer self);
static void __lambda5_ (PamacManagerWindow* self);
static void ___lambda5__g_simple_action_activate (GSimpleAction* _sender,
                                           GVariant* parameter,
                                           gpointer self);
static void __lambda6_ (PamacManagerWindow* self);
static void pamac_manager_window_refresh_details (PamacManagerWindow* self);
VALA_EXTERN void pamac_manager_window_set_adaptative_details (PamacManagerWindow* self,
                                                  gboolean enabled);
VALA_EXTERN void pamac_manager_window_refresh_packages_list (PamacManagerWindow* self);
static void ___lambda6__g_simple_action_activate (GSimpleAction* _sender,
                                           GVariant* parameter,
                                           gpointer self);
static void __lambda59_ (Block8Data* _data8_);
static void pamac_manager_window_set_enable_aur (PamacManagerWindow* self,
                                          gboolean value);
static void ___lambda59__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
static void __lambda60_ (PamacManagerWindow* self);
static void pamac_manager_window_run_sysupgrade (PamacManagerWindow* self,
                                          gboolean force_refresh,
                                          gboolean no_confirm_upgrade);
static void ___lambda60__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
static void __lambda63_ (PamacManagerWindow* self);
VALA_EXTERN GType pamac_history_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacHistoryDialog, g_object_unref)
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
VALA_EXTERN PamacHistoryDialog* pamac_history_dialog_new (GtkApplicationWindow* window);
VALA_EXTERN PamacHistoryDialog* pamac_history_dialog_construct (GType object_type,
                                                    GtkApplicationWindow* window);
static void __lambda64_ (Block9Data* _data9_);
static void ___lambda64__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
static void ___lambda63__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
static void __lambda65_ (PamacManagerWindow* self);
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
static void __lambda66_ (Block10Data* _data10_,
                  gint res);
static void pamac_manager_window_run_transaction (PamacManagerWindow* self,
                                           gboolean no_confirm_upgrade);
static void _g_free0_ (gpointer var);
static inline void _g_slist_free__g_free0_ (GSList* self);
static void ___lambda66__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
static void ___lambda65__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
static void __lambda67_ (Block8Data* _data8_);
static void __lambda68_ (Block8Data* _data8_,
                  GObject* obj,
                  GAsyncResult* res);
VALA_EXTERN PamacPreferencesWindow* pamac_preferences_window_new (PamacManagerWindow* window,
                                                      PamacLocalConfig* local_config);
VALA_EXTERN PamacPreferencesWindow* pamac_preferences_window_construct (GType object_type,
                                                            PamacManagerWindow* window,
                                                            PamacLocalConfig* local_config);
static gboolean ____lambda69_ (Block8Data* _data8_);
static gboolean _____lambda69__gtk_widget_delete_event (GtkWidget* _sender,
                                                 GdkEventAny* event,
                                                 gpointer self);
static void ___lambda68__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ___lambda67__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
static void __lambda70_ (PamacManagerWindow* self);
static void ___lambda70__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
static void __lambda71_ (PamacManagerWindow* self);
static gboolean pamac_manager_window_complete_packages_list (PamacManagerWindow* self);
static void ___lambda71__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                gpointer self);
static void __lambda72_ (PamacManagerWindow* self);
static gboolean pamac_manager_window_need_more_packages (PamacManagerWindow* self);
static void ___lambda72__gtk_adjustment_changed (GtkAdjustment* _sender,
                                          gpointer self);
static void pamac_manager_window_update_icons (PamacManagerWindow* self);
static void __lambda73_ (PamacManagerWindow* self);
static void __lambda74_ (PamacManagerWindow* self,
                  GtkWidget* child);
VALA_EXTERN GType pamac_package_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacPackageRow, g_object_unref)
static void pamac_manager_window_set_row_app_icon (PamacManagerWindow* self,
                                            PamacPackageRow* row,
                                            PamacPackage* pkg);
static void ___lambda74__gtk_callback (GtkWidget* widget,
                                gpointer self);
static void ___lambda73__gtk_icon_theme_changed (GtkIconTheme* _sender,
                                          gpointer self);
static void pamac_manager_window_on_get_updates_progress (PamacManagerWindow* self,
                                                   guint percent);
static void _pamac_manager_window_on_get_updates_progress_pamac_database_get_updates_progress (PamacDatabase* _sender,
                                                                                        guint percent,
                                                                                        gpointer self);
static void pamac_manager_window_on_start_waiting (PamacManagerWindow* self);
static void _pamac_manager_window_on_start_waiting_pamac_transaction_start_waiting (PamacTransaction* _sender,
                                                                             gpointer self);
static void pamac_manager_window_on_stop_waiting (PamacManagerWindow* self);
static void _pamac_manager_window_on_stop_waiting_pamac_transaction_stop_waiting (PamacTransaction* _sender,
                                                                           gpointer self);
static void pamac_manager_window_on_start_preparing (PamacManagerWindow* self);
static void _pamac_manager_window_on_start_preparing_pamac_transaction_start_preparing (PamacTransaction* _sender,
                                                                                 gpointer self);
static void pamac_manager_window_on_stop_preparing (PamacManagerWindow* self);
static void _pamac_manager_window_on_stop_preparing_pamac_transaction_stop_preparing (PamacTransaction* _sender,
                                                                               gpointer self);
static void pamac_manager_window_on_start_downloading (PamacManagerWindow* self);
static void _pamac_manager_window_on_start_downloading_pamac_transaction_start_downloading (PamacTransaction* _sender,
                                                                                     gpointer self);
static void pamac_manager_window_on_stop_downloading (PamacManagerWindow* self);
static void _pamac_manager_window_on_stop_downloading_pamac_transaction_stop_downloading (PamacTransaction* _sender,
                                                                                   gpointer self);
static void pamac_manager_window_on_start_building (PamacManagerWindow* self);
static void _pamac_manager_window_on_start_building_pamac_transaction_start_building (PamacTransaction* _sender,
                                                                               gpointer self);
static void pamac_manager_window_on_stop_building (PamacManagerWindow* self);
static void _pamac_manager_window_on_stop_building_pamac_transaction_stop_building (PamacTransaction* _sender,
                                                                             gpointer self);
static void pamac_manager_window_on_important_details_outpout (PamacManagerWindow* self,
                                                        gboolean must_show);
static void _pamac_manager_window_on_important_details_outpout_pamac_transaction_important_details_outpout (PamacTransaction* _sender,
                                                                                                     gboolean must_show,
                                                                                                     gpointer self);
static void __lambda75_ (PamacManagerWindow* self);
static void pamac_manager_window_refresh_listbox_buttons (PamacManagerWindow* self);
static void ___lambda75__pamac_transaction_gtk_transaction_sum_populated (PamacTransactionGtk* _sender,
                                                                   gpointer self);
static void pamac_manager_window_close_in_app_notification (PamacManagerWindow* self);
static void _pamac_manager_window_close_in_app_notification_gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self);
static void pamac_manager_window_on_main_stack_visible_child_changed (PamacManagerWindow* self);
static void _pamac_manager_window_on_main_stack_visible_child_changed_g_object_notify (GObject* _sender,
                                                                                GParamSpec* pspec,
                                                                                gpointer self);
static void pamac_manager_window_on_view_stack_visible_child_changed (PamacManagerWindow* self);
static void _pamac_manager_window_on_view_stack_visible_child_changed_g_object_notify (GObject* _sender,
                                                                                GParamSpec* pspec,
                                                                                gpointer self);
static void pamac_manager_window_on_browse_stack_visible_child_changed (PamacManagerWindow* self);
static void _pamac_manager_window_on_browse_stack_visible_child_changed_g_object_notify (GObject* _sender,
                                                                                  GParamSpec* pspec,
                                                                                  gpointer self);
static void pamac_manager_window_on_properties_stack_visible_child_changed (PamacManagerWindow* self);
static void _pamac_manager_window_on_properties_stack_visible_child_changed_g_object_notify (GObject* _sender,
                                                                                      GParamSpec* pspec,
                                                                                      gpointer self);
static void pamac_manager_window_on_packages_leaflet_folded_changed (PamacManagerWindow* self);
static void _pamac_manager_window_on_packages_leaflet_folded_changed_g_object_notify (GObject* _sender,
                                                                               GParamSpec* pspec,
                                                                               gpointer self);
static gboolean __lambda79_ (PamacManagerWindow* self,
                      GdkEventKey* event);
static gboolean ___lambda79__gtk_widget_key_press_event (GtkWidget* _sender,
                                                  GdkEventKey* event,
                                                  gpointer self);
static gboolean pamac_manager_window_on_window_delete_event (PamacManagerWindow* self);
static void _g_variant_unref0_ (gpointer var);
static gboolean _pamac_manager_window_on_window_delete_event_gtk_widget_delete_event (GtkWidget* _sender,
                                                                               GdkEventAny* event,
                                                                               gpointer self);
static void pamac_manager_window_show_sidebar (PamacManagerWindow* self,
                                        gboolean visible);
VALA_EXTERN gboolean pamac_manager_window_get_mobile (PamacManagerWindow* self);
VALA_EXTERN PamacDatabaseGtk* pamac_manager_window_get_database (PamacManagerWindow* self);
VALA_EXTERN gboolean pamac_manager_window_get_enable_aur (PamacManagerWindow* self);
VALA_EXTERN const gchar* pamac_simple_row_get_title (PamacSimpleRow* self);
static void pamac_manager_window_set_pending_operations (PamacManagerWindow* self);
VALA_EXTERN PamacSimpleRow* pamac_simple_row_new (const gchar* title);
VALA_EXTERN PamacSimpleRow* pamac_simple_row_construct (GType object_type,
                                            const gchar* title);
VALA_EXTERN PamacBackRow* pamac_back_row_new (void);
VALA_EXTERN PamacBackRow* pamac_back_row_construct (GType object_type);
static void pamac_manager_window_clear_packages_listbox (PamacManagerWindow* self);
static void __lambda15_ (PamacManagerWindow* self,
                  GtkWidget* child);
static void ___lambda15__gtk_callback (GtkWidget* widget,
                                gpointer self);
static void pamac_manager_window_clear_lists (PamacManagerWindow* self);
static void pamac_manager_window_clear_previous_lists (PamacManagerWindow* self);
static void pamac_manager_window_on_mark_explicit_button_clicked (PamacManagerWindow* self,
                                                           GtkButton* button);
static void __lambda10_ (PamacManagerWindow* self);
static void ___lambda10__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static GtkWidget* pamac_manager_window_populate_details_grid (PamacManagerWindow* self,
                                                       const gchar* detail_type,
                                                       const gchar* detail,
                                                       GtkWidget* previous_widget);
static void _pamac_manager_window_on_mark_explicit_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                               gpointer self);
static gchar* pamac_manager_window_find_install_button_dep_name (PamacManagerWindow* self,
                                                          GtkButton* button,
                                                          GtkImage** select_image);
static void pamac_manager_window_on_install_dep_button_toggled (PamacManagerWindow* self,
                                                         GtkToggleButton* button);
static void pamac_manager_window_on_next_screenshot_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_next_screenshot_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self);
static void pamac_manager_window_on_previous_screenshot_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_previous_screenshot_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                     gpointer self);
static void pamac_manager_window_on_screenshots_carousel_page_changed (PamacManagerWindow* self,
                                                                guint index);
static void _pamac_manager_window_on_screenshots_carousel_page_changed_hdy_carousel_page_changed (HdyCarousel* _sender,
                                                                                           guint index,
                                                                                           gpointer self);
static gboolean pamac_manager_window_remove_screenshots_overlay_timeout (PamacManagerWindow* self);
static gboolean pamac_manager_window_screenshots_overlay_timeout_callback (PamacManagerWindow* self);
static gboolean _pamac_manager_window_screenshots_overlay_timeout_callback_gsource_func (gpointer self);
static void pamac_manager_window_populate_deps_box (PamacManagerWindow* self,
                                             const gchar* dep_type,
                                             GPtrArray* dep_list,
                                             gboolean add_install_button);
static void _pamac_manager_window_on_install_dep_button_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                    gpointer self);
static void pamac_manager_window_on_deps_listbox_row_activated (PamacManagerWindow* self,
                                                         GtkListBoxRow* row);
static void _pamac_manager_window_on_deps_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                     GtkListBoxRow* row,
                                                                                     gpointer self);
static void pamac_manager_window_get_screenshots_images_data_free (gpointer _data);
static void pamac_manager_window_get_screenshots_images (PamacManagerWindow* self,
                                                  GPtrArray* urls,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static void pamac_manager_window_get_screenshots_images_finish (PamacManagerWindow* self,
                                                         GAsyncResult* _res_);
static gboolean pamac_manager_window_get_screenshots_images_co (PamacManagerWindowGetScreenshotsImagesData* _data_);
static void pamac_manager_window_get_screenshots_images_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_);
static void pamac_manager_window_clear_details_grid (PamacManagerWindow* self);
static void pamac_manager_window_clear_deps_box (PamacManagerWindow* self);
static void __lambda8_ (PamacManagerWindow* self,
                 GtkWidget* child);
static void ___lambda8__gtk_callback (GtkWidget* widget,
                               gpointer self);
static void pamac_manager_window_clear_screenshots_carousel (PamacManagerWindow* self);
static void __lambda9_ (PamacManagerWindow* self,
                 GtkWidget* child);
static void ___lambda9__gtk_callback (GtkWidget* widget,
                               gpointer self);
static void pamac_manager_window_set_screenshots (PamacManagerWindow* self,
                                           PamacPackage* pkg);
static void pamac_manager_window_set_package_details (PamacManagerWindow* self,
                                               PamacAlpmPackage* pkg,
                                               PamacAURPackage* aur_pkg);
static void pamac_manager_window_set_aur_details (PamacManagerWindow* self,
                                           PamacAURPackage* aur_pkg);
static void pamac_manager_window_set_snap_details (PamacManagerWindow* self,
                                            PamacSnapPackage* snap_pkg);
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static void ____lambda52_ (PamacManagerWindow* self,
                    GObject* obj,
                    GAsyncResult* res);
static void _____lambda52__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void _____lambda53_ (Block11Data* _data11_,
                     GObject* obj,
                     GAsyncResult* res);
static void ______lambda53__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
static Block12Data* block12_data_ref (Block12Data* _data12_);
static void block12_data_unref (void * _userdata_);
static void ________lambda54_ (Block12Data* _data12_,
                        GtkButton* button);
static void __lambda55_ (Block12Data* _data12_);
static void ___lambda56_ (PamacManagerWindow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda56__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda55__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void _________lambda54__gtk_button_clicked (GtkButton* _sender,
                                            gpointer self);
static void pamac_manager_window_set_flatpak_details (PamacManagerWindow* self,
                                               PamacFlatpakPackage* flatpak_pkg);
static Block13Data* block13_data_ref (Block13Data* _data13_);
static void block13_data_unref (void * _userdata_);
static void ____lambda76_ (Block13Data* _data13_,
                    GObject* obj,
                    GAsyncResult* res);
static void _____lambda76__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void ____lambda77_ (PamacManagerWindow* self,
                    GObject* obj,
                    GAsyncResult* res);
static void ___lambda78_ (PamacManagerWindow* self);
static void ____lambda78__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void _____lambda77__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void pamac_manager_window_on_launch_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_launch_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self);
static void pamac_manager_window_on_install_togglebutton_toggled (PamacManagerWindow* self);
static void _pamac_manager_window_on_install_togglebutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                      gpointer self);
static void pamac_manager_window_on_build_togglebutton_toggled (PamacManagerWindow* self);
static void _pamac_manager_window_on_build_togglebutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                    gpointer self);
static void pamac_manager_window_on_reset_files_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_reset_files_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self);
static void pamac_manager_window_on_remove_togglebutton_toggled (PamacManagerWindow* self);
static void _pamac_manager_window_on_remove_togglebutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                     gpointer self);
static void pamac_manager_window_on_reinstall_togglebutton_toggled (PamacManagerWindow* self);
static void _pamac_manager_window_on_reinstall_togglebutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                        gpointer self);
static void pamac_manager_window_populate_listbox (PamacManagerWindow* self);
static void pamac_manager_window_create_os_updates_row (PamacManagerWindow* self,
                                                 guint64 download_size);
static void pamac_manager_window_sort_aur_list (PamacManagerWindow* self,
                                         GPtrArray** pkgs);
static Block14Data* block14_data_ref (Block14Data* _data14_);
static void block14_data_unref (void * _userdata_);
static gint ___lambda1__gcompare_data_func (gconstpointer a,
                                     gconstpointer b,
                                     gpointer self);
static gint _pamac_sort_aur_by_relevance_gcompare_func (gconstpointer a,
                                                 gconstpointer b);
static gint _pamac_sort_pkgs_by_name_gcompare_func (gconstpointer a,
                                             gconstpointer b);
static gint _pamac_sort_pkgs_by_repo_gcompare_func (gconstpointer a,
                                             gconstpointer b);
static gint _pamac_sort_pkgs_by_installed_size_gcompare_func (gconstpointer a,
                                                       gconstpointer b);
static gint _pamac_sort_aur_by_date_gcompare_func (gconstpointer a,
                                            gconstpointer b);
static void pamac_manager_window_populate_aur_list (PamacManagerWindow* self,
                                             GPtrArray* pkgs);
static void pamac_manager_window_sort_packages_list (PamacManagerWindow* self,
                                              GPtrArray** pkgs);
static gint _pamac_sort_search_pkgs_by_relevance_gcompare_func (gconstpointer a,
                                                         gconstpointer b);
static gint _pamac_sort_pkgs_by_relevance_gcompare_func (gconstpointer a,
                                                  gconstpointer b);
static gint _pamac_sort_pkgs_by_download_size_gcompare_func (gconstpointer a,
                                                      gconstpointer b);
static gint _pamac_sort_pkgs_by_date_gcompare_func (gconstpointer a,
                                             gconstpointer b);
static void pamac_manager_window_populate_packages_list (PamacManagerWindow* self,
                                                  GPtrArray* pkgs);
static PamacPackageRow* pamac_manager_window_create_packagelist_row (PamacManagerWindow* self,
                                                              PamacPackage* pkg);
static Block15Data* block15_data_ref (Block15Data* _data15_);
static void block15_data_unref (void * _userdata_);
static void ____lambda16_ (Block15Data* _data15_,
                    GObject* obj,
                    GAsyncResult* res);
static void _____lambda16__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void ______lambda17_ (Block15Data* _data15_,
                      GObject* obj,
                      GAsyncResult* res);
static void _______lambda17__gasync_ready_callback (GObject* source_object,
                                             GAsyncResult* res,
                                             gpointer self);
static Block16Data* block16_data_ref (Block16Data* _data16_);
static void block16_data_unref (void * _userdata_);
VALA_EXTERN PamacPackageRow* pamac_package_row_new (PamacPackage* pkg,
                                        gboolean mobile);
VALA_EXTERN PamacPackageRow* pamac_package_row_construct (GType object_type,
                                              PamacPackage* pkg,
                                              gboolean mobile);
static void ___lambda18_ (Block16Data* _data16_,
                   GtkToggleButton* button);
static void ____lambda18__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                              gpointer self);
static void _____lambda20_ (Block16Data* _data16_,
                     GtkToggleButton* button);
static void ______lambda20__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                gpointer self);
static void ______lambda21_ (Block16Data* _data16_,
                      GtkToggleButton* button);
static void _______lambda21__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                 gpointer self);
static void _______lambda22_ (Block16Data* _data16_,
                       GtkToggleButton* button);
static void ________lambda22__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                  gpointer self);
static void _______lambda23_ (Block16Data* _data16_,
                       GtkToggleButton* button);
static void ________lambda23__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                  gpointer self);
static void _____lambda24_ (Block16Data* _data16_,
                     GtkToggleButton* button);
static void ______lambda24__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                gpointer self);
static void ______lambda25_ (Block16Data* _data16_,
                      GtkToggleButton* button);
static void _______lambda25__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                 gpointer self);
static void ______lambda26_ (Block16Data* _data16_,
                      GtkToggleButton* button);
static void _______lambda26__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                 gpointer self);
static PamacPackageRow* pamac_manager_window_create_update_row (PamacManagerWindow* self,
                                                         PamacPackage* pkg);
static Block17Data* block17_data_ref (Block17Data* _data17_);
static void block17_data_unref (void * _userdata_);
static void __lambda80_ (Block17Data* _data17_,
                  GtkToggleButton* button);
static void ___lambda80__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static void __lambda19_ (PamacManagerWindow* self,
                  GtkWidget* child);
static void ___lambda19__gtk_callback (GtkWidget* widget,
                                gpointer self);
static void pamac_manager_window_on_categories_listbox_row_activated (PamacManagerWindow* self,
                                                               GtkListBoxRow* row);
static void pamac_manager_window_on_groups_listbox_row_activated (PamacManagerWindow* self,
                                                           GtkListBoxRow* row);
static void pamac_manager_window_on_repos_listbox_row_activated (PamacManagerWindow* self,
                                                          GtkListBoxRow* row);
static void pamac_manager_window_on_installed_listbox_row_activated (PamacManagerWindow* self,
                                                              GtkListBoxRow* row);
static void pamac_manager_window_on_search_listbox_row_activated (PamacManagerWindow* self,
                                                           GtkListBoxRow* row);
static void pamac_manager_window_populate_updates (PamacManagerWindow* self);
static void pamac_manager_window_refresh_updates (PamacManagerWindow* self,
                                           gboolean refresh_dbs);
VALA_EXTERN void pamac_manager_window_display_details (PamacManagerWindow* self,
                                           PamacPackage* pkg);
static void pamac_manager_window_display_aur_details (PamacManagerWindow* self,
                                               PamacAURPackage* aur_pkg);
VALA_EXTERN void pamac_manager_window_display_package_details (PamacManagerWindow* self,
                                                   PamacAlpmPackage* pkg);
VALA_EXTERN void pamac_manager_window_display_snap_details (PamacManagerWindow* self,
                                                PamacSnapPackage* snap_pkg);
VALA_EXTERN void pamac_manager_window_display_flatpak_details (PamacManagerWindow* self,
                                                   PamacFlatpakPackage* flatpak_pkg);
static void ___lambda7_ (PamacManagerWindow* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ____lambda7__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ____lambda57_ (PamacManagerWindow* self,
                    GObject* obj,
                    GAsyncResult* res);
static void _____lambda57__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void _____lambda58_ (PamacManagerWindow* self,
                     GObject* obj,
                     GAsyncResult* res);
static void ______lambda58__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
static void pamac_manager_window_on_packages_listbox_row_activated (PamacManagerWindow* self,
                                                             GtkFlowBoxChild* row);
VALA_EXTERN GType pamac_updates_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacUpdatesDialog, g_object_unref)
static Block18Data* block18_data_ref (Block18Data* _data18_);
static void block18_data_unref (void * _userdata_);
VALA_EXTERN PamacUpdatesDialog* pamac_updates_dialog_new (GtkApplicationWindow* window);
VALA_EXTERN PamacUpdatesDialog* pamac_updates_dialog_construct (GType object_type,
                                                    GtkApplicationWindow* window);
static void ____lambda81_ (Block18Data* _data18_);
static void _____lambda81__gtk_dialog_response (GtkDialog* _sender,
                                         gint response_id,
                                         gpointer self);
static void _pamac_manager_window_on_packages_listbox_row_activated_gtk_flow_box_child_activated (GtkFlowBox* _sender,
                                                                                           GtkFlowBoxChild* child,
                                                                                           gpointer self);
static Block19Data* block19_data_ref (Block19Data* _data19_);
static void block19_data_unref (void * _userdata_);
static gint _pamac_compare_pkgs_by_name_gcompare_func (gconstpointer a,
                                                gconstpointer b);
static void __lambda51_ (Block19Data* _data19_,
                  GtkWidget* child);
static void ___lambda51__gtk_callback (GtkWidget* widget,
                                gpointer self);
static void pamac_manager_window_get_pending_aur_pkgs_data_free (gpointer _data);
static void pamac_manager_window_get_pending_aur_pkgs (PamacManagerWindow* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static GPtrArray* pamac_manager_window_get_pending_aur_pkgs_finish (PamacManagerWindow* self,
                                                             GAsyncResult* _res_);
static gboolean pamac_manager_window_get_pending_aur_pkgs_co (PamacManagerWindowGetPendingAurPkgsData* _data_);
static void pamac_manager_window_get_pending_aur_pkgs_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
static void pamac_manager_window_get_pending_pkgs_data_free (gpointer _data);
static void pamac_manager_window_get_pending_pkgs (PamacManagerWindow* self,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static GPtrArray* pamac_manager_window_get_pending_pkgs_finish (PamacManagerWindow* self,
                                                         GAsyncResult* _res_);
static gboolean pamac_manager_window_get_pending_pkgs_co (PamacManagerWindowGetPendingPkgsData* _data_);
static void pamac_manager_window_get_pending_pkgs_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
static void pamac_manager_window_search_all_pkgs_data_free (gpointer _data);
static void pamac_manager_window_search_all_pkgs (PamacManagerWindow* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
static GPtrArray* pamac_manager_window_search_all_pkgs_finish (PamacManagerWindow* self,
                                                        GAsyncResult* _res_);
static gboolean pamac_manager_window_search_all_pkgs_co (PamacManagerWindowSearchAllPkgsData* _data_);
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
static void __lambda38_ (Block20Data* _data20_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda38__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ___lambda39_ (Block20Data* _data20_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda39__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda40_ (Block20Data* _data20_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda40__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda41_ (Block20Data* _data20_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda41__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void pamac_manager_window_on_remove_all_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_remove_all_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void pamac_manager_window_on_install_all_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_install_all_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self);
static void pamac_manager_window_on_ignore_all_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_ignore_all_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void pamac_manager_window_on_search_entry_activated (PamacManagerWindow* self);
static void _pamac_manager_window_on_search_entry_activated_gtk_entry_activate (GtkEntry* _sender,
                                                                         gpointer self);
static void pamac_manager_window_on_search_entry_changed (PamacManagerWindow* self);
static void _pamac_manager_window_on_search_entry_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                         gpointer self);
static void pamac_manager_window_on_sortby_combobox_changed (PamacManagerWindow* self);
static void _pamac_manager_window_on_sortby_combobox_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                             gpointer self);
static void pamac_manager_window_on_filters_listbox_row_activated (PamacManagerWindow* self,
                                                            GtkListBoxRow* row);
static void ___lambda82_ (PamacManagerWindow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda82__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void _pamac_manager_window_on_filters_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                        GtkListBoxRow* row,
                                                                                        gpointer self);
static Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
static void pamac_manager_window_get_category_pkgs (PamacManagerWindow* self,
                                             const gchar* category,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static GPtrArray* pamac_manager_window_get_category_pkgs_finish (PamacManagerWindow* self,
                                                          GAsyncResult* _res_);
static void __lambda14_ (Block21Data* _data21_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda14__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void _pamac_manager_window_on_categories_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                           GtkListBoxRow* row,
                                                                                           gpointer self);
static Block22Data* block22_data_ref (Block22Data* _data22_);
static void block22_data_unref (void * _userdata_);
static void __lambda27_ (Block22Data* _data22_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda27__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void _pamac_manager_window_on_groups_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                       GtkListBoxRow* row,
                                                                                       gpointer self);
static void pamac_manager_window_get_all_installed_data_free (gpointer _data);
static void pamac_manager_window_get_all_installed (PamacManagerWindow* self,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static GPtrArray* pamac_manager_window_get_all_installed_finish (PamacManagerWindow* self,
                                                          GAsyncResult* _res_);
static gboolean pamac_manager_window_get_all_installed_co (PamacManagerWindowGetAllInstalledData* _data_);
static Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_data_unref (void * _userdata_);
static void __lambda29_ (Block23Data* _data23_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda29__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ___lambda30_ (Block23Data* _data23_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda30__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda31_ (Block23Data* _data23_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda31__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda32_ (PamacManagerWindow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda32__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda33_ (PamacManagerWindow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda33__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda34_ (PamacManagerWindow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda34__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda35_ (PamacManagerWindow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda35__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ____lambda36_ (PamacManagerWindow* self,
                    GObject* obj,
                    GAsyncResult* res);
static void _____lambda36__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void _____lambda37_ (PamacManagerWindow* self,
                     GObject* obj,
                     GAsyncResult* res);
static void ______lambda37__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
static void _pamac_manager_window_on_installed_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                          GtkListBoxRow* row,
                                                                                          gpointer self);
static void ___lambda42_ (PamacManagerWindow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda42__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda43_ (PamacManagerWindow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda43__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda44_ (PamacManagerWindow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda44__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ____lambda45_ (PamacManagerWindow* self,
                    GObject* obj,
                    GAsyncResult* res);
static void _____lambda45__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void _____lambda46_ (PamacManagerWindow* self,
                     GObject* obj,
                     GAsyncResult* res);
static void ______lambda46__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
static void ______lambda47_ (PamacManagerWindow* self,
                      GObject* obj,
                      GAsyncResult* res);
static void _______lambda47__gasync_ready_callback (GObject* source_object,
                                             GAsyncResult* res,
                                             gpointer self);
static void _pamac_manager_window_on_search_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                       GtkListBoxRow* row,
                                                                                       gpointer self);
static void pamac_manager_window_on_updates_listbox_row_activated (PamacManagerWindow* self,
                                                            GtkListBoxRow* row);
static void _pamac_manager_window_on_updates_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                        GtkListBoxRow* row,
                                                                                        gpointer self);
static Block24Data* block24_data_ref (Block24Data* _data24_);
static void block24_data_unref (void * _userdata_);
static void __lambda28_ (Block24Data* _data24_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda28__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void _pamac_manager_window_on_repos_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                      GtkListBoxRow* row,
                                                                                      gpointer self);
static void pamac_manager_window_on_menu_button_toggled (PamacManagerWindow* self);
static void _pamac_manager_window_on_menu_button_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                             gpointer self);
static void pamac_manager_window_on_details_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_details_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self);
static void pamac_manager_window_get_category_pkgs_data_free (gpointer _data);
static gboolean pamac_manager_window_get_category_pkgs_co (PamacManagerWindowGetCategoryPkgsData* _data_);
static Block25Data* block25_data_ref (Block25Data* _data25_);
static void block25_data_unref (void * _userdata_);
static void pamac_manager_window_get_category_pkgs_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void __lambda11_ (Block25Data* _data25_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda11__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ___lambda12_ (Block25Data* _data25_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda12__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda13_ (Block25Data* _data25_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda13__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void pamac_manager_window_on_apply_button_clicked (PamacManagerWindow* self);
static void ____lambda83_ (PamacManagerWindow* self);
static void _____lambda83__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void _pamac_manager_window_on_apply_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
static void __lambda61_ (PamacManagerWindow* self,
                  GObject* obj,
                  GAsyncResult* res);
static void pamac_manager_window_on_transaction_finished (PamacManagerWindow* self,
                                                   gboolean success);
static void ___lambda61__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void pamac_manager_window_on_cancel_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_cancel_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self);
static void pamac_manager_window_on_refresh_button_clicked (PamacManagerWindow* self);
static void _pamac_manager_window_on_refresh_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self);
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_data_unref (void * _userdata_);
static void ___lambda48_ (Block26Data* _data26_);
static void __lambda49_ (Block26Data* _data26_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda49__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ____lambda48__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda50_ (Block26Data* _data26_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda50__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void pamac_manager_window_show_in_app_notification (PamacManagerWindow* self,
                                                    const gchar* message);
static gboolean __lambda62_ (PamacManagerWindow* self);
static gboolean ___lambda62__gsource_func (gpointer self);
static void pamac_manager_window_set_database (PamacManagerWindow* self,
                                        PamacDatabaseGtk* value);
static void pamac_manager_window_set_mobile (PamacManagerWindow* self,
                                      gboolean value);
static void pamac_manager_window_finalize (GObject * obj);
static GType pamac_manager_window_get_type_once (void);
static void _vala_pamac_manager_window_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_pamac_manager_window_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

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;
}

gint
pamac_sort_search_pkgs_by_relevance (PamacPackage* pkg_a,
                                     PamacPackage* pkg_b)
{
	const gchar* _tmp0_;
	gint result;
	g_return_val_if_fail (pkg_a != NULL, 0);
	g_return_val_if_fail (pkg_b != NULL, 0);
	_tmp0_ = pamac_search_string;
	if (_tmp0_ != NULL) {
		const gchar* a_app_name = NULL;
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* a_app_name_down = NULL;
		const gchar* _tmp3_;
		const gchar* b_app_name = NULL;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* b_app_name_down = NULL;
		const gchar* _tmp8_;
		gboolean _tmp11_ = FALSE;
		const gchar* _tmp12_;
		gboolean _tmp19_ = FALSE;
		const gchar* _tmp20_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp29_;
		const gchar* _tmp30_;
		const gchar* _tmp31_;
		gboolean _tmp32_ = FALSE;
		const gchar* _tmp33_;
		gboolean _tmp40_ = FALSE;
		const gchar* _tmp41_;
		gchar* search_string_prefix = NULL;
		const gchar* _tmp44_;
		gchar* _tmp45_;
		const gchar* _tmp46_;
		const gchar* _tmp47_;
		const gchar* _tmp48_;
		const gchar* _tmp52_;
		const gchar* _tmp53_;
		const gchar* _tmp54_;
		const gchar* _tmp55_;
		const gchar* _tmp56_;
		const gchar* _tmp57_;
		const gchar* _tmp61_;
		const gchar* _tmp62_;
		const gchar* _tmp63_;
		gboolean _tmp64_ = FALSE;
		const gchar* _tmp65_;
		gboolean _tmp72_ = FALSE;
		const gchar* _tmp73_;
		const gchar* _tmp76_;
		const gchar* _tmp77_;
		const gchar* _tmp78_;
		const gchar* _tmp82_;
		const gchar* _tmp83_;
		const gchar* _tmp84_;
		_tmp1_ = pamac_package_get_app_name (pkg_a);
		_tmp2_ = _tmp1_;
		a_app_name = _tmp2_;
		a_app_name_down = NULL;
		_tmp3_ = a_app_name;
		if (_tmp3_ != NULL) {
			const gchar* _tmp4_;
			gchar* _tmp5_;
			_tmp4_ = a_app_name;
			_tmp5_ = g_utf8_strdown (_tmp4_, (gssize) -1);
			_g_free0 (a_app_name_down);
			a_app_name_down = _tmp5_;
		}
		_tmp6_ = pamac_package_get_app_name (pkg_b);
		_tmp7_ = _tmp6_;
		b_app_name = _tmp7_;
		b_app_name_down = NULL;
		_tmp8_ = b_app_name;
		if (_tmp8_ != NULL) {
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = b_app_name;
			_tmp10_ = g_utf8_strdown (_tmp9_, (gssize) -1);
			_g_free0 (b_app_name_down);
			b_app_name_down = _tmp10_;
		}
		_tmp12_ = a_app_name_down;
		if (_tmp12_ != NULL) {
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			_tmp13_ = a_app_name_down;
			_tmp14_ = pamac_search_string;
			_tmp11_ = g_strcmp0 (_tmp13_, _tmp14_) == 0;
		} else {
			_tmp11_ = FALSE;
		}
		if (_tmp11_) {
			gboolean _tmp15_ = FALSE;
			const gchar* _tmp16_;
			_tmp16_ = b_app_name_down;
			if (_tmp16_ != NULL) {
				const gchar* _tmp17_;
				const gchar* _tmp18_;
				_tmp17_ = b_app_name_down;
				_tmp18_ = pamac_search_string;
				_tmp15_ = g_strcmp0 (_tmp17_, _tmp18_) == 0;
			} else {
				_tmp15_ = FALSE;
			}
			if (_tmp15_) {
				result = pamac_sort_pkgs_by_relevance (pkg_a, pkg_b);
				_g_free0 (b_app_name_down);
				_g_free0 (a_app_name_down);
				return result;
			}
			result = -1;
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp20_ = b_app_name_down;
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			const gchar* _tmp22_;
			_tmp21_ = b_app_name_down;
			_tmp22_ = pamac_search_string;
			_tmp19_ = g_strcmp0 (_tmp21_, _tmp22_) == 0;
		} else {
			_tmp19_ = FALSE;
		}
		if (_tmp19_) {
			result = 1;
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp23_ = pamac_package_get_name (pkg_a);
		_tmp24_ = _tmp23_;
		_tmp25_ = pamac_search_string;
		if (g_strcmp0 (_tmp24_, _tmp25_) == 0) {
			const gchar* _tmp26_;
			const gchar* _tmp27_;
			const gchar* _tmp28_;
			_tmp26_ = pamac_package_get_name (pkg_b);
			_tmp27_ = _tmp26_;
			_tmp28_ = pamac_search_string;
			if (g_strcmp0 (_tmp27_, _tmp28_) == 0) {
				result = pamac_sort_pkgs_by_relevance (pkg_a, pkg_b);
				_g_free0 (b_app_name_down);
				_g_free0 (a_app_name_down);
				return result;
			}
			result = -1;
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp29_ = pamac_package_get_name (pkg_b);
		_tmp30_ = _tmp29_;
		_tmp31_ = pamac_search_string;
		if (g_strcmp0 (_tmp30_, _tmp31_) == 0) {
			result = 1;
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp33_ = a_app_name_down;
		if (_tmp33_ != NULL) {
			const gchar* _tmp34_;
			const gchar* _tmp35_;
			_tmp34_ = a_app_name_down;
			_tmp35_ = pamac_search_string;
			_tmp32_ = g_str_has_prefix (_tmp34_, _tmp35_);
		} else {
			_tmp32_ = FALSE;
		}
		if (_tmp32_) {
			gboolean _tmp36_ = FALSE;
			const gchar* _tmp37_;
			_tmp37_ = b_app_name_down;
			if (_tmp37_ != NULL) {
				const gchar* _tmp38_;
				const gchar* _tmp39_;
				_tmp38_ = b_app_name_down;
				_tmp39_ = pamac_search_string;
				_tmp36_ = g_str_has_prefix (_tmp38_, _tmp39_);
			} else {
				_tmp36_ = FALSE;
			}
			if (_tmp36_) {
				result = pamac_sort_pkgs_by_relevance (pkg_a, pkg_b);
				_g_free0 (b_app_name_down);
				_g_free0 (a_app_name_down);
				return result;
			}
			result = -1;
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp41_ = b_app_name_down;
		if (_tmp41_ != NULL) {
			const gchar* _tmp42_;
			const gchar* _tmp43_;
			_tmp42_ = b_app_name_down;
			_tmp43_ = pamac_search_string;
			_tmp40_ = g_str_has_prefix (_tmp42_, _tmp43_);
		} else {
			_tmp40_ = FALSE;
		}
		if (_tmp40_) {
			result = 1;
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp44_ = pamac_search_string;
		_tmp45_ = g_strconcat (_tmp44_, "-", NULL);
		search_string_prefix = _tmp45_;
		_tmp46_ = pamac_package_get_name (pkg_a);
		_tmp47_ = _tmp46_;
		_tmp48_ = search_string_prefix;
		if (g_str_has_prefix (_tmp47_, _tmp48_)) {
			const gchar* _tmp49_;
			const gchar* _tmp50_;
			const gchar* _tmp51_;
			_tmp49_ = pamac_package_get_name (pkg_b);
			_tmp50_ = _tmp49_;
			_tmp51_ = search_string_prefix;
			if (g_str_has_prefix (_tmp50_, _tmp51_)) {
				result = pamac_sort_pkgs_by_relevance (pkg_a, pkg_b);
				_g_free0 (search_string_prefix);
				_g_free0 (b_app_name_down);
				_g_free0 (a_app_name_down);
				return result;
			}
			result = -1;
			_g_free0 (search_string_prefix);
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp52_ = pamac_package_get_name (pkg_b);
		_tmp53_ = _tmp52_;
		_tmp54_ = search_string_prefix;
		if (g_str_has_prefix (_tmp53_, _tmp54_)) {
			result = 1;
			_g_free0 (search_string_prefix);
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp55_ = pamac_package_get_name (pkg_a);
		_tmp56_ = _tmp55_;
		_tmp57_ = pamac_search_string;
		if (g_str_has_prefix (_tmp56_, _tmp57_)) {
			const gchar* _tmp58_;
			const gchar* _tmp59_;
			const gchar* _tmp60_;
			_tmp58_ = pamac_package_get_name (pkg_b);
			_tmp59_ = _tmp58_;
			_tmp60_ = pamac_search_string;
			if (g_str_has_prefix (_tmp59_, _tmp60_)) {
				result = pamac_sort_pkgs_by_relevance (pkg_a, pkg_b);
				_g_free0 (search_string_prefix);
				_g_free0 (b_app_name_down);
				_g_free0 (a_app_name_down);
				return result;
			}
			result = -1;
			_g_free0 (search_string_prefix);
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp61_ = pamac_package_get_name (pkg_b);
		_tmp62_ = _tmp61_;
		_tmp63_ = pamac_search_string;
		if (g_str_has_prefix (_tmp62_, _tmp63_)) {
			result = 1;
			_g_free0 (search_string_prefix);
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp65_ = a_app_name_down;
		if (_tmp65_ != NULL) {
			const gchar* _tmp66_;
			const gchar* _tmp67_;
			_tmp66_ = a_app_name_down;
			_tmp67_ = pamac_search_string;
			_tmp64_ = string_contains (_tmp66_, _tmp67_);
		} else {
			_tmp64_ = FALSE;
		}
		if (_tmp64_) {
			gboolean _tmp68_ = FALSE;
			const gchar* _tmp69_;
			_tmp69_ = b_app_name_down;
			if (_tmp69_ != NULL) {
				const gchar* _tmp70_;
				const gchar* _tmp71_;
				_tmp70_ = b_app_name_down;
				_tmp71_ = pamac_search_string;
				_tmp68_ = string_contains (_tmp70_, _tmp71_);
			} else {
				_tmp68_ = FALSE;
			}
			if (_tmp68_) {
				result = pamac_sort_pkgs_by_relevance (pkg_a, pkg_b);
				_g_free0 (search_string_prefix);
				_g_free0 (b_app_name_down);
				_g_free0 (a_app_name_down);
				return result;
			}
			result = -1;
			_g_free0 (search_string_prefix);
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp73_ = b_app_name_down;
		if (_tmp73_ != NULL) {
			const gchar* _tmp74_;
			const gchar* _tmp75_;
			_tmp74_ = b_app_name_down;
			_tmp75_ = pamac_search_string;
			_tmp72_ = string_contains (_tmp74_, _tmp75_);
		} else {
			_tmp72_ = FALSE;
		}
		if (_tmp72_) {
			result = 1;
			_g_free0 (search_string_prefix);
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp76_ = pamac_package_get_name (pkg_a);
		_tmp77_ = _tmp76_;
		_tmp78_ = pamac_search_string;
		if (string_contains (_tmp77_, _tmp78_)) {
			const gchar* _tmp79_;
			const gchar* _tmp80_;
			const gchar* _tmp81_;
			_tmp79_ = pamac_package_get_name (pkg_b);
			_tmp80_ = _tmp79_;
			_tmp81_ = pamac_search_string;
			if (string_contains (_tmp80_, _tmp81_)) {
				result = pamac_sort_pkgs_by_relevance (pkg_a, pkg_b);
				_g_free0 (search_string_prefix);
				_g_free0 (b_app_name_down);
				_g_free0 (a_app_name_down);
				return result;
			}
			result = -1;
			_g_free0 (search_string_prefix);
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_tmp82_ = pamac_package_get_name (pkg_b);
		_tmp83_ = _tmp82_;
		_tmp84_ = pamac_search_string;
		if (string_contains (_tmp83_, _tmp84_)) {
			result = 1;
			_g_free0 (search_string_prefix);
			_g_free0 (b_app_name_down);
			_g_free0 (a_app_name_down);
			return result;
		}
		_g_free0 (search_string_prefix);
		_g_free0 (b_app_name_down);
		_g_free0 (a_app_name_down);
	}
	result = pamac_sort_pkgs_by_relevance (pkg_a, pkg_b);
	return result;
}

gint
pamac_sort_pkgs_by_relevance (PamacPackage* pkg_a,
                              PamacPackage* pkg_b)
{
	GHashTable* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GHashTable* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	GHashTable* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gboolean _tmp31_ = FALSE;
	gboolean _tmp32_ = FALSE;
	GHashTable* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	const gchar* _tmp46_;
	const gchar* _tmp47_;
	const gchar* _tmp48_;
	const gchar* _tmp49_;
	const gchar* _tmp52_;
	const gchar* _tmp53_;
	gint result;
	g_return_val_if_fail (pkg_a != NULL, 0);
	g_return_val_if_fail (pkg_b != NULL, 0);
	_tmp0_ = pamac_to_remove;
	_tmp1_ = pamac_package_get_name (pkg_a);
	_tmp2_ = _tmp1_;
	if (g_hash_table_contains (_tmp0_, _tmp2_)) {
		GHashTable* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp3_ = pamac_to_remove;
		_tmp4_ = pamac_package_get_name (pkg_b);
		_tmp5_ = _tmp4_;
		if (g_hash_table_contains (_tmp3_, _tmp5_)) {
			result = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
			return result;
		}
		result = -1;
		return result;
	}
	_tmp6_ = pamac_to_remove;
	_tmp7_ = pamac_package_get_name (pkg_b);
	_tmp8_ = _tmp7_;
	if (g_hash_table_contains (_tmp6_, _tmp8_)) {
		result = 1;
		return result;
	}
	_tmp11_ = pamac_to_install;
	_tmp12_ = pamac_package_get_name (pkg_a);
	_tmp13_ = _tmp12_;
	if (g_hash_table_contains (_tmp11_, _tmp13_)) {
		_tmp10_ = TRUE;
	} else {
		GHashTable* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		_tmp14_ = pamac_to_build;
		_tmp15_ = pamac_package_get_name (pkg_a);
		_tmp16_ = _tmp15_;
		_tmp10_ = g_hash_table_contains (_tmp14_, _tmp16_);
	}
	if (_tmp10_) {
		_tmp9_ = TRUE;
	} else {
		GHashTable* _tmp17_;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		_tmp17_ = pamac_temporary_ignorepkgs;
		_tmp18_ = pamac_package_get_name (pkg_a);
		_tmp19_ = _tmp18_;
		_tmp9_ = g_hash_table_contains (_tmp17_, _tmp19_);
	}
	if (_tmp9_) {
		gboolean _tmp20_ = FALSE;
		gboolean _tmp21_ = FALSE;
		GHashTable* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		_tmp22_ = pamac_to_install;
		_tmp23_ = pamac_package_get_name (pkg_b);
		_tmp24_ = _tmp23_;
		if (g_hash_table_contains (_tmp22_, _tmp24_)) {
			_tmp21_ = TRUE;
		} else {
			GHashTable* _tmp25_;
			const gchar* _tmp26_;
			const gchar* _tmp27_;
			_tmp25_ = pamac_to_build;
			_tmp26_ = pamac_package_get_name (pkg_b);
			_tmp27_ = _tmp26_;
			_tmp21_ = g_hash_table_contains (_tmp25_, _tmp27_);
		}
		if (_tmp21_) {
			_tmp20_ = TRUE;
		} else {
			GHashTable* _tmp28_;
			const gchar* _tmp29_;
			const gchar* _tmp30_;
			_tmp28_ = pamac_temporary_ignorepkgs;
			_tmp29_ = pamac_package_get_name (pkg_b);
			_tmp30_ = _tmp29_;
			_tmp20_ = g_hash_table_contains (_tmp28_, _tmp30_);
		}
		if (_tmp20_) {
			result = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
			return result;
		}
		result = -1;
		return result;
	}
	_tmp33_ = pamac_to_install;
	_tmp34_ = pamac_package_get_name (pkg_b);
	_tmp35_ = _tmp34_;
	if (g_hash_table_contains (_tmp33_, _tmp35_)) {
		_tmp32_ = TRUE;
	} else {
		GHashTable* _tmp36_;
		const gchar* _tmp37_;
		const gchar* _tmp38_;
		_tmp36_ = pamac_to_build;
		_tmp37_ = pamac_package_get_name (pkg_b);
		_tmp38_ = _tmp37_;
		_tmp32_ = g_hash_table_contains (_tmp36_, _tmp38_);
	}
	if (_tmp32_) {
		_tmp31_ = TRUE;
	} else {
		GHashTable* _tmp39_;
		const gchar* _tmp40_;
		const gchar* _tmp41_;
		_tmp39_ = pamac_temporary_ignorepkgs;
		_tmp40_ = pamac_package_get_name (pkg_b);
		_tmp41_ = _tmp40_;
		_tmp31_ = g_hash_table_contains (_tmp39_, _tmp41_);
	}
	if (_tmp31_) {
		result = 1;
		return result;
	}
	_tmp42_ = pamac_package_get_installed_version (pkg_a);
	_tmp43_ = _tmp42_;
	if (_tmp43_ == NULL) {
		const gchar* _tmp44_;
		const gchar* _tmp45_;
		_tmp44_ = pamac_package_get_installed_version (pkg_b);
		_tmp45_ = _tmp44_;
		if (_tmp45_ == NULL) {
			result = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
			return result;
		}
		result = 1;
		return result;
	}
	_tmp46_ = pamac_package_get_installed_version (pkg_b);
	_tmp47_ = _tmp46_;
	if (_tmp47_ == NULL) {
		result = -1;
		return result;
	}
	_tmp48_ = pamac_package_get_app_name (pkg_a);
	_tmp49_ = _tmp48_;
	if (_tmp49_ == NULL) {
		const gchar* _tmp50_;
		const gchar* _tmp51_;
		_tmp50_ = pamac_package_get_app_name (pkg_b);
		_tmp51_ = _tmp50_;
		if (_tmp51_ == NULL) {
			result = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
			return result;
		}
		result = 1;
		return result;
	}
	_tmp52_ = pamac_package_get_app_name (pkg_b);
	_tmp53_ = _tmp52_;
	if (_tmp53_ == NULL) {
		result = -1;
		return result;
	}
	result = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
	return result;
}

gint
pamac_sort_pkgs_by_name (PamacPackage* pkg_a,
                         PamacPackage* pkg_b)
{
	const gchar* a_app_name = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* b_app_name = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_;
	gchar* str_a = NULL;
	gchar* _tmp13_;
	gchar* _tmp14_ = NULL;
	const gchar* _tmp15_;
	gchar* str_b = NULL;
	gchar* _tmp23_;
	gint cmp = 0;
	GCompareFunc _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	gint result;
	g_return_val_if_fail (pkg_a != NULL, 0);
	g_return_val_if_fail (pkg_b != NULL, 0);
	_tmp0_ = pamac_package_get_app_name (pkg_a);
	_tmp1_ = _tmp0_;
	a_app_name = _tmp1_;
	_tmp2_ = pamac_package_get_app_name (pkg_b);
	_tmp3_ = _tmp2_;
	b_app_name = _tmp3_;
	_tmp5_ = a_app_name;
	if (_tmp5_ == NULL) {
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp6_ = pamac_package_get_name (pkg_a);
		_tmp7_ = _tmp6_;
		_tmp8_ = g_utf8_collate_key (_tmp7_, (gssize) -1);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp8_;
	} else {
		const gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		_tmp9_ = a_app_name;
		_tmp10_ = g_utf8_strdown (_tmp9_, (gssize) -1);
		_tmp11_ = _tmp10_;
		_tmp12_ = g_utf8_collate_key (_tmp11_, (gssize) -1);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp12_;
		_g_free0 (_tmp11_);
	}
	_tmp13_ = g_strdup (_tmp4_);
	str_a = _tmp13_;
	_tmp15_ = b_app_name;
	if (_tmp15_ == NULL) {
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp16_ = pamac_package_get_name (pkg_b);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_utf8_collate_key (_tmp17_, (gssize) -1);
		_g_free0 (_tmp14_);
		_tmp14_ = _tmp18_;
	} else {
		const gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		_tmp19_ = b_app_name;
		_tmp20_ = g_utf8_strdown (_tmp19_, (gssize) -1);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_utf8_collate_key (_tmp21_, (gssize) -1);
		_g_free0 (_tmp14_);
		_tmp14_ = _tmp22_;
		_g_free0 (_tmp21_);
	}
	_tmp23_ = g_strdup (_tmp14_);
	str_b = _tmp23_;
	_tmp24_ = ((GCompareFunc) g_strcmp0);
	_tmp25_ = str_a;
	_tmp26_ = str_b;
	cmp = _tmp24_ (_tmp25_, _tmp26_);
	if (cmp == 0) {
		cmp = pamac_sort_pkgs_by_repo_real (pkg_a, pkg_b);
	}
	result = cmp;
	_g_free0 (str_b);
	_g_free0 (_tmp14_);
	_g_free0 (str_a);
	_g_free0 (_tmp4_);
	return result;
}

gint
pamac_compare_pkgs_by_name (PamacPackage* pkg_a,
                            PamacPackage* pkg_b)
{
	GCompareFunc _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gint result;
	g_return_val_if_fail (pkg_a != NULL, 0);
	g_return_val_if_fail (pkg_b != NULL, 0);
	_tmp0_ = ((GCompareFunc) g_strcmp0);
	_tmp1_ = pamac_package_get_name (pkg_a);
	_tmp2_ = _tmp1_;
	_tmp3_ = pamac_package_get_name (pkg_b);
	_tmp4_ = _tmp3_;
	result = _tmp0_ (_tmp2_, _tmp4_);
	return result;
}

gint
pamac_sort_pkgs_by_repo (PamacPackage* pkg_a,
                         PamacPackage* pkg_b)
{
	gint cmp = 0;
	gint result;
	g_return_val_if_fail (pkg_a != NULL, 0);
	g_return_val_if_fail (pkg_b != NULL, 0);
	cmp = pamac_sort_pkgs_by_repo_real (pkg_a, pkg_b);
	if (cmp == 0) {
		cmp = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
	}
	result = cmp;
	return result;
}

gint
pamac_sort_pkgs_by_repo_real (PamacPackage* pkg_a,
                              PamacPackage* pkg_b)
{
	guint index_a = 0U;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	guint index_b = 0U;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gint result;
	g_return_val_if_fail (pkg_a != NULL, 0);
	g_return_val_if_fail (pkg_b != NULL, 0);
	index_a = (guint) 10;
	_tmp0_ = pamac_package_get_repo (pkg_a);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		guint index = 0U;
		GPtrArray* _tmp2_;
		index = (guint) 0;
		_tmp2_ = pamac_repos_names;
		{
			GPtrArray* name_collection = NULL;
			guint name_index = 0U;
			name_collection = _tmp2_;
			for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
				const gchar* name = NULL;
				name = (const gchar*) g_ptr_array_index (name_collection, name_index);
				{
					const gchar* _tmp3_;
					const gchar* _tmp4_;
					const gchar* _tmp5_;
					guint _tmp6_;
					_tmp3_ = name;
					_tmp4_ = pamac_package_get_repo (pkg_a);
					_tmp5_ = _tmp4_;
					if (g_strcmp0 (_tmp3_, _tmp5_) == 0) {
						index_a = index;
						break;
					}
					_tmp6_ = index;
					index = _tmp6_ + 1;
				}
			}
		}
	}
	index_b = (guint) 10;
	_tmp7_ = pamac_package_get_repo (pkg_b);
	_tmp8_ = _tmp7_;
	if (_tmp8_ != NULL) {
		guint index = 0U;
		GPtrArray* _tmp9_;
		index = (guint) 0;
		_tmp9_ = pamac_repos_names;
		{
			GPtrArray* name_collection = NULL;
			guint name_index = 0U;
			name_collection = _tmp9_;
			for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
				const gchar* name = NULL;
				name = (const gchar*) g_ptr_array_index (name_collection, name_index);
				{
					const gchar* _tmp10_;
					const gchar* _tmp11_;
					const gchar* _tmp12_;
					guint _tmp13_;
					_tmp10_ = name;
					_tmp11_ = pamac_package_get_repo (pkg_b);
					_tmp12_ = _tmp11_;
					if (g_strcmp0 (_tmp10_, _tmp12_) == 0) {
						index_b = index;
						break;
					}
					_tmp13_ = index;
					index = _tmp13_ + 1;
				}
			}
		}
	}
	if (index_a > index_b) {
		result = 1;
		return result;
	}
	if (index_b > index_a) {
		result = -1;
		return result;
	}
	result = 0;
	return result;
}

gint
pamac_sort_pkgs_by_installed_size (PamacPackage* pkg_a,
                                   PamacPackage* pkg_b)
{
	guint64 _tmp0_;
	guint64 _tmp1_;
	guint64 _tmp2_;
	guint64 _tmp3_;
	guint64 _tmp4_;
	guint64 _tmp5_;
	guint64 _tmp6_;
	guint64 _tmp7_;
	gint result;
	g_return_val_if_fail (pkg_a != NULL, 0);
	g_return_val_if_fail (pkg_b != NULL, 0);
	_tmp0_ = pamac_package_get_installed_size (pkg_a);
	_tmp1_ = _tmp0_;
	_tmp2_ = pamac_package_get_installed_size (pkg_b);
	_tmp3_ = _tmp2_;
	if (_tmp1_ > _tmp3_) {
		result = -1;
		return result;
	}
	_tmp4_ = pamac_package_get_installed_size (pkg_b);
	_tmp5_ = _tmp4_;
	_tmp6_ = pamac_package_get_installed_size (pkg_a);
	_tmp7_ = _tmp6_;
	if (_tmp5_ > _tmp7_) {
		result = 1;
		return result;
	}
	result = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
	return result;
}

gint
pamac_sort_pkgs_by_download_size (PamacPackage* pkg_a,
                                  PamacPackage* pkg_b)
{
	guint64 _tmp0_;
	guint64 _tmp1_;
	guint64 _tmp2_;
	guint64 _tmp3_;
	guint64 _tmp4_;
	guint64 _tmp5_;
	guint64 _tmp6_;
	guint64 _tmp7_;
	gint result;
	g_return_val_if_fail (pkg_a != NULL, 0);
	g_return_val_if_fail (pkg_b != NULL, 0);
	_tmp0_ = pamac_package_get_download_size (pkg_a);
	_tmp1_ = _tmp0_;
	_tmp2_ = pamac_package_get_download_size (pkg_b);
	_tmp3_ = _tmp2_;
	if (_tmp1_ > _tmp3_) {
		result = -1;
		return result;
	}
	_tmp4_ = pamac_package_get_download_size (pkg_b);
	_tmp5_ = _tmp4_;
	_tmp6_ = pamac_package_get_download_size (pkg_a);
	_tmp7_ = _tmp6_;
	if (_tmp5_ > _tmp7_) {
		result = 1;
		return result;
	}
	result = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
	return result;
}

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

gint
pamac_sort_aur_by_relevance (PamacPackage* pkg_1,
                             PamacPackage* pkg_2)
{
	PamacAURPackage* pkg_a = NULL;
	PamacAURPackage* _tmp0_;
	PamacAURPackage* _tmp1_;
	PamacAURPackage* pkg_b = NULL;
	PamacAURPackage* _tmp2_;
	PamacAURPackage* _tmp3_;
	PamacAURPackage* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	PamacAURPackage* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	PamacAURPackage* _tmp15_;
	gdouble _tmp16_;
	gdouble _tmp17_;
	PamacAURPackage* _tmp18_;
	gdouble _tmp19_;
	gdouble _tmp20_;
	PamacAURPackage* _tmp21_;
	gdouble _tmp22_;
	gdouble _tmp23_;
	PamacAURPackage* _tmp24_;
	gdouble _tmp25_;
	gdouble _tmp26_;
	PamacAURPackage* _tmp27_;
	PamacAURPackage* _tmp28_;
	gint result;
	g_return_val_if_fail (pkg_1 != NULL, 0);
	g_return_val_if_fail (pkg_2 != NULL, 0);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg_1, PAMAC_TYPE_AUR_PACKAGE) ? ((PamacAURPackage*) pkg_1) : NULL);
	pkg_a = _tmp0_;
	_tmp1_ = pkg_a;
	if (_tmp1_ == NULL) {
		result = 1;
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg_2, PAMAC_TYPE_AUR_PACKAGE) ? ((PamacAURPackage*) pkg_2) : NULL);
	pkg_b = _tmp2_;
	_tmp3_ = pkg_b;
	if (_tmp3_ == NULL) {
		result = -1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp4_ = pkg_a;
	_tmp5_ = pamac_package_get_installed_version ((PamacPackage*) _tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_ != NULL) {
		PamacAURPackage* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp7_ = pkg_b;
		_tmp8_ = pamac_package_get_installed_version ((PamacPackage*) _tmp7_);
		_tmp9_ = _tmp8_;
		if (_tmp9_ != NULL) {
			PamacAURPackage* _tmp10_;
			PamacAURPackage* _tmp11_;
			_tmp10_ = pkg_a;
			_tmp11_ = pkg_b;
			result = pamac_sort_pkgs_by_name ((PamacPackage*) _tmp10_, (PamacPackage*) _tmp11_);
			_g_object_unref0 (pkg_b);
			_g_object_unref0 (pkg_a);
			return result;
		}
		result = -1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp12_ = pkg_b;
	_tmp13_ = pamac_package_get_installed_version ((PamacPackage*) _tmp12_);
	_tmp14_ = _tmp13_;
	if (_tmp14_ != NULL) {
		result = 1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp15_ = pkg_a;
	_tmp16_ = pamac_aur_package_get_popularity (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = pkg_b;
	_tmp19_ = pamac_aur_package_get_popularity (_tmp18_);
	_tmp20_ = _tmp19_;
	if (_tmp17_ > _tmp20_) {
		result = -1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp21_ = pkg_b;
	_tmp22_ = pamac_aur_package_get_popularity (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = pkg_a;
	_tmp25_ = pamac_aur_package_get_popularity (_tmp24_);
	_tmp26_ = _tmp25_;
	if (_tmp23_ > _tmp26_) {
		result = 1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp27_ = pkg_a;
	_tmp28_ = pkg_b;
	result = pamac_sort_pkgs_by_name ((PamacPackage*) _tmp27_, (PamacPackage*) _tmp28_);
	_g_object_unref0 (pkg_b);
	_g_object_unref0 (pkg_a);
	return result;
}

gint
pamac_sort_pkgs_by_date (PamacPackage* pkg_a,
                         PamacPackage* pkg_b)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	gint compare = 0;
	GDateTime* _tmp17_;
	GDateTime* _tmp18_;
	GDateTime* _tmp19_;
	GDateTime* _tmp20_;
	gint result;
	g_return_val_if_fail (pkg_a != NULL, 0);
	g_return_val_if_fail (pkg_b != NULL, 0);
	_tmp0_ = pamac_package_get_installed_version (pkg_a);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp2_ = pamac_package_get_installed_version (pkg_b);
		_tmp3_ = _tmp2_;
		if (_tmp3_ == NULL) {
			PamacAlpmPackage* alpm_pkg_a = NULL;
			PamacAlpmPackage* _tmp4_;
			PamacAlpmPackage* alpm_pkg_b = NULL;
			PamacAlpmPackage* _tmp5_;
			gboolean _tmp6_ = FALSE;
			PamacAlpmPackage* _tmp7_;
			_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg_a, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) pkg_a) : NULL);
			alpm_pkg_a = _tmp4_;
			_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg_b, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) pkg_b) : NULL);
			alpm_pkg_b = _tmp5_;
			_tmp7_ = alpm_pkg_a;
			if (_tmp7_ != NULL) {
				PamacAlpmPackage* _tmp8_;
				_tmp8_ = alpm_pkg_b;
				_tmp6_ = _tmp8_ != NULL;
			} else {
				_tmp6_ = FALSE;
			}
			if (_tmp6_) {
				gint compare = 0;
				PamacAlpmPackage* _tmp9_;
				GDateTime* _tmp10_;
				GDateTime* _tmp11_;
				PamacAlpmPackage* _tmp12_;
				GDateTime* _tmp13_;
				GDateTime* _tmp14_;
				_tmp9_ = alpm_pkg_a;
				_tmp10_ = pamac_alpm_package_get_build_date (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp12_ = alpm_pkg_b;
				_tmp13_ = pamac_alpm_package_get_build_date (_tmp12_);
				_tmp14_ = _tmp13_;
				compare = g_date_time_compare (_tmp11_, _tmp14_);
				if (compare == 1) {
					result = -1;
					_g_object_unref0 (alpm_pkg_b);
					_g_object_unref0 (alpm_pkg_a);
					return result;
				}
				if (compare == -1) {
					result = 1;
					_g_object_unref0 (alpm_pkg_b);
					_g_object_unref0 (alpm_pkg_a);
					return result;
				}
			}
			result = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
			_g_object_unref0 (alpm_pkg_b);
			_g_object_unref0 (alpm_pkg_a);
			return result;
		} else {
			result = 1;
			return result;
		}
	}
	_tmp15_ = pamac_package_get_installed_version (pkg_b);
	_tmp16_ = _tmp15_;
	if (_tmp16_ == NULL) {
		result = -1;
		return result;
	}
	_tmp17_ = pamac_package_get_install_date (pkg_a);
	_tmp18_ = _tmp17_;
	_tmp19_ = pamac_package_get_install_date (pkg_b);
	_tmp20_ = _tmp19_;
	compare = g_date_time_compare (_tmp18_, _tmp20_);
	if (compare == 1) {
		result = -1;
		return result;
	}
	if (compare == -1) {
		result = 1;
		return result;
	}
	result = pamac_sort_pkgs_by_name (pkg_a, pkg_b);
	return result;
}

gint
pamac_sort_aur_by_date (PamacPackage* pkg_1,
                        PamacPackage* pkg_2)
{
	PamacAURPackage* pkg_a = NULL;
	PamacAURPackage* _tmp0_;
	PamacAURPackage* _tmp1_;
	PamacAURPackage* pkg_b = NULL;
	PamacAURPackage* _tmp2_;
	PamacAURPackage* _tmp3_;
	gint compare = 0;
	PamacAURPackage* _tmp4_;
	GDateTime* _tmp5_;
	GDateTime* _tmp6_;
	PamacAURPackage* _tmp7_;
	GDateTime* _tmp8_;
	GDateTime* _tmp9_;
	PamacAURPackage* _tmp10_;
	GDateTime* _tmp11_;
	GDateTime* _tmp12_;
	PamacAURPackage* _tmp13_;
	GDateTime* _tmp14_;
	GDateTime* _tmp15_;
	PamacAURPackage* _tmp16_;
	PamacAURPackage* _tmp17_;
	gint result;
	g_return_val_if_fail (pkg_1 != NULL, 0);
	g_return_val_if_fail (pkg_2 != NULL, 0);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg_1, PAMAC_TYPE_AUR_PACKAGE) ? ((PamacAURPackage*) pkg_1) : NULL);
	pkg_a = _tmp0_;
	_tmp1_ = pkg_a;
	if (_tmp1_ == NULL) {
		result = 1;
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (pkg_2, PAMAC_TYPE_AUR_PACKAGE) ? ((PamacAURPackage*) pkg_2) : NULL);
	pkg_b = _tmp2_;
	_tmp3_ = pkg_b;
	if (_tmp3_ == NULL) {
		result = -1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp4_ = pkg_a;
	_tmp5_ = pamac_aur_package_get_outofdate (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = pkg_b;
	_tmp8_ = pamac_aur_package_get_outofdate (_tmp7_);
	_tmp9_ = _tmp8_;
	compare = g_date_time_compare (_tmp6_, _tmp9_);
	if (compare == 1) {
		result = 1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	if (compare == -1) {
		result = -1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp10_ = pkg_a;
	_tmp11_ = pamac_aur_package_get_lastmodified (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = pkg_b;
	_tmp14_ = pamac_aur_package_get_lastmodified (_tmp13_);
	_tmp15_ = _tmp14_;
	compare = g_date_time_compare (_tmp12_, _tmp15_);
	if (compare == 1) {
		result = -1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	if (compare == -1) {
		result = 1;
		_g_object_unref0 (pkg_b);
		_g_object_unref0 (pkg_a);
		return result;
	}
	_tmp16_ = pkg_a;
	_tmp17_ = pkg_b;
	result = pamac_sort_pkgs_by_date ((PamacPackage*) _tmp16_, (PamacPackage*) _tmp17_);
	_g_object_unref0 (pkg_b);
	_g_object_unref0 (pkg_a);
	return result;
}

static inline gpointer
pamac_manager_window_get_instance_private (PamacManagerWindow* self)
{
	return G_STRUCT_MEMBER_P (self, PamacManagerWindow_private_offset);
}

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

static inline void
_g_queue_free__g_object_unref0_ (GQueue* self)
{
	g_queue_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

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_)) {
		PamacManagerWindow* self;
		self = _data8_->self;
		_g_object_unref0 (_data8_->software_mode_action);
		_g_object_unref0 (_data8_->database);
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}

static void
_pamac_manager_window_on_screenshots_carousel_enter_gtk_event_controller_motion_enter (GtkEventControllerMotion* _sender,
                                                                                       gdouble x,
                                                                                       gdouble y,
                                                                                       gpointer self)
{
	pamac_manager_window_on_screenshots_carousel_enter ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_screenshots_carousel_leave_gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                                       gpointer self)
{
	pamac_manager_window_on_screenshots_carousel_leave ((PamacManagerWindow*) self);
}

static void
__lambda4_ (PamacManagerWindow* self)
{
	gtk_window_close ((GtkWindow*) self);
}

static void
___lambda4__g_simple_action_activate (GSimpleAction* _sender,
                                      GVariant* parameter,
                                      gpointer self)
{
	__lambda4_ ((PamacManagerWindow*) self);
}

static void
__lambda5_ (PamacManagerWindow* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkStack* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	_tmp2_ = self->main_stack;
	_tmp3_ = gtk_stack_get_visible_child_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "browse") == 0) {
		HdyFlap* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = self->browse_flap;
		_tmp6_ = gtk_widget_get_visible ((GtkWidget*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gboolean _tmp8_ = FALSE;
		gboolean _tmp9_ = FALSE;
		GtkStack* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp10_ = self->view_stack;
		_tmp11_ = gtk_stack_get_visible_child_name (_tmp10_);
		_tmp12_ = _tmp11_;
		if (g_strcmp0 (_tmp12_, "browse") == 0) {
			_tmp9_ = TRUE;
		} else {
			GtkStack* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			_tmp13_ = self->view_stack;
			_tmp14_ = gtk_stack_get_visible_child_name (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp9_ = g_strcmp0 (_tmp15_, "search") == 0;
		}
		if (_tmp9_) {
			_tmp8_ = TRUE;
		} else {
			GtkStack* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			_tmp16_ = self->view_stack;
			_tmp17_ = gtk_stack_get_visible_child_name (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp8_ = g_strcmp0 (_tmp18_, "installed") == 0;
		}
		_tmp0_ = _tmp8_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkButton* _tmp19_;
		HdyViewSwitcherTitle* _tmp20_;
		GtkButton* _tmp21_;
		GtkSearchEntry* _tmp22_;
		GtkStack* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		gchar* _tmp26_;
		GtkStack* _tmp27_;
		GtkSearchEntry* _tmp28_;
		_tmp19_ = self->search_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp19_, FALSE);
		_tmp20_ = self->view_stack_switcher;
		gtk_widget_set_visible ((GtkWidget*) _tmp20_, FALSE);
		_tmp21_ = self->button_back;
		gtk_widget_set_visible ((GtkWidget*) _tmp21_, TRUE);
		_tmp22_ = self->search_entry;
		gtk_widget_set_visible ((GtkWidget*) _tmp22_, TRUE);
		_tmp23_ = self->view_stack;
		_tmp24_ = gtk_stack_get_visible_child_name (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = g_strdup (_tmp25_);
		_g_free0 (self->priv->previous_view_stack_visible_child_name);
		self->priv->previous_view_stack_visible_child_name = _tmp26_;
		_tmp27_ = self->view_stack;
		gtk_stack_set_visible_child_name (_tmp27_, "search");
		_tmp28_ = self->search_entry;
		gtk_entry_grab_focus_without_selecting ((GtkEntry*) _tmp28_);
	}
}

static void
___lambda5__g_simple_action_activate (GSimpleAction* _sender,
                                      GVariant* parameter,
                                      gpointer self)
{
	__lambda5_ ((PamacManagerWindow*) self);
}

static void
__lambda6_ (PamacManagerWindow* self)
{
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GQuark _tmp5_ = 0U;
	static GQuark _tmp4_label0 = 0;
	static GQuark _tmp4_label1 = 0;
	_tmp0_ = self->main_stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_);
	if (_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("browse")))) {
		switch (0) {
			default:
			{
				HdyLeaflet* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				_tmp6_ = self->packages_leaflet;
				_tmp7_ = hdy_leaflet_get_visible_child_name (_tmp6_);
				_tmp8_ = _tmp7_;
				if (g_strcmp0 (_tmp8_, "details") == 0) {
					PamacPackage* pkg = NULL;
					GQueue* _tmp9_;
					gpointer _tmp10_;
					gboolean _tmp11_ = FALSE;
					PamacPackage* _tmp12_;
					_tmp9_ = self->display_package_queue;
					_tmp10_ = g_queue_pop_tail (_tmp9_);
					pkg = (PamacPackage*) _tmp10_;
					_tmp12_ = pkg;
					if (_tmp12_ != NULL) {
						PamacPackage* _tmp13_;
						const gchar* _tmp14_;
						const gchar* _tmp15_;
						PamacPackage* _tmp16_;
						const gchar* _tmp17_;
						const gchar* _tmp18_;
						_tmp13_ = pkg;
						_tmp14_ = pamac_package_get_name (_tmp13_);
						_tmp15_ = _tmp14_;
						_tmp16_ = self->priv->current_package_displayed;
						_tmp17_ = pamac_package_get_name (_tmp16_);
						_tmp18_ = _tmp17_;
						_tmp11_ = g_strcmp0 (_tmp15_, _tmp18_) != 0;
					} else {
						_tmp11_ = FALSE;
					}
					if (_tmp11_) {
						PamacPackage* _tmp19_;
						PamacPackage* _tmp20_;
						_tmp19_ = pkg;
						_tmp20_ = _g_object_ref0 (_tmp19_);
						_g_object_unref0 (self->priv->current_package_displayed);
						self->priv->current_package_displayed = _tmp20_;
						pamac_manager_window_refresh_details (self);
					} else {
						HdyFlap* _tmp21_;
						gboolean _tmp22_;
						gboolean _tmp23_;
						GtkStack* _tmp27_;
						const gchar* _tmp28_;
						const gchar* _tmp29_;
						_tmp21_ = self->browse_flap;
						_tmp22_ = gtk_widget_get_visible ((GtkWidget*) _tmp21_);
						_tmp23_ = _tmp22_;
						if (!_tmp23_) {
							HdyFlap* _tmp24_;
							GtkBox* _tmp25_;
							_tmp24_ = self->browse_flap;
							gtk_widget_set_visible ((GtkWidget*) _tmp24_, TRUE);
							_tmp25_ = self->main_details_box;
							gtk_widget_set_visible ((GtkWidget*) _tmp25_, FALSE);
							pamac_manager_window_set_adaptative_details (self, FALSE);
						} else {
							HdyLeaflet* _tmp26_;
							_tmp26_ = self->packages_leaflet;
							hdy_leaflet_set_visible_child_name (_tmp26_, "list");
						}
						_tmp27_ = self->view_stack;
						_tmp28_ = gtk_stack_get_visible_child_name (_tmp27_);
						_tmp29_ = _tmp28_;
						if (g_strcmp0 (_tmp29_, "search") == 0) {
							GtkSearchEntry* _tmp30_;
							_tmp30_ = self->search_entry;
							gtk_widget_set_visible ((GtkWidget*) _tmp30_, TRUE);
						} else {
							GtkStack* _tmp31_;
							const gchar* _tmp32_;
							const gchar* _tmp33_;
							_tmp31_ = self->view_stack;
							_tmp32_ = gtk_stack_get_visible_child_name (_tmp31_);
							_tmp33_ = _tmp32_;
							if (g_strcmp0 (_tmp33_, "updates") == 0) {
								HdyViewSwitcherTitle* _tmp34_;
								GtkButton* _tmp35_;
								GtkButton* _tmp36_;
								_tmp34_ = self->view_stack_switcher;
								gtk_widget_set_visible ((GtkWidget*) _tmp34_, TRUE);
								_tmp35_ = self->button_back;
								gtk_widget_set_visible ((GtkWidget*) _tmp35_, FALSE);
								_tmp36_ = self->search_button;
								gtk_widget_set_visible ((GtkWidget*) _tmp36_, FALSE);
							} else {
								HdyViewSwitcherTitle* _tmp37_;
								GtkButton* _tmp38_;
								GtkButton* _tmp39_;
								_tmp37_ = self->view_stack_switcher;
								gtk_widget_set_visible ((GtkWidget*) _tmp37_, TRUE);
								_tmp38_ = self->button_back;
								gtk_widget_set_visible ((GtkWidget*) _tmp38_, FALSE);
								_tmp39_ = self->search_button;
								gtk_widget_set_visible ((GtkWidget*) _tmp39_, TRUE);
							}
						}
						if (self->priv->current_packages_list_length == ((guint) 0)) {
							pamac_manager_window_refresh_packages_list (self);
						}
					}
					_g_object_unref0 (pkg);
				} else {
					GtkButton* _tmp40_;
					GtkSearchEntry* _tmp41_;
					GtkSearchEntry* _tmp42_;
					GtkStack* _tmp43_;
					const gchar* _tmp44_;
					HdyViewSwitcherTitle* _tmp45_;
					GtkButton* _tmp46_;
					_tmp40_ = self->button_back;
					gtk_widget_set_visible ((GtkWidget*) _tmp40_, FALSE);
					_tmp41_ = self->search_entry;
					gtk_widget_set_visible ((GtkWidget*) _tmp41_, FALSE);
					_tmp42_ = self->search_entry;
					gtk_entry_set_text ((GtkEntry*) _tmp42_, "");
					_g_free0 (pamac_search_string);
					pamac_search_string = NULL;
					_tmp43_ = self->view_stack;
					_tmp44_ = self->priv->previous_view_stack_visible_child_name;
					gtk_stack_set_visible_child_name (_tmp43_, _tmp44_);
					_tmp45_ = self->view_stack_switcher;
					gtk_widget_set_visible ((GtkWidget*) _tmp45_, TRUE);
					_tmp46_ = self->search_button;
					gtk_widget_set_visible ((GtkWidget*) _tmp46_, TRUE);
					pamac_manager_window_refresh_packages_list (self);
				}
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("term")))) {
		switch (0) {
			default:
			{
				GtkStack* _tmp47_;
				_tmp47_ = self->main_stack;
				gtk_stack_set_visible_child_name (_tmp47_, "browse");
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				break;
			}
		}
	}
}

static void
___lambda6__g_simple_action_activate (GSimpleAction* _sender,
                                      GVariant* parameter,
                                      gpointer self)
{
	__lambda6_ ((PamacManagerWindow*) self);
}

static void
__lambda59_ (Block8Data* _data8_)
{
	PamacManagerWindow* self;
	GVariant* state = NULL;
	GSimpleAction* _tmp0_;
	GVariant* _tmp1_;
	gboolean old_state = FALSE;
	GVariant* _tmp2_;
	gboolean enabled = FALSE;
	GSimpleAction* _tmp3_;
	GVariant* _tmp4_;
	GVariant* _tmp5_;
	PamacLocalConfig* _tmp6_;
	self = _data8_->self;
	_tmp0_ = _data8_->software_mode_action;
	_tmp1_ = g_action_get_state ((GAction*) _tmp0_);
	state = _tmp1_;
	_tmp2_ = state;
	old_state = g_variant_get_boolean (_tmp2_);
	enabled = !old_state;
	_tmp3_ = _data8_->software_mode_action;
	_tmp4_ = g_variant_new_boolean (enabled);
	g_variant_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	g_simple_action_set_state (_tmp3_, _tmp5_);
	_g_variant_unref0 (_tmp5_);
	_tmp6_ = self->local_config;
	pamac_local_config_set_software_mode (_tmp6_, enabled);
	if (enabled) {
		GtkStack* _tmp7_;
		PamacBackRow* _tmp8_;
		GtkStack* _tmp9_;
		GtkButton* _tmp10_;
		GtkListBox* _tmp11_;
		GtkListBox* _tmp12_;
		GtkListBoxRow* _tmp13_;
		GtkListBox* _tmp14_;
		GtkListBox* _tmp15_;
		GtkListBoxRow* _tmp16_;
		pamac_manager_window_set_enable_aur (self, FALSE);
		_tmp7_ = self->priv->properties_stack;
		gtk_stack_set_visible_child_name (_tmp7_, "details");
		_tmp8_ = self->priv->categories_backrow;
		gtk_widget_set_visible ((GtkWidget*) _tmp8_, FALSE);
		_tmp9_ = self->priv->browse_stack;
		gtk_stack_set_visible_child_name (_tmp9_, "categories");
		_tmp10_ = self->details_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp10_, FALSE);
		_tmp11_ = self->priv->installed_listbox;
		_tmp12_ = self->priv->installed_listbox;
		_tmp13_ = gtk_list_box_get_row_at_index (_tmp12_, 0);
		gtk_list_box_select_row (_tmp11_, _tmp13_);
		_tmp14_ = self->priv->updates_listbox;
		_tmp15_ = self->priv->updates_listbox;
		_tmp16_ = gtk_list_box_get_row_at_index (_tmp15_, 0);
		gtk_list_box_select_row (_tmp14_, _tmp16_);
	} else {
		PamacConfig* _tmp17_;
		PamacConfig* _tmp18_;
		gboolean _tmp19_;
		gboolean _tmp20_;
		PamacBackRow* _tmp21_;
		GtkButton* _tmp22_;
		_tmp17_ = pamac_database_get_config ((PamacDatabase*) _data8_->database);
		_tmp18_ = _tmp17_;
		_tmp19_ = pamac_config_get_enable_aur (_tmp18_);
		_tmp20_ = _tmp19_;
		pamac_manager_window_set_enable_aur (self, _tmp20_);
		_tmp21_ = self->priv->categories_backrow;
		gtk_widget_set_visible ((GtkWidget*) _tmp21_, TRUE);
		_tmp22_ = self->details_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp22_, TRUE);
	}
	pamac_manager_window_refresh_details (self);
	pamac_manager_window_refresh_packages_list (self);
	_g_variant_unref0 (state);
}

static void
___lambda59__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda59_ (self);
}

static void
__lambda60_ (PamacManagerWindow* self)
{
	gboolean _tmp0_ = FALSE;
	if (!self->transaction_running) {
		_tmp0_ = !self->generate_mirrors_list;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkRevealer* _tmp1_;
		_tmp1_ = self->infobox_revealer;
		gtk_revealer_set_reveal_child (_tmp1_, TRUE);
		pamac_manager_window_run_sysupgrade (self, TRUE, FALSE);
	}
}

static void
___lambda60__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda60_ ((PamacManagerWindow*) self);
}

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_)) {
		PamacManagerWindow* self;
		self = _data9_->self;
		_g_object_unref0 (_data9_->history_dialog);
		_g_object_unref0 (self);
		g_slice_free (Block9Data, _data9_);
	}
}

static void
__lambda64_ (Block9Data* _data9_)
{
	PamacManagerWindow* self;
	self = _data9_->self;
	gtk_widget_destroy ((GtkWidget*) _data9_->history_dialog);
}

static void
___lambda64__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda64_ (self);
}

static void
__lambda63_ (PamacManagerWindow* self)
{
	Block9Data* _data9_;
	GdkWindow* _tmp0_;
	GdkDisplay* _tmp1_;
	GdkCursor* _tmp2_;
	GdkCursor* _tmp3_;
	PamacHistoryDialog* _tmp4_;
	GdkWindow* _tmp5_;
	_data9_ = g_slice_new0 (Block9Data);
	_data9_->_ref_count_ = 1;
	_data9_->self = g_object_ref (self);
	_tmp0_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp1_ = gdk_display_get_default ();
	_tmp2_ = gdk_cursor_new_for_display (_tmp1_, GDK_WATCH);
	_tmp3_ = _tmp2_;
	gdk_window_set_cursor (_tmp0_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = pamac_history_dialog_new ((GtkApplicationWindow*) self);
	g_object_ref_sink (_tmp4_);
	_data9_->history_dialog = _tmp4_;
	_tmp5_ = gtk_widget_get_window ((GtkWidget*) self);
	gdk_window_set_cursor (_tmp5_, NULL);
	g_signal_connect_data ((GtkDialog*) _data9_->history_dialog, "response", (GCallback) ___lambda64__gtk_dialog_response, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	gtk_widget_show ((GtkWidget*) _data9_->history_dialog);
	block9_data_unref (_data9_);
	_data9_ = NULL;
}

static void
___lambda63__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda63_ ((PamacManagerWindow*) self);
}

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_)) {
		PamacManagerWindow* self;
		self = _data10_->self;
		_g_object_unref0 (_data10_->chooser);
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}

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

static inline void
_g_slist_free__g_free0_ (GSList* self)
{
	g_slist_free_full (self, (GDestroyNotify) _g_free0_);
}

static void
__lambda66_ (Block10Data* _data10_,
             gint res)
{
	PamacManagerWindow* self;
	self = _data10_->self;
	if (res == ((gint) GTK_RESPONSE_ACCEPT)) {
		GSList* packages_paths = NULL;
		GSList* _tmp0_;
		GSList* _tmp1_;
		_tmp0_ = gtk_file_chooser_get_filenames ((GtkFileChooser*) _data10_->chooser);
		packages_paths = _tmp0_;
		_tmp1_ = packages_paths;
		if (_tmp1_ != NULL) {
			GSList* _tmp2_;
			_tmp2_ = packages_paths;
			{
				GSList* path_collection = NULL;
				GSList* path_it = NULL;
				path_collection = _tmp2_;
				for (path_it = path_collection; path_it != NULL; path_it = path_it->next) {
					const gchar* path = NULL;
					path = (const gchar*) path_it->data;
					{
						GHashTable* _tmp3_;
						const gchar* _tmp4_;
						gchar* _tmp5_;
						_tmp3_ = pamac_to_load;
						_tmp4_ = path;
						_tmp5_ = g_strdup (_tmp4_);
						g_hash_table_add (_tmp3_, _tmp5_);
					}
				}
			}
			pamac_manager_window_run_transaction (self, FALSE);
		}
		(packages_paths == NULL) ? NULL : (packages_paths = (_g_slist_free__g_free0_ (packages_paths), NULL));
	}
	gtk_widget_destroy ((GtkWidget*) _data10_->chooser);
}

static void
___lambda66__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda66_ (self, response_id);
}

static void
__lambda65_ (PamacManagerWindow* self)
{
	Block10Data* _data10_;
	GtkFileChooserDialog* _tmp0_;
	GtkFileFilter* package_filter = NULL;
	GtkFileFilter* _tmp1_;
	GtkFileFilter* _tmp2_;
	_data10_ = g_slice_new0 (Block10Data);
	_data10_->_ref_count_ = 1;
	_data10_->self = g_object_ref (self);
	_tmp0_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (g_dgettext (NULL, "Install Local Packages"), (GtkWindow*) self, GTK_FILE_CHOOSER_ACTION_OPEN, g_dgettext (NULL, "_Cancel"), GTK_RESPONSE_CANCEL, g_dgettext (NULL, "_Open"), GTK_RESPONSE_ACCEPT, NULL);
	g_object_ref_sink (_tmp0_);
	_data10_->chooser = _tmp0_;
	gtk_window_set_icon_name ((GtkWindow*) _data10_->chooser, "system-software-install");
	gtk_file_chooser_set_select_multiple ((GtkFileChooser*) _data10_->chooser, TRUE);
	gtk_file_chooser_set_create_folders ((GtkFileChooser*) _data10_->chooser, FALSE);
	_tmp1_ = gtk_file_filter_new ();
	g_object_ref_sink (_tmp1_);
	package_filter = _tmp1_;
	gtk_file_filter_set_name (package_filter, g_dgettext (NULL, "Alpm Package"));
	gtk_file_filter_add_mime_type (package_filter, "application/x-alpm-package");
	_tmp2_ = _g_object_ref0 (package_filter);
	gtk_file_chooser_add_filter ((GtkFileChooser*) _data10_->chooser, _tmp2_);
	g_signal_connect_data ((GtkDialog*) _data10_->chooser, "response", (GCallback) ___lambda66__gtk_dialog_response, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0);
	gtk_widget_show ((GtkWidget*) _data10_->chooser);
	_g_object_unref0 (package_filter);
	block10_data_unref (_data10_);
	_data10_ = NULL;
}

static void
___lambda65__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda65_ ((PamacManagerWindow*) self);
}

static gboolean
____lambda69_ (Block8Data* _data8_)
{
	PamacManagerWindow* self;
	PamacConfig* _tmp0_;
	PamacConfig* _tmp1_;
	PamacPreferencesWindow* _tmp2_;
	PamacTransactionGtk* _tmp3_;
	gboolean result;
	self = _data8_->self;
	_tmp0_ = pamac_database_get_config ((PamacDatabase*) _data8_->database);
	_tmp1_ = _tmp0_;
	pamac_config_save (_tmp1_);
	_tmp2_ = self->priv->preferences_window;
	gtk_widget_hide ((GtkWidget*) _tmp2_);
	_tmp3_ = self->transaction;
	pamac_transaction_remove_authorization ((PamacTransaction*) _tmp3_);
	self->priv->updates_checked = FALSE;
	pamac_manager_window_check_aur_support (self);
	pamac_manager_window_check_snap_support (self);
	pamac_manager_window_check_flatpak_support (self);
	pamac_manager_window_refresh_details (self);
	pamac_manager_window_refresh_packages_list (self);
	result = TRUE;
	return result;
}

static gboolean
_____lambda69__gtk_widget_delete_event (GtkWidget* _sender,
                                        GdkEventAny* event,
                                        gpointer self)
{
	gboolean result;
	result = ____lambda69_ (self);
	return result;
}

static void
__lambda68_ (Block8Data* _data8_,
             GObject* obj,
             GAsyncResult* res)
{
	PamacManagerWindow* self;
	gboolean authorized = FALSE;
	PamacTransactionGtk* _tmp0_;
	self = _data8_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->transaction;
	authorized = pamac_transaction_get_authorization_finish ((PamacTransaction*) _tmp0_, res);
	if (authorized) {
		PamacPreferencesWindow* _tmp1_;
		PamacPreferencesWindow* _tmp5_;
		_tmp1_ = self->priv->preferences_window;
		if (_tmp1_ == NULL) {
			PamacLocalConfig* _tmp2_;
			PamacPreferencesWindow* _tmp3_;
			PamacPreferencesWindow* _tmp4_;
			_tmp2_ = self->local_config;
			_tmp3_ = pamac_preferences_window_new (self, _tmp2_);
			g_object_ref_sink (_tmp3_);
			_g_object_unref0 (self->priv->preferences_window);
			self->priv->preferences_window = _tmp3_;
			_tmp4_ = self->priv->preferences_window;
			g_signal_connect_data ((GtkWidget*) _tmp4_, "delete-event", (GCallback) _____lambda69__gtk_widget_delete_event, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
		}
		_tmp5_ = self->priv->preferences_window;
		gtk_widget_show ((GtkWidget*) _tmp5_);
	} else {
		GdkWindow* _tmp6_;
		_tmp6_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp6_, NULL);
	}
}

static void
___lambda68__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda68_ (self, source_object, res);
	block8_data_unref (self);
}

static void
__lambda67_ (Block8Data* _data8_)
{
	PamacManagerWindow* self;
	GdkWindow* _tmp0_;
	GdkDisplay* _tmp1_;
	GdkCursor* _tmp2_;
	GdkCursor* _tmp3_;
	PamacTransactionGtk* _tmp4_;
	self = _data8_->self;
	_tmp0_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp1_ = gdk_display_get_default ();
	_tmp2_ = gdk_cursor_new_for_display (_tmp1_, GDK_WATCH);
	_tmp3_ = _tmp2_;
	gdk_window_set_cursor (_tmp0_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->transaction;
	pamac_transaction_get_authorization_async ((PamacTransaction*) _tmp4_, ___lambda68__gasync_ready_callback, block8_data_ref (_data8_));
}

static void
___lambda67__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda67_ (self);
}

static void
__lambda70_ (PamacManagerWindow* self)
{
	gchar** authors = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gint authors_length1;
	gint _authors_size_;
	_tmp0_ = g_strdup ("Guillaume Benoit");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	authors = _tmp1_;
	authors_length1 = 1;
	_authors_size_ = authors_length1;
	gtk_show_about_dialog ((GtkWindow*) self, "program_name", "Pamac", "icon_name", "system-software-install", "logo_icon_name", "system-software-install", "comments", g_dgettext (NULL, "A Package Manager with Alpm, AUR, Flatpak and Snap support"), "copyright", "Copyright © 2022 Guillaume Benoit", "authors", authors, "version", VERSION, "license_type", GTK_LICENSE_GPL_3_0, "website", "https://gitlab.manjaro.org/applications/pamac", NULL);
	authors = (_vala_array_free (authors, authors_length1, (GDestroyNotify) g_free), NULL);
}

static void
___lambda70__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda70_ ((PamacManagerWindow*) self);
}

static void
__lambda71_ (PamacManagerWindow* self)
{
	gdouble max_value = 0.0;
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	GtkScrolledWindow* _tmp5_;
	GtkAdjustment* _tmp6_;
	GtkAdjustment* _tmp7_;
	gdouble _tmp8_;
	gdouble _tmp9_;
	GtkScrolledWindow* _tmp10_;
	GtkAdjustment* _tmp11_;
	GtkAdjustment* _tmp12_;
	gdouble _tmp13_;
	gdouble _tmp14_;
	_tmp0_ = self->priv->packages_scrolledwindow;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_adjustment_get_upper (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->packages_scrolledwindow;
	_tmp6_ = gtk_scrolled_window_get_vadjustment (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = gtk_adjustment_get_page_size (_tmp7_);
	_tmp9_ = _tmp8_;
	max_value = (_tmp4_ - _tmp9_) * 0.8;
	_tmp10_ = self->priv->packages_scrolledwindow;
	_tmp11_ = gtk_scrolled_window_get_vadjustment (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = gtk_adjustment_get_value (_tmp12_);
	_tmp14_ = _tmp13_;
	if (_tmp14_ >= max_value) {
		pamac_manager_window_complete_packages_list (self);
	}
}

static void
___lambda71__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                           gpointer self)
{
	__lambda71_ ((PamacManagerWindow*) self);
}

static void
__lambda72_ (PamacManagerWindow* self)
{
	while (TRUE) {
		if (!pamac_manager_window_need_more_packages (self)) {
			break;
		}
		pamac_manager_window_complete_packages_list (self);
	}
}

static void
___lambda72__gtk_adjustment_changed (GtkAdjustment* _sender,
                                     gpointer self)
{
	__lambda72_ ((PamacManagerWindow*) self);
}

static void
__lambda74_ (PamacManagerWindow* self,
             GtkWidget* child)
{
	PamacPackageRow* pamac_row = NULL;
	PamacPackageRow* _tmp0_;
	PamacPackage* pkg = NULL;
	PamacPackageRow* _tmp1_;
	PamacPackage* _tmp2_;
	PamacPackage* _tmp3_;
	PamacPackage* _tmp4_;
	PamacPackageRow* _tmp5_;
	PamacPackage* _tmp6_;
	g_return_if_fail (child != NULL);
	pamac_row = PAMAC_IS_PACKAGE_ROW (child) ? ((PamacPackageRow*) child) : NULL;
	_tmp0_ = pamac_row;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = pamac_row;
	_tmp2_ = _tmp1_->pkg;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	pkg = _tmp3_;
	_tmp4_ = pkg;
	if (_tmp4_ == NULL) {
		_g_object_unref0 (pkg);
		return;
	}
	_tmp5_ = pamac_row;
	_tmp6_ = pkg;
	pamac_manager_window_set_row_app_icon (self, _tmp5_, _tmp6_);
	_g_object_unref0 (pkg);
}

static void
___lambda74__gtk_callback (GtkWidget* widget,
                           gpointer self)
{
	__lambda74_ ((PamacManagerWindow*) self, widget);
}

static void
__lambda73_ (PamacManagerWindow* self)
{
	GtkFlowBox* _tmp0_;
	pamac_manager_window_update_icons (self);
	_tmp0_ = self->priv->packages_listbox;
	gtk_container_foreach ((GtkContainer*) _tmp0_, ___lambda74__gtk_callback, self);
}

static void
___lambda73__gtk_icon_theme_changed (GtkIconTheme* _sender,
                                     gpointer self)
{
	__lambda73_ ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_get_updates_progress_pamac_database_get_updates_progress (PamacDatabase* _sender,
                                                                                   guint percent,
                                                                                   gpointer self)
{
	pamac_manager_window_on_get_updates_progress ((PamacManagerWindow*) self, percent);
}

static void
_pamac_manager_window_on_start_waiting_pamac_transaction_start_waiting (PamacTransaction* _sender,
                                                                        gpointer self)
{
	pamac_manager_window_on_start_waiting ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_stop_waiting_pamac_transaction_stop_waiting (PamacTransaction* _sender,
                                                                      gpointer self)
{
	pamac_manager_window_on_stop_waiting ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_start_preparing_pamac_transaction_start_preparing (PamacTransaction* _sender,
                                                                            gpointer self)
{
	pamac_manager_window_on_start_preparing ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_stop_preparing_pamac_transaction_stop_preparing (PamacTransaction* _sender,
                                                                          gpointer self)
{
	pamac_manager_window_on_stop_preparing ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_start_downloading_pamac_transaction_start_downloading (PamacTransaction* _sender,
                                                                                gpointer self)
{
	pamac_manager_window_on_start_downloading ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_stop_downloading_pamac_transaction_stop_downloading (PamacTransaction* _sender,
                                                                              gpointer self)
{
	pamac_manager_window_on_stop_downloading ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_start_building_pamac_transaction_start_building (PamacTransaction* _sender,
                                                                          gpointer self)
{
	pamac_manager_window_on_start_building ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_stop_building_pamac_transaction_stop_building (PamacTransaction* _sender,
                                                                        gpointer self)
{
	pamac_manager_window_on_stop_building ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_important_details_outpout_pamac_transaction_important_details_outpout (PamacTransaction* _sender,
                                                                                                gboolean must_show,
                                                                                                gpointer self)
{
	pamac_manager_window_on_important_details_outpout ((PamacManagerWindow*) self, must_show);
}

static void
__lambda75_ (PamacManagerWindow* self)
{
	pamac_manager_window_refresh_listbox_buttons (self);
}

static void
___lambda75__pamac_transaction_gtk_transaction_sum_populated (PamacTransactionGtk* _sender,
                                                              gpointer self)
{
	__lambda75_ ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_close_in_app_notification_gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self)
{
	pamac_manager_window_close_in_app_notification ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_main_stack_visible_child_changed_g_object_notify (GObject* _sender,
                                                                           GParamSpec* pspec,
                                                                           gpointer self)
{
	pamac_manager_window_on_main_stack_visible_child_changed ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_view_stack_visible_child_changed_g_object_notify (GObject* _sender,
                                                                           GParamSpec* pspec,
                                                                           gpointer self)
{
	pamac_manager_window_on_view_stack_visible_child_changed ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_browse_stack_visible_child_changed_g_object_notify (GObject* _sender,
                                                                             GParamSpec* pspec,
                                                                             gpointer self)
{
	pamac_manager_window_on_browse_stack_visible_child_changed ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_properties_stack_visible_child_changed_g_object_notify (GObject* _sender,
                                                                                 GParamSpec* pspec,
                                                                                 gpointer self)
{
	pamac_manager_window_on_properties_stack_visible_child_changed ((PamacManagerWindow*) self);
}

static void
_pamac_manager_window_on_packages_leaflet_folded_changed_g_object_notify (GObject* _sender,
                                                                          GParamSpec* pspec,
                                                                          gpointer self)
{
	pamac_manager_window_on_packages_leaflet_folded_changed ((PamacManagerWindow*) self);
}

static gboolean
__lambda79_ (PamacManagerWindow* self,
             GdkEventKey* event)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gboolean result;
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp3_ = self->main_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "browse") == 0) {
		HdyFlap* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = self->browse_flap;
		_tmp7_ = gtk_widget_get_visible ((GtkWidget*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp2_ = _tmp8_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		HdyLeaflet* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp9_ = self->packages_leaflet;
		_tmp10_ = hdy_leaflet_get_visible_child_name (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp1_ = g_strcmp0 (_tmp11_, "list") == 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_ = FALSE;
		GtkStack* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		_tmp14_ = self->view_stack;
		_tmp15_ = gtk_stack_get_visible_child_name (_tmp14_);
		_tmp16_ = _tmp15_;
		if (g_strcmp0 (_tmp16_, "browse") == 0) {
			_tmp13_ = TRUE;
		} else {
			GtkStack* _tmp17_;
			const gchar* _tmp18_;
			const gchar* _tmp19_;
			_tmp17_ = self->view_stack;
			_tmp18_ = gtk_stack_get_visible_child_name (_tmp17_);
			_tmp19_ = _tmp18_;
			_tmp13_ = g_strcmp0 (_tmp19_, "search") == 0;
		}
		if (_tmp13_) {
			_tmp12_ = TRUE;
		} else {
			GtkStack* _tmp20_;
			const gchar* _tmp21_;
			const gchar* _tmp22_;
			_tmp20_ = self->view_stack;
			_tmp21_ = gtk_stack_get_visible_child_name (_tmp20_);
			_tmp22_ = _tmp21_;
			_tmp12_ = g_strcmp0 (_tmp22_, "installed") == 0;
		}
		_tmp0_ = _tmp12_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkSearchEntry* _tmp23_;
		_tmp23_ = self->search_entry;
		result = gtk_search_entry_handle_event (_tmp23_, (GdkEvent*) event);
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda79__gtk_widget_key_press_event (GtkWidget* _sender,
                                         GdkEventKey* event,
                                         gpointer self)
{
	gboolean result;
	result = __lambda79_ ((PamacManagerWindow*) self, event);
	return result;
}

PamacManagerWindow*
pamac_manager_window_construct (GType object_type,
                                GtkApplication* application,
                                PamacDatabaseGtk* database,
                                gboolean mobile)
{
	PamacManagerWindow * self = NULL;
	Block8Data* _data8_;
	PamacDatabaseGtk* _tmp0_;
	GtkCssProvider* css_provider = NULL;
	GtkCssProvider* _tmp1_;
	GtkCssProvider* _tmp2_;
	GdkScreen* _tmp3_;
	GtkCssProvider* _tmp4_;
	const gchar* use_csd = NULL;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	PamacLocalConfig* _tmp11_;
	PamacLocalConfig* _tmp12_;
	guint64 _tmp13_;
	guint64 _tmp14_;
	PamacLocalConfig* _tmp15_;
	guint64 _tmp16_;
	guint64 _tmp17_;
	PamacLocalConfig* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	GtkButton* _tmp21_;
	GtkButton* _tmp22_;
	GtkButton* _tmp23_;
	GtkButton* _tmp24_;
	GtkButton* _tmp25_;
	GtkLabel* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	GtkLabel* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	GtkLabel* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	GPtrArray* _tmp39_;
	GtkEventControllerMotion* screenshots_pointer_controller = NULL;
	HdyCarousel* _tmp40_;
	GtkEventControllerMotion* _tmp41_;
	GtkEventControllerMotion* _tmp42_;
	GtkEventControllerMotion* _tmp43_;
	gboolean software_mode_enabled = FALSE;
	PamacLocalConfig* _tmp44_;
	gboolean _tmp45_;
	gboolean _tmp46_;
	GSimpleAction* action = NULL;
	GSimpleAction* _tmp50_;
	GSimpleAction* _tmp51_;
	GSimpleAction* _tmp52_;
	gchar** accels = NULL;
	gchar* _tmp53_;
	gchar* _tmp54_;
	gchar** _tmp55_;
	gint accels_length1;
	gint _accels_size_;
	gchar** _tmp56_;
	gint _tmp56__length1;
	GSimpleAction* _tmp57_;
	GSimpleAction* _tmp58_;
	GSimpleAction* _tmp59_;
	gchar* _tmp60_;
	gchar** _tmp61_;
	gchar** _tmp62_;
	gint _tmp62__length1;
	GSimpleAction* _tmp63_;
	GSimpleAction* _tmp64_;
	GSimpleAction* _tmp65_;
	gchar* _tmp66_;
	gchar** _tmp67_;
	gchar** _tmp68_;
	gint _tmp68__length1;
	GVariant* _tmp69_;
	GVariant* _tmp70_;
	GSimpleAction* _tmp71_;
	GSimpleAction* _tmp72_;
	GSimpleAction* _tmp73_;
	GSimpleAction* _tmp74_;
	GSimpleAction* _tmp75_;
	GSimpleAction* _tmp76_;
	GSimpleAction* _tmp77_;
	GSimpleAction* _tmp78_;
	GSimpleAction* _tmp79_;
	GSimpleAction* _tmp80_;
	GSimpleAction* _tmp81_;
	GSimpleAction* _tmp82_;
	GSimpleAction* _tmp83_;
	GSimpleAction* _tmp84_;
	GSimpleAction* _tmp85_;
	GSimpleAction* _tmp86_;
	GSimpleAction* _tmp87_;
	GSimpleAction* _tmp88_;
	GSimpleAction* _tmp89_;
	GSimpleAction* _tmp90_;
	GSimpleAction* _tmp91_;
	GSimpleAction* _tmp92_;
	GSimpleAction* _tmp93_;
	GSimpleAction* _tmp94_;
	GSimpleAction* _tmp95_;
	GtkScrolledWindow* _tmp96_;
	GtkAdjustment* _tmp97_;
	GtkAdjustment* _tmp98_;
	GtkScrolledWindow* _tmp99_;
	GtkAdjustment* _tmp100_;
	GtkAdjustment* _tmp101_;
	GtkIconTheme* _tmp102_;
	GPtrArray* _tmp103_;
	GPtrArray* _tmp104_;
	GHashFunc _tmp105_;
	GEqualFunc _tmp106_;
	GHashTable* _tmp107_;
	GHashFunc _tmp108_;
	GEqualFunc _tmp109_;
	GHashTable* _tmp110_;
	GHashFunc _tmp111_;
	GEqualFunc _tmp112_;
	GHashTable* _tmp113_;
	GHashFunc _tmp114_;
	GEqualFunc _tmp115_;
	GHashTable* _tmp116_;
	GHashFunc _tmp117_;
	GEqualFunc _tmp118_;
	GHashTable* _tmp119_;
	GHashFunc _tmp120_;
	GEqualFunc _tmp121_;
	GHashTable* _tmp122_;
	GHashFunc _tmp123_;
	GEqualFunc _tmp124_;
	GHashTable* _tmp125_;
	GHashFunc _tmp126_;
	GEqualFunc _tmp127_;
	GHashTable* _tmp128_;
	GPtrArray* _tmp129_;
	PamacLocalConfig* _tmp130_;
	GtkApplication* _tmp131_;
	GtkApplication* _tmp132_;
	PamacTransactionGtk* _tmp133_;
	PamacTransactionGtk* _tmp134_;
	PamacTransactionGtk* _tmp135_;
	PamacTransactionGtk* _tmp136_;
	PamacTransactionGtk* _tmp137_;
	PamacTransactionGtk* _tmp138_;
	PamacTransactionGtk* _tmp139_;
	PamacTransactionGtk* _tmp140_;
	PamacTransactionGtk* _tmp141_;
	PamacTransactionGtk* _tmp142_;
	PamacTransactionGtk* _tmp143_;
	GtkButton* _tmp144_;
	GtkStack* _tmp145_;
	PamacTransactionGtk* _tmp146_;
	GtkScrolledWindow* _tmp147_;
	GtkBox* _tmp148_;
	PamacTransactionGtk* _tmp149_;
	PamacProgressBox* _tmp150_;
	GtkBox* _tmp151_;
	PamacTransactionGtk* _tmp152_;
	PamacProgressBox* _tmp153_;
	GtkBox* _tmp154_;
	PamacTransactionGtk* _tmp155_;
	GtkNotebook* _tmp156_;
	GQueue* _tmp157_;
	GHashFunc _tmp158_;
	GEqualFunc _tmp159_;
	GHashTable* _tmp160_;
	GHashFunc _tmp161_;
	GEqualFunc _tmp162_;
	GHashTable* _tmp163_;
	GHashFunc _tmp164_;
	GEqualFunc _tmp165_;
	GHashTable* _tmp166_;
	GHashFunc _tmp167_;
	GEqualFunc _tmp168_;
	GHashTable* _tmp169_;
	GHashFunc _tmp170_;
	GEqualFunc _tmp171_;
	GHashTable* _tmp172_;
	GHashFunc _tmp173_;
	GEqualFunc _tmp174_;
	GHashTable* _tmp175_;
	GHashFunc _tmp176_;
	GEqualFunc _tmp177_;
	GHashTable* _tmp178_;
	GHashFunc _tmp179_;
	GEqualFunc _tmp180_;
	GHashTable* _tmp181_;
	GHashFunc _tmp182_;
	GEqualFunc _tmp183_;
	GHashTable* _tmp184_;
	GtkStack* _tmp185_;
	GtkStack* _tmp186_;
	GtkStack* _tmp187_;
	GtkStack* _tmp188_;
	HdyLeaflet* _tmp189_;
	gchar** tmp_dirs = NULL;
	gchar* _tmp190_;
	gchar* _tmp191_;
	gchar** _tmp192_;
	gint tmp_dirs_length1;
	gint _tmp_dirs_size_;
	gchar** _tmp193_;
	gint _tmp193__length1;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (application != NULL, NULL);
	g_return_val_if_fail (database != NULL, NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (database);
	_g_object_unref0 (_data8_->database);
	_data8_->database = _tmp0_;
	self = (PamacManagerWindow*) g_object_new (object_type, "application", application, "database", _data8_->database, "mobile", mobile, NULL);
	_data8_->self = g_object_ref (self);
	_tmp1_ = gtk_css_provider_new ();
	css_provider = _tmp1_;
	_tmp2_ = css_provider;
	gtk_css_provider_load_from_resource (_tmp2_, "/org/manjaro/pamac/manager/style.css");
	_tmp3_ = gdk_screen_get_default ();
	_tmp4_ = css_provider;
	gtk_style_context_add_provider_for_screen (_tmp3_, (GtkStyleProvider*) _tmp4_, (guint) 500);
	_tmp5_ = g_getenv ("GTK_CSD");
	use_csd = _tmp5_;
	_tmp6_ = use_csd;
	if (g_strcmp0 (_tmp6_, "0") == 0) {
		HdyHeaderBar* _tmp7_;
		_tmp7_ = self->priv->headerbar;
		hdy_header_bar_set_show_close_button (_tmp7_, FALSE);
	}
	_tmp8_ = g_get_user_config_dir ();
	_tmp9_ = g_strdup_printf ("%s/pamac/config", _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = pamac_local_config_new (_tmp10_);
	_g_object_unref0 (self->local_config);
	self->local_config = _tmp11_;
	_g_free0 (_tmp10_);
	_tmp12_ = self->local_config;
	_tmp13_ = pamac_local_config_get_width (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = self->local_config;
	_tmp16_ = pamac_local_config_get_height (_tmp15_);
	_tmp17_ = _tmp16_;
	gtk_window_set_default_size ((GtkWindow*) self, (gint) _tmp14_, (gint) _tmp17_);
	_tmp18_ = self->local_config;
	_tmp19_ = pamac_local_config_get_maximized (_tmp18_);
	_tmp20_ = _tmp19_;
	if (_tmp20_) {
		gtk_window_maximize ((GtkWindow*) self);
	}
	_tmp21_ = self->button_back;
	gtk_widget_set_visible ((GtkWidget*) _tmp21_, FALSE);
	_tmp22_ = self->priv->remove_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp22_, FALSE);
	_tmp23_ = self->priv->install_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp23_, FALSE);
	_tmp24_ = self->priv->ignore_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp24_, FALSE);
	_tmp25_ = self->details_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp25_, FALSE);
	self->priv->scroll_to_top = TRUE;
	self->important_details = FALSE;
	self->transaction_running = FALSE;
	self->generate_mirrors_list = FALSE;
	if (mobile) {
		HdyViewSwitcherTitle* _tmp26_;
		GtkScrolledWindow* _tmp27_;
		GtkLabel* _tmp28_;
		GtkScrolledWindow* _tmp29_;
		_tmp26_ = self->view_stack_switcher;
		hdy_view_switcher_title_set_view_switcher_enabled (_tmp26_, FALSE);
		_tmp27_ = self->priv->browse_head_box_scrolledwindow;
		g_object_set (_tmp27_, "hscrollbar-policy", GTK_POLICY_AUTOMATIC, NULL);
		_tmp28_ = self->priv->sortby_label;
		gtk_label_set_ellipsize (_tmp28_, PANGO_ELLIPSIZE_END);
		_tmp29_ = self->priv->details_scrolledwindow;
		g_object_set (_tmp29_, "hscrollbar-policy", GTK_POLICY_AUTOMATIC, NULL);
	}
	_tmp30_ = self->priv->updated_label;
	_tmp31_ = g_strdup_printf ("<big><b>%s</b></big>", g_dgettext (NULL, "Your system is up to date"));
	_tmp32_ = _tmp31_;
	gtk_label_set_markup (_tmp30_, _tmp32_);
	_g_free0 (_tmp32_);
	_tmp33_ = self->priv->no_item_label;
	_tmp34_ = g_strdup_printf ("<big><b>%s</b></big>", g_dgettext (NULL, "No package found"));
	_tmp35_ = _tmp34_;
	gtk_label_set_markup (_tmp33_, _tmp35_);
	_g_free0 (_tmp35_);
	_tmp36_ = self->priv->checking_label;
	_tmp37_ = g_strdup_printf ("<big><b>%s</b></big>", g_dgettext (NULL, "Checking for Updates"));
	_tmp38_ = _tmp37_;
	gtk_label_set_markup (_tmp36_, _tmp38_);
	_g_free0 (_tmp38_);
	_tmp39_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->current_screenshots);
	self->priv->current_screenshots = _tmp39_;
	_tmp40_ = self->priv->screenshots_carousel;
	_tmp41_ = (GtkEventControllerMotion*) gtk_event_controller_motion_new ((GtkWidget*) _tmp40_);
	screenshots_pointer_controller = _tmp41_;
	_tmp42_ = screenshots_pointer_controller;
	g_signal_connect_object (_tmp42_, "enter", (GCallback) _pamac_manager_window_on_screenshots_carousel_enter_gtk_event_controller_motion_enter, self, 0);
	_tmp43_ = screenshots_pointer_controller;
	g_signal_connect_object (_tmp43_, "leave", (GCallback) _pamac_manager_window_on_screenshots_carousel_leave_gtk_event_controller_motion_leave, self, 0);
	pamac_manager_window_create_all_listbox (self);
	_tmp44_ = self->local_config;
	_tmp45_ = pamac_local_config_get_software_mode (_tmp44_);
	_tmp46_ = _tmp45_;
	software_mode_enabled = _tmp46_;
	if (software_mode_enabled) {
		PamacBackRow* _tmp47_;
		GtkStack* _tmp48_;
		GtkButton* _tmp49_;
		_tmp47_ = self->priv->categories_backrow;
		gtk_widget_set_visible ((GtkWidget*) _tmp47_, FALSE);
		_tmp48_ = self->priv->browse_stack;
		gtk_stack_set_visible_child_name (_tmp48_, "categories");
		_tmp49_ = self->details_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp49_, FALSE);
	}
	pamac_manager_window_check_aur_support (self);
	pamac_manager_window_check_snap_support (self);
	pamac_manager_window_check_flatpak_support (self);
	_tmp50_ = g_simple_action_new ("quit", NULL);
	action = _tmp50_;
	_tmp51_ = action;
	g_signal_connect_object (_tmp51_, "activate", (GCallback) ___lambda4__g_simple_action_activate, self, 0);
	_tmp52_ = action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp52_);
	_tmp53_ = g_strdup ("<Ctrl>Q");
	_tmp54_ = g_strdup ("<Ctrl>W");
	_tmp55_ = g_new0 (gchar*, 2 + 1);
	_tmp55_[0] = _tmp53_;
	_tmp55_[1] = _tmp54_;
	accels = _tmp55_;
	accels_length1 = 2;
	_accels_size_ = accels_length1;
	_tmp56_ = accels;
	_tmp56__length1 = accels_length1;
	gtk_application_set_accels_for_action (application, "win.quit", _tmp56_);
	_tmp57_ = g_simple_action_new ("search", NULL);
	_g_object_unref0 (action);
	action = _tmp57_;
	_tmp58_ = action;
	g_signal_connect_object (_tmp58_, "activate", (GCallback) ___lambda5__g_simple_action_activate, self, 0);
	_tmp59_ = action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp59_);
	_tmp60_ = g_strdup ("<Ctrl>F");
	_tmp61_ = g_new0 (gchar*, 1 + 1);
	_tmp61_[0] = _tmp60_;
	_tmp62_ = _tmp61_;
	_tmp62__length1 = 1;
	gtk_application_set_accels_for_action (application, "win.search", _tmp62_);
	_tmp62_ = (_vala_array_free (_tmp62_, _tmp62__length1, (GDestroyNotify) g_free), NULL);
	_tmp63_ = g_simple_action_new ("back", NULL);
	_g_object_unref0 (action);
	action = _tmp63_;
	_tmp64_ = action;
	g_signal_connect_object (_tmp64_, "activate", (GCallback) ___lambda6__g_simple_action_activate, self, 0);
	_tmp65_ = action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp65_);
	_tmp66_ = g_strdup ("<Alt>Left");
	_tmp67_ = g_new0 (gchar*, 1 + 1);
	_tmp67_[0] = _tmp66_;
	_tmp68_ = _tmp67_;
	_tmp68__length1 = 1;
	gtk_application_set_accels_for_action (application, "win.back", _tmp68_);
	_tmp68_ = (_vala_array_free (_tmp68_, _tmp68__length1, (GDestroyNotify) g_free), NULL);
	_tmp69_ = g_variant_new_boolean (software_mode_enabled);
	g_variant_ref_sink (_tmp69_);
	_tmp70_ = _tmp69_;
	_tmp71_ = g_simple_action_new_stateful ("software-mode", NULL, _tmp70_);
	_tmp72_ = _tmp71_;
	_g_variant_unref0 (_tmp70_);
	_data8_->software_mode_action = _tmp72_;
	_tmp73_ = _data8_->software_mode_action;
	g_signal_connect_data (_tmp73_, "activate", (GCallback) ___lambda59__g_simple_action_activate, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	_tmp74_ = _data8_->software_mode_action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp74_);
	_tmp75_ = g_simple_action_new ("refresh-databases", NULL);
	_g_object_unref0 (self->priv->refresh_action);
	self->priv->refresh_action = _tmp75_;
	_tmp76_ = self->priv->refresh_action;
	g_signal_connect_object (_tmp76_, "activate", (GCallback) ___lambda60__g_simple_action_activate, self, 0);
	_tmp77_ = self->priv->refresh_action;
	g_simple_action_set_enabled (_tmp77_, FALSE);
	_tmp78_ = self->priv->refresh_action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp78_);
	_tmp79_ = self->priv->refresh_action;
	g_simple_action_set_enabled (_tmp79_, TRUE);
	_tmp80_ = g_simple_action_new ("history", NULL);
	_g_object_unref0 (action);
	action = _tmp80_;
	_tmp81_ = action;
	g_signal_connect_object (_tmp81_, "activate", (GCallback) ___lambda63__g_simple_action_activate, self, 0);
	_tmp82_ = action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp82_);
	_tmp83_ = g_simple_action_new ("install-local", NULL);
	_g_object_unref0 (self->priv->install_local_action);
	self->priv->install_local_action = _tmp83_;
	_tmp84_ = self->priv->install_local_action;
	g_signal_connect_object (_tmp84_, "activate", (GCallback) ___lambda65__g_simple_action_activate, self, 0);
	_tmp85_ = self->priv->install_local_action;
	g_simple_action_set_enabled (_tmp85_, FALSE);
	_tmp86_ = self->priv->install_local_action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp86_);
	_tmp87_ = self->priv->install_local_action;
	g_simple_action_set_enabled (_tmp87_, TRUE);
	_tmp88_ = g_simple_action_new ("preferences", NULL);
	_g_object_unref0 (self->priv->preferences_action);
	self->priv->preferences_action = _tmp88_;
	_tmp89_ = self->priv->preferences_action;
	g_signal_connect_data (_tmp89_, "activate", (GCallback) ___lambda67__g_simple_action_activate, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	_tmp90_ = self->priv->preferences_action;
	g_simple_action_set_enabled (_tmp90_, FALSE);
	_tmp91_ = self->priv->preferences_action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp91_);
	_tmp92_ = self->priv->preferences_action;
	g_simple_action_set_enabled (_tmp92_, TRUE);
	_tmp93_ = g_simple_action_new ("about", NULL);
	_g_object_unref0 (action);
	action = _tmp93_;
	_tmp94_ = action;
	g_signal_connect_object (_tmp94_, "activate", (GCallback) ___lambda70__g_simple_action_activate, self, 0);
	_tmp95_ = action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp95_);
	_tmp96_ = self->priv->packages_scrolledwindow;
	_tmp97_ = gtk_scrolled_window_get_vadjustment (_tmp96_);
	_tmp98_ = _tmp97_;
	g_signal_connect_object (_tmp98_, "value-changed", (GCallback) ___lambda71__gtk_adjustment_value_changed, self, 0);
	_tmp99_ = self->priv->packages_scrolledwindow;
	_tmp100_ = gtk_scrolled_window_get_vadjustment (_tmp99_);
	_tmp101_ = _tmp100_;
	g_signal_connect_object (_tmp101_, "changed", (GCallback) ___lambda72__gtk_adjustment_changed, self, 0);
	pamac_manager_window_update_icons (self);
	_tmp102_ = self->priv->icon_theme;
	g_signal_connect_object (_tmp102_, "changed", (GCallback) ___lambda73__gtk_icon_theme_changed, self, 0);
	g_signal_connect_object ((PamacDatabase*) _data8_->database, "get-updates-progress", (GCallback) _pamac_manager_window_on_get_updates_progress_pamac_database_get_updates_progress, self, 0);
	self->priv->updates_checked = FALSE;
	_tmp103_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->repos_updates);
	self->priv->repos_updates = _tmp103_;
	_tmp104_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->aur_updates);
	self->priv->aur_updates = _tmp104_;
	_tmp105_ = g_str_hash;
	_tmp106_ = g_str_equal;
	_tmp107_ = g_hash_table_new_full (_tmp105_, _tmp106_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (pamac_snap_to_install);
	pamac_snap_to_install = _tmp107_;
	_tmp108_ = g_str_hash;
	_tmp109_ = g_str_equal;
	_tmp110_ = g_hash_table_new_full (_tmp108_, _tmp109_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (pamac_snap_to_remove);
	pamac_snap_to_remove = _tmp110_;
	_tmp111_ = g_str_hash;
	_tmp112_ = g_str_equal;
	_tmp113_ = g_hash_table_new_full (_tmp111_, _tmp112_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->previous_snap_to_install);
	self->priv->previous_snap_to_install = _tmp113_;
	_tmp114_ = g_str_hash;
	_tmp115_ = g_str_equal;
	_tmp116_ = g_hash_table_new_full (_tmp114_, _tmp115_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->previous_snap_to_remove);
	self->priv->previous_snap_to_remove = _tmp116_;
	_tmp117_ = g_str_hash;
	_tmp118_ = g_str_equal;
	_tmp119_ = g_hash_table_new_full (_tmp117_, _tmp118_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (pamac_flatpak_to_install);
	pamac_flatpak_to_install = _tmp119_;
	_tmp120_ = g_str_hash;
	_tmp121_ = g_str_equal;
	_tmp122_ = g_hash_table_new_full (_tmp120_, _tmp121_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (pamac_flatpak_to_remove);
	pamac_flatpak_to_remove = _tmp122_;
	_tmp123_ = g_str_hash;
	_tmp124_ = g_str_equal;
	_tmp125_ = g_hash_table_new_full (_tmp123_, _tmp124_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->previous_flatpak_to_install);
	self->priv->previous_flatpak_to_install = _tmp125_;
	_tmp126_ = g_str_hash;
	_tmp127_ = g_str_equal;
	_tmp128_ = g_hash_table_new_full (_tmp126_, _tmp127_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->previous_flatpak_to_remove);
	self->priv->previous_flatpak_to_remove = _tmp128_;
	_tmp129_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->flatpak_updates);
	self->priv->flatpak_updates = _tmp129_;
	_tmp130_ = self->local_config;
	_tmp131_ = gtk_window_get_application ((GtkWindow*) self);
	_tmp132_ = _tmp131_;
	_tmp133_ = pamac_transaction_gtk_new ((PamacDatabase*) _data8_->database, _tmp130_, _tmp132_);
	_g_object_unref0 (self->transaction);
	self->transaction = _tmp133_;
	_tmp134_ = self->transaction;
	g_signal_connect_object ((PamacTransaction*) _tmp134_, "start-waiting", (GCallback) _pamac_manager_window_on_start_waiting_pamac_transaction_start_waiting, self, 0);
	_tmp135_ = self->transaction;
	g_signal_connect_object ((PamacTransaction*) _tmp135_, "stop-waiting", (GCallback) _pamac_manager_window_on_stop_waiting_pamac_transaction_stop_waiting, self, 0);
	_tmp136_ = self->transaction;
	g_signal_connect_object ((PamacTransaction*) _tmp136_, "start-preparing", (GCallback) _pamac_manager_window_on_start_preparing_pamac_transaction_start_preparing, self, 0);
	_tmp137_ = self->transaction;
	g_signal_connect_object ((PamacTransaction*) _tmp137_, "stop-preparing", (GCallback) _pamac_manager_window_on_stop_preparing_pamac_transaction_stop_preparing, self, 0);
	_tmp138_ = self->transaction;
	g_signal_connect_object ((PamacTransaction*) _tmp138_, "start-downloading", (GCallback) _pamac_manager_window_on_start_downloading_pamac_transaction_start_downloading, self, 0);
	_tmp139_ = self->transaction;
	g_signal_connect_object ((PamacTransaction*) _tmp139_, "stop-downloading", (GCallback) _pamac_manager_window_on_stop_downloading_pamac_transaction_stop_downloading, self, 0);
	_tmp140_ = self->transaction;
	g_signal_connect_object ((PamacTransaction*) _tmp140_, "start-building", (GCallback) _pamac_manager_window_on_start_building_pamac_transaction_start_building, self, 0);
	_tmp141_ = self->transaction;
	g_signal_connect_object ((PamacTransaction*) _tmp141_, "stop-building", (GCallback) _pamac_manager_window_on_stop_building_pamac_transaction_stop_building, self, 0);
	_tmp142_ = self->transaction;
	g_signal_connect_object ((PamacTransaction*) _tmp142_, "important-details-outpout", (GCallback) _pamac_manager_window_on_important_details_outpout_pamac_transaction_important_details_outpout, self, 0);
	_tmp143_ = self->transaction;
	g_signal_connect_object (_tmp143_, "transaction-sum-populated", (GCallback) ___lambda75__pamac_transaction_gtk_transaction_sum_populated, self, 0);
	_tmp144_ = self->priv->notification_button;
	g_signal_connect_object (_tmp144_, "clicked", (GCallback) _pamac_manager_window_close_in_app_notification_gtk_button_clicked, self, 0);
	_tmp145_ = self->main_stack;
	_tmp146_ = self->transaction;
	_tmp147_ = _tmp146_->details_window;
	gtk_stack_add_named (_tmp145_, (GtkWidget*) _tmp147_, "term");
	_tmp148_ = self->priv->transaction_infobox;
	_tmp149_ = self->transaction;
	_tmp150_ = _tmp149_->progress_box;
	gtk_container_add ((GtkContainer*) _tmp148_, (GtkWidget*) _tmp150_);
	_tmp151_ = self->priv->transaction_infobox;
	_tmp152_ = self->transaction;
	_tmp153_ = _tmp152_->progress_box;
	gtk_box_reorder_child (_tmp151_, (GtkWidget*) _tmp153_, 0);
	_tmp154_ = self->priv->build_files_box;
	_tmp155_ = self->transaction;
	_tmp156_ = _tmp155_->build_files_notebook;
	gtk_container_add ((GtkContainer*) _tmp154_, (GtkWidget*) _tmp156_);
	_tmp157_ = g_queue_new ();
	(self->display_package_queue == NULL) ? NULL : (self->display_package_queue = (_g_queue_free__g_object_unref0_ (self->display_package_queue), NULL));
	self->display_package_queue = _tmp157_;
	_tmp158_ = g_str_hash;
	_tmp159_ = g_str_equal;
	_tmp160_ = g_hash_table_new_full (_tmp158_, _tmp159_, NULL, _g_free0_);
	_g_hash_table_unref0 (pamac_to_install);
	pamac_to_install = _tmp160_;
	_tmp161_ = g_str_hash;
	_tmp162_ = g_str_equal;
	_tmp163_ = g_hash_table_new_full (_tmp161_, _tmp162_, NULL, _g_free0_);
	_g_hash_table_unref0 (pamac_to_remove);
	pamac_to_remove = _tmp163_;
	_tmp164_ = g_str_hash;
	_tmp165_ = g_str_equal;
	_tmp166_ = g_hash_table_new_full (_tmp164_, _tmp165_, NULL, _g_free0_);
	_g_hash_table_unref0 (pamac_to_load);
	pamac_to_load = _tmp166_;
	_tmp167_ = g_str_hash;
	_tmp168_ = g_str_equal;
	_tmp169_ = g_hash_table_new_full (_tmp167_, _tmp168_, NULL, _g_free0_);
	_g_hash_table_unref0 (pamac_to_build);
	pamac_to_build = _tmp169_;
	_tmp170_ = g_str_hash;
	_tmp171_ = g_str_equal;
	_tmp172_ = g_hash_table_new_full (_tmp170_, _tmp171_, NULL, _g_free0_);
	_g_hash_table_unref0 (self->priv->previous_to_install);
	self->priv->previous_to_install = _tmp172_;
	_tmp173_ = g_str_hash;
	_tmp174_ = g_str_equal;
	_tmp175_ = g_hash_table_new_full (_tmp173_, _tmp174_, NULL, _g_free0_);
	_g_hash_table_unref0 (self->priv->previous_to_remove);
	self->priv->previous_to_remove = _tmp175_;
	_tmp176_ = g_str_hash;
	_tmp177_ = g_str_equal;
	_tmp178_ = g_hash_table_new_full (_tmp176_, _tmp177_, NULL, _g_free0_);
	_g_hash_table_unref0 (self->priv->previous_to_build);
	self->priv->previous_to_build = _tmp178_;
	_tmp179_ = g_str_hash;
	_tmp180_ = g_str_equal;
	_tmp181_ = g_hash_table_new_full (_tmp179_, _tmp180_, NULL, _g_free0_);
	_g_hash_table_unref0 (pamac_to_update);
	pamac_to_update = _tmp181_;
	_tmp182_ = g_str_hash;
	_tmp183_ = g_str_equal;
	_tmp184_ = g_hash_table_new_full (_tmp182_, _tmp183_, NULL, _g_free0_);
	_g_hash_table_unref0 (pamac_temporary_ignorepkgs);
	pamac_temporary_ignorepkgs = _tmp184_;
	_tmp185_ = self->main_stack;
	g_signal_connect_object ((GObject*) _tmp185_, "notify::visible-child", (GCallback) _pamac_manager_window_on_main_stack_visible_child_changed_g_object_notify, self, 0);
	_tmp186_ = self->view_stack;
	g_signal_connect_object ((GObject*) _tmp186_, "notify::visible-child", (GCallback) _pamac_manager_window_on_view_stack_visible_child_changed_g_object_notify, self, 0);
	_tmp187_ = self->priv->browse_stack;
	g_signal_connect_object ((GObject*) _tmp187_, "notify::visible-child", (GCallback) _pamac_manager_window_on_browse_stack_visible_child_changed_g_object_notify, self, 0);
	_tmp188_ = self->priv->properties_stack;
	g_signal_connect_object ((GObject*) _tmp188_, "notify::visible-child", (GCallback) _pamac_manager_window_on_properties_stack_visible_child_changed_g_object_notify, self, 0);
	_tmp189_ = self->packages_leaflet;
	g_signal_connect_object ((GObject*) _tmp189_, "notify::folded", (GCallback) _pamac_manager_window_on_packages_leaflet_folded_changed_g_object_notify, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "key-press-event", (GCallback) ___lambda79__gtk_widget_key_press_event, self, 0);
	_tmp190_ = g_strdup ("/tmp/pamac-app-screenshots");
	_tmp191_ = g_strdup ("/tmp/pamac-app-icons");
	_tmp192_ = g_new0 (gchar*, 2 + 1);
	_tmp192_[0] = _tmp190_;
	_tmp192_[1] = _tmp191_;
	tmp_dirs = _tmp192_;
	tmp_dirs_length1 = 2;
	_tmp_dirs_size_ = tmp_dirs_length1;
	_tmp193_ = tmp_dirs;
	_tmp193__length1 = tmp_dirs_length1;
	{
		gchar** tmp_dir_collection = NULL;
		gint tmp_dir_collection_length1 = 0;
		gint _tmp_dir_collection_size_ = 0;
		gint tmp_dir_it = 0;
		tmp_dir_collection = _tmp193_;
		tmp_dir_collection_length1 = _tmp193__length1;
		for (tmp_dir_it = 0; tmp_dir_it < tmp_dir_collection_length1; tmp_dir_it = tmp_dir_it + 1) {
			const gchar* tmp_dir = NULL;
			tmp_dir = tmp_dir_collection[tmp_dir_it];
			{
				GFile* file = NULL;
				const gchar* _tmp194_;
				GFile* _tmp195_;
				GFile* _tmp196_;
				_tmp194_ = tmp_dir;
				_tmp195_ = g_file_new_for_path (_tmp194_);
				file = _tmp195_;
				_tmp196_ = file;
				if (!g_file_query_exists (_tmp196_, NULL)) {
					{
						const gchar* _tmp197_;
						gchar* _tmp198_;
						gchar* _tmp199_;
						const gchar* _tmp200_;
						gchar* _tmp201_;
						gchar* _tmp202_;
						_tmp197_ = tmp_dir;
						_tmp198_ = g_strdup_printf ("mkdir -p %s", _tmp197_);
						_tmp199_ = _tmp198_;
						g_spawn_command_line_sync (_tmp199_, NULL, NULL, NULL, &_inner_error0_);
						_g_free0 (_tmp199_);
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							if (_inner_error0_->domain == G_SPAWN_ERROR) {
								goto __catch0_g_spawn_error;
							}
							_g_object_unref0 (file);
							tmp_dirs = (_vala_array_free (tmp_dirs, tmp_dirs_length1, (GDestroyNotify) g_free), NULL);
							accels = (_vala_array_free (accels, accels_length1, (GDestroyNotify) g_free), NULL);
							_g_object_unref0 (action);
							_g_object_unref0 (screenshots_pointer_controller);
							_g_object_unref0 (css_provider);
							block8_data_unref (_data8_);
							_data8_ = 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 NULL;
						}
						_tmp200_ = tmp_dir;
						_tmp201_ = g_strdup_printf ("chmod -R a+w %s", _tmp200_);
						_tmp202_ = _tmp201_;
						g_spawn_command_line_sync (_tmp202_, NULL, NULL, NULL, &_inner_error0_);
						_g_free0 (_tmp202_);
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							if (_inner_error0_->domain == G_SPAWN_ERROR) {
								goto __catch0_g_spawn_error;
							}
							_g_object_unref0 (file);
							tmp_dirs = (_vala_array_free (tmp_dirs, tmp_dirs_length1, (GDestroyNotify) g_free), NULL);
							accels = (_vala_array_free (accels, accels_length1, (GDestroyNotify) g_free), NULL);
							_g_object_unref0 (action);
							_g_object_unref0 (screenshots_pointer_controller);
							_g_object_unref0 (css_provider);
							block8_data_unref (_data8_);
							_data8_ = 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 NULL;
						}
					}
					goto __finally0;
					__catch0_g_spawn_error:
					{
						GError* e = NULL;
						GError* _tmp203_;
						const gchar* _tmp204_;
						e = _inner_error0_;
						_inner_error0_ = NULL;
						_tmp203_ = e;
						_tmp204_ = _tmp203_->message;
						g_warning ("manager_window.vala:897: %s", _tmp204_);
						_g_error_free0 (e);
					}
					__finally0:
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						_g_object_unref0 (file);
						tmp_dirs = (_vala_array_free (tmp_dirs, tmp_dirs_length1, (GDestroyNotify) g_free), NULL);
						accels = (_vala_array_free (accels, accels_length1, (GDestroyNotify) g_free), NULL);
						_g_object_unref0 (action);
						_g_object_unref0 (screenshots_pointer_controller);
						_g_object_unref0 (css_provider);
						block8_data_unref (_data8_);
						_data8_ = 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 NULL;
					}
				}
				_g_object_unref0 (file);
			}
		}
	}
	tmp_dirs = (_vala_array_free (tmp_dirs, tmp_dirs_length1, (GDestroyNotify) g_free), NULL);
	accels = (_vala_array_free (accels, accels_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (action);
	_g_object_unref0 (screenshots_pointer_controller);
	_g_object_unref0 (css_provider);
	block8_data_unref (_data8_);
	_data8_ = NULL;
	return self;
}

PamacManagerWindow*
pamac_manager_window_new (GtkApplication* application,
                          PamacDatabaseGtk* database,
                          gboolean mobile)
{
	return pamac_manager_window_construct (PAMAC_TYPE_MANAGER_WINDOW, application, database, mobile);
}

static void
pamac_manager_window_update_icons (PamacManagerWindow* self)
{
	GtkIconTheme* _tmp0_;
	GtkIconTheme* _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_icon_theme_get_default ();
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->icon_theme);
	self->priv->icon_theme = _tmp1_;
	{
		GdkPixbuf* _tmp2_ = NULL;
		GtkIconTheme* _tmp3_;
		GdkPixbuf* _tmp4_;
		GdkPixbuf* _tmp5_;
		_tmp3_ = self->priv->icon_theme;
		_tmp4_ = gtk_icon_theme_load_icon (_tmp3_, "package-x-generic", 64, 0, &_inner_error0_);
		_tmp2_ = _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp5_ = _tmp2_;
		_tmp2_ = NULL;
		_g_object_unref0 (self->priv->package_icon);
		self->priv->package_icon = _tmp5_;
		_g_object_unref0 (_tmp2_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp6_;
		const gchar* _tmp7_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		g_warning ("manager_window.vala:908: %s", _tmp7_);
		_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
_g_variant_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
}

static gboolean
pamac_manager_window_on_window_delete_event (PamacManagerWindow* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (self->transaction_running) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = self->generate_mirrors_list;
	}
	if (_tmp0_) {
		result = TRUE;
		return result;
	} else {
		GHashTable* local_conf = NULL;
		GHashFunc _tmp1_;
		GEqualFunc _tmp2_;
		GHashTable* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		GHashTable* _tmp20_;
		gchar* _tmp21_;
		PamacLocalConfig* _tmp22_;
		gboolean _tmp23_;
		gboolean _tmp24_;
		GVariant* _tmp25_;
		PamacLocalConfig* _tmp26_;
		GHashTable* _tmp27_;
		_tmp1_ = g_str_hash;
		_tmp2_ = g_str_equal;
		_tmp3_ = g_hash_table_new_full (_tmp1_, _tmp2_, _g_free0_, _g_variant_unref0_);
		local_conf = _tmp3_;
		g_object_get ((GtkWindow*) self, "is-maximized", &_tmp4_, NULL);
		_tmp5_ = _tmp4_;
		if (_tmp5_) {
			GHashTable* _tmp6_;
			gchar* _tmp7_;
			GVariant* _tmp8_;
			_tmp6_ = local_conf;
			_tmp7_ = g_strdup ("maximized");
			_tmp8_ = g_variant_new_boolean (TRUE);
			g_variant_ref_sink (_tmp8_);
			g_hash_table_insert (_tmp6_, _tmp7_, _tmp8_);
		} else {
			gint width = 0;
			gint height = 0;
			gint _tmp9_ = 0;
			gint _tmp10_ = 0;
			GHashTable* _tmp11_;
			gchar* _tmp12_;
			GVariant* _tmp13_;
			GHashTable* _tmp14_;
			gchar* _tmp15_;
			GVariant* _tmp16_;
			GHashTable* _tmp17_;
			gchar* _tmp18_;
			GVariant* _tmp19_;
			gtk_window_get_size ((GtkWindow*) self, &_tmp9_, &_tmp10_);
			width = _tmp9_;
			height = _tmp10_;
			_tmp11_ = local_conf;
			_tmp12_ = g_strdup ("maximized");
			_tmp13_ = g_variant_new_boolean (FALSE);
			g_variant_ref_sink (_tmp13_);
			g_hash_table_insert (_tmp11_, _tmp12_, _tmp13_);
			_tmp14_ = local_conf;
			_tmp15_ = g_strdup ("width");
			_tmp16_ = g_variant_new_uint64 ((guint64) width);
			g_variant_ref_sink (_tmp16_);
			g_hash_table_insert (_tmp14_, _tmp15_, _tmp16_);
			_tmp17_ = local_conf;
			_tmp18_ = g_strdup ("height");
			_tmp19_ = g_variant_new_uint64 ((guint64) height);
			g_variant_ref_sink (_tmp19_);
			g_hash_table_insert (_tmp17_, _tmp18_, _tmp19_);
		}
		_tmp20_ = local_conf;
		_tmp21_ = g_strdup ("software_mode");
		_tmp22_ = self->local_config;
		_tmp23_ = pamac_local_config_get_software_mode (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = g_variant_new_boolean (_tmp24_);
		g_variant_ref_sink (_tmp25_);
		g_hash_table_insert (_tmp20_, _tmp21_, _tmp25_);
		_tmp26_ = self->local_config;
		_tmp27_ = local_conf;
		pamac_local_config_write (_tmp26_, _tmp27_);
		result = FALSE;
		_g_hash_table_unref0 (local_conf);
		return result;
	}
}

static gboolean
_pamac_manager_window_on_window_delete_event_gtk_widget_delete_event (GtkWidget* _sender,
                                                                      GdkEventAny* event,
                                                                      gpointer self)
{
	gboolean result;
	result = pamac_manager_window_on_window_delete_event ((PamacManagerWindow*) self);
	return result;
}

static void
pamac_manager_window_show_sidebar (PamacManagerWindow* self,
                                   gboolean visible)
{
	g_return_if_fail (self != NULL);
	if (visible) {
		gboolean _tmp0_;
		_tmp0_ = self->priv->_mobile;
		if (_tmp0_) {
			HdyFlap* _tmp1_;
			GtkToggleButton* _tmp2_;
			_tmp1_ = self->browse_flap;
			hdy_flap_set_fold_policy (_tmp1_, HDY_FLAP_FOLD_POLICY_AUTO);
			_tmp2_ = self->priv->reveal_sidebar_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp2_, TRUE);
		} else {
			HdyFlap* _tmp3_;
			_tmp3_ = self->browse_flap;
			hdy_flap_set_fold_policy (_tmp3_, HDY_FLAP_FOLD_POLICY_NEVER);
		}
	} else {
		HdyFlap* _tmp4_;
		GtkToggleButton* _tmp5_;
		_tmp4_ = self->browse_flap;
		hdy_flap_set_fold_policy (_tmp4_, HDY_FLAP_FOLD_POLICY_ALWAYS);
		_tmp5_ = self->priv->reveal_sidebar_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp5_, FALSE);
	}
}

static void
pamac_manager_window_check_aur_support (PamacManagerWindow* self)
{
	gboolean _tmp0_ = FALSE;
	PamacDatabaseGtk* _tmp1_;
	PamacConfig* _tmp2_;
	PamacConfig* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_database;
	_tmp2_ = pamac_database_get_config ((PamacDatabase*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = pamac_config_get_enable_aur (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		PamacLocalConfig* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = self->local_config;
		_tmp7_ = pamac_local_config_get_software_mode (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp0_ = !_tmp8_;
	} else {
		_tmp0_ = FALSE;
	}
	pamac_manager_window_set_enable_aur (self, _tmp0_);
	_tmp9_ = self->priv->_enable_aur;
	if (_tmp9_) {
		PamacSimpleRow* _tmp10_;
		PamacSimpleRow* _tmp11_;
		PamacDatabaseGtk* _tmp12_;
		PamacConfig* _tmp13_;
		PamacConfig* _tmp14_;
		gboolean _tmp15_;
		gboolean _tmp16_;
		_tmp10_ = self->priv->search_aur_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp10_, TRUE);
		_tmp11_ = self->priv->updates_aur_row;
		_tmp12_ = self->priv->_database;
		_tmp13_ = pamac_database_get_config ((PamacDatabase*) _tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = pamac_config_get_check_aur_updates (_tmp14_);
		_tmp16_ = _tmp15_;
		gtk_widget_set_visible ((GtkWidget*) _tmp11_, _tmp16_);
	} else {
		GtkListBoxRow* row = NULL;
		GtkListBox* _tmp17_;
		GtkListBoxRow* _tmp18_;
		PamacSimpleRow* simple_row = NULL;
		GtkListBoxRow* _tmp19_;
		PamacSimpleRow* _tmp20_;
		gboolean _tmp21_ = FALSE;
		PamacSimpleRow* _tmp22_;
		GtkListBox* _tmp29_;
		GtkListBoxRow* _tmp30_;
		GtkListBoxRow* _tmp31_;
		PamacSimpleRow* _tmp32_;
		gboolean _tmp33_ = FALSE;
		PamacSimpleRow* _tmp34_;
		PamacSimpleRow* _tmp41_;
		PamacSimpleRow* _tmp42_;
		_tmp17_ = self->priv->search_listbox;
		_tmp18_ = gtk_list_box_get_selected_row (_tmp17_);
		row = _tmp18_;
		_tmp19_ = row;
		_tmp20_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (_tmp19_) ? ((PamacSimpleRow*) _tmp19_) : NULL);
		simple_row = _tmp20_;
		_tmp22_ = simple_row;
		if (_tmp22_ != NULL) {
			PamacSimpleRow* _tmp23_;
			const gchar* _tmp24_;
			const gchar* _tmp25_;
			_tmp23_ = simple_row;
			_tmp24_ = pamac_simple_row_get_title (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp21_ = g_strcmp0 (_tmp25_, g_dgettext (NULL, "AUR")) == 0;
		} else {
			_tmp21_ = FALSE;
		}
		if (_tmp21_) {
			GtkListBox* _tmp26_;
			GtkListBox* _tmp27_;
			GtkListBoxRow* _tmp28_;
			_tmp26_ = self->priv->search_listbox;
			_tmp27_ = self->priv->search_listbox;
			_tmp28_ = gtk_list_box_get_row_at_index (_tmp27_, 0);
			gtk_list_box_select_row (_tmp26_, _tmp28_);
		}
		_tmp29_ = self->priv->updates_listbox;
		_tmp30_ = gtk_list_box_get_selected_row (_tmp29_);
		row = _tmp30_;
		_tmp31_ = row;
		_tmp32_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (_tmp31_) ? ((PamacSimpleRow*) _tmp31_) : NULL);
		_g_object_unref0 (simple_row);
		simple_row = _tmp32_;
		_tmp34_ = simple_row;
		if (_tmp34_ != NULL) {
			PamacSimpleRow* _tmp35_;
			const gchar* _tmp36_;
			const gchar* _tmp37_;
			_tmp35_ = simple_row;
			_tmp36_ = pamac_simple_row_get_title (_tmp35_);
			_tmp37_ = _tmp36_;
			_tmp33_ = g_strcmp0 (_tmp37_, g_dgettext (NULL, "AUR")) == 0;
		} else {
			_tmp33_ = FALSE;
		}
		if (_tmp33_) {
			GtkListBox* _tmp38_;
			GtkListBox* _tmp39_;
			GtkListBoxRow* _tmp40_;
			_tmp38_ = self->priv->updates_listbox;
			_tmp39_ = self->priv->updates_listbox;
			_tmp40_ = gtk_list_box_get_row_at_index (_tmp39_, 0);
			gtk_list_box_select_row (_tmp38_, _tmp40_);
		}
		_tmp41_ = self->priv->search_aur_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp41_, FALSE);
		_tmp42_ = self->priv->updates_aur_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp42_, FALSE);
		_g_object_unref0 (simple_row);
	}
}

static void
pamac_manager_window_check_snap_support (PamacManagerWindow* self)
{
	PamacDatabaseGtk* _tmp0_;
	PamacConfig* _tmp1_;
	PamacConfig* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_config ((PamacDatabase*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = pamac_config_get_enable_snap (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		PamacSimpleRow* _tmp5_;
		PamacSimpleRow* _tmp6_;
		_tmp5_ = self->priv->installed_snap_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp5_, TRUE);
		_tmp6_ = self->priv->search_snap_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp6_, TRUE);
	} else {
		GtkListBoxRow* row = NULL;
		GtkListBox* _tmp7_;
		GtkListBoxRow* _tmp8_;
		PamacSimpleRow* simple_row = NULL;
		GtkListBoxRow* _tmp9_;
		PamacSimpleRow* _tmp10_;
		gboolean _tmp11_ = FALSE;
		PamacSimpleRow* _tmp12_;
		GtkListBox* _tmp19_;
		GtkListBoxRow* _tmp20_;
		GtkListBoxRow* _tmp21_;
		PamacSimpleRow* _tmp22_;
		gboolean _tmp23_ = FALSE;
		PamacSimpleRow* _tmp24_;
		PamacSimpleRow* _tmp31_;
		PamacSimpleRow* _tmp32_;
		_tmp7_ = self->priv->installed_listbox;
		_tmp8_ = gtk_list_box_get_selected_row (_tmp7_);
		row = _tmp8_;
		_tmp9_ = row;
		_tmp10_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (_tmp9_) ? ((PamacSimpleRow*) _tmp9_) : NULL);
		simple_row = _tmp10_;
		_tmp12_ = simple_row;
		if (_tmp12_ != NULL) {
			PamacSimpleRow* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			_tmp13_ = simple_row;
			_tmp14_ = pamac_simple_row_get_title (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp11_ = g_strcmp0 (_tmp15_, g_dgettext (NULL, "Snap")) == 0;
		} else {
			_tmp11_ = FALSE;
		}
		if (_tmp11_) {
			GtkListBox* _tmp16_;
			GtkListBox* _tmp17_;
			GtkListBoxRow* _tmp18_;
			_tmp16_ = self->priv->installed_listbox;
			_tmp17_ = self->priv->installed_listbox;
			_tmp18_ = gtk_list_box_get_row_at_index (_tmp17_, 0);
			gtk_list_box_select_row (_tmp16_, _tmp18_);
		}
		_tmp19_ = self->priv->search_listbox;
		_tmp20_ = gtk_list_box_get_selected_row (_tmp19_);
		row = _tmp20_;
		_tmp21_ = row;
		_tmp22_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (_tmp21_) ? ((PamacSimpleRow*) _tmp21_) : NULL);
		_g_object_unref0 (simple_row);
		simple_row = _tmp22_;
		_tmp24_ = simple_row;
		if (_tmp24_ != NULL) {
			PamacSimpleRow* _tmp25_;
			const gchar* _tmp26_;
			const gchar* _tmp27_;
			_tmp25_ = simple_row;
			_tmp26_ = pamac_simple_row_get_title (_tmp25_);
			_tmp27_ = _tmp26_;
			_tmp23_ = g_strcmp0 (_tmp27_, g_dgettext (NULL, "Snap")) == 0;
		} else {
			_tmp23_ = FALSE;
		}
		if (_tmp23_) {
			GtkListBox* _tmp28_;
			GtkListBox* _tmp29_;
			GtkListBoxRow* _tmp30_;
			_tmp28_ = self->priv->search_listbox;
			_tmp29_ = self->priv->search_listbox;
			_tmp30_ = gtk_list_box_get_row_at_index (_tmp29_, 0);
			gtk_list_box_select_row (_tmp28_, _tmp30_);
		}
		_tmp31_ = self->priv->installed_snap_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp31_, FALSE);
		_tmp32_ = self->priv->search_snap_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp32_, FALSE);
		_g_object_unref0 (simple_row);
	}
}

static void
pamac_manager_window_check_flatpak_support (PamacManagerWindow* self)
{
	PamacDatabaseGtk* _tmp0_;
	PamacConfig* _tmp1_;
	PamacConfig* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_config ((PamacDatabase*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = pamac_config_get_enable_flatpak (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		PamacSimpleRow* _tmp5_;
		PamacSimpleRow* _tmp6_;
		PamacSimpleRow* _tmp7_;
		PamacDatabaseGtk* _tmp8_;
		PamacConfig* _tmp9_;
		PamacConfig* _tmp10_;
		gboolean _tmp11_;
		gboolean _tmp12_;
		_tmp5_ = self->priv->installed_flatpak_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp5_, TRUE);
		_tmp6_ = self->priv->search_flatpak_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp6_, TRUE);
		_tmp7_ = self->priv->updates_flatpak_row;
		_tmp8_ = self->priv->_database;
		_tmp9_ = pamac_database_get_config ((PamacDatabase*) _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = pamac_config_get_check_flatpak_updates (_tmp10_);
		_tmp12_ = _tmp11_;
		gtk_widget_set_visible ((GtkWidget*) _tmp7_, _tmp12_);
	} else {
		GtkListBoxRow* row = NULL;
		GtkListBox* _tmp13_;
		GtkListBoxRow* _tmp14_;
		PamacSimpleRow* simple_row = NULL;
		GtkListBoxRow* _tmp15_;
		PamacSimpleRow* _tmp16_;
		gboolean _tmp17_ = FALSE;
		PamacSimpleRow* _tmp18_;
		GtkListBox* _tmp25_;
		GtkListBoxRow* _tmp26_;
		GtkListBoxRow* _tmp27_;
		PamacSimpleRow* _tmp28_;
		gboolean _tmp29_ = FALSE;
		PamacSimpleRow* _tmp30_;
		GtkListBox* _tmp37_;
		GtkListBoxRow* _tmp38_;
		GtkListBoxRow* _tmp39_;
		PamacSimpleRow* _tmp40_;
		gboolean _tmp41_ = FALSE;
		PamacSimpleRow* _tmp42_;
		PamacSimpleRow* _tmp49_;
		PamacSimpleRow* _tmp50_;
		PamacSimpleRow* _tmp51_;
		_tmp13_ = self->priv->installed_listbox;
		_tmp14_ = gtk_list_box_get_selected_row (_tmp13_);
		row = _tmp14_;
		_tmp15_ = row;
		_tmp16_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (_tmp15_) ? ((PamacSimpleRow*) _tmp15_) : NULL);
		simple_row = _tmp16_;
		_tmp18_ = simple_row;
		if (_tmp18_ != NULL) {
			PamacSimpleRow* _tmp19_;
			const gchar* _tmp20_;
			const gchar* _tmp21_;
			_tmp19_ = simple_row;
			_tmp20_ = pamac_simple_row_get_title (_tmp19_);
			_tmp21_ = _tmp20_;
			_tmp17_ = g_strcmp0 (_tmp21_, g_dgettext (NULL, "Flatpak")) == 0;
		} else {
			_tmp17_ = FALSE;
		}
		if (_tmp17_) {
			GtkListBox* _tmp22_;
			GtkListBox* _tmp23_;
			GtkListBoxRow* _tmp24_;
			_tmp22_ = self->priv->installed_listbox;
			_tmp23_ = self->priv->installed_listbox;
			_tmp24_ = gtk_list_box_get_row_at_index (_tmp23_, 0);
			gtk_list_box_select_row (_tmp22_, _tmp24_);
		}
		_tmp25_ = self->priv->search_listbox;
		_tmp26_ = gtk_list_box_get_selected_row (_tmp25_);
		row = _tmp26_;
		_tmp27_ = row;
		_tmp28_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (_tmp27_) ? ((PamacSimpleRow*) _tmp27_) : NULL);
		_g_object_unref0 (simple_row);
		simple_row = _tmp28_;
		_tmp30_ = simple_row;
		if (_tmp30_ != NULL) {
			PamacSimpleRow* _tmp31_;
			const gchar* _tmp32_;
			const gchar* _tmp33_;
			_tmp31_ = simple_row;
			_tmp32_ = pamac_simple_row_get_title (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp29_ = g_strcmp0 (_tmp33_, g_dgettext (NULL, "Flatpak")) == 0;
		} else {
			_tmp29_ = FALSE;
		}
		if (_tmp29_) {
			GtkListBox* _tmp34_;
			GtkListBox* _tmp35_;
			GtkListBoxRow* _tmp36_;
			_tmp34_ = self->priv->search_listbox;
			_tmp35_ = self->priv->search_listbox;
			_tmp36_ = gtk_list_box_get_row_at_index (_tmp35_, 0);
			gtk_list_box_select_row (_tmp34_, _tmp36_);
		}
		_tmp37_ = self->priv->updates_listbox;
		_tmp38_ = gtk_list_box_get_selected_row (_tmp37_);
		row = _tmp38_;
		_tmp39_ = row;
		_tmp40_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (_tmp39_) ? ((PamacSimpleRow*) _tmp39_) : NULL);
		_g_object_unref0 (simple_row);
		simple_row = _tmp40_;
		_tmp42_ = simple_row;
		if (_tmp42_ != NULL) {
			PamacSimpleRow* _tmp43_;
			const gchar* _tmp44_;
			const gchar* _tmp45_;
			_tmp43_ = simple_row;
			_tmp44_ = pamac_simple_row_get_title (_tmp43_);
			_tmp45_ = _tmp44_;
			_tmp41_ = g_strcmp0 (_tmp45_, g_dgettext (NULL, "Flatpak")) == 0;
		} else {
			_tmp41_ = FALSE;
		}
		if (_tmp41_) {
			GtkListBox* _tmp46_;
			GtkListBox* _tmp47_;
			GtkListBoxRow* _tmp48_;
			_tmp46_ = self->priv->updates_listbox;
			_tmp47_ = self->priv->updates_listbox;
			_tmp48_ = gtk_list_box_get_row_at_index (_tmp47_, 0);
			gtk_list_box_select_row (_tmp46_, _tmp48_);
		}
		_tmp49_ = self->priv->installed_flatpak_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp49_, FALSE);
		_tmp50_ = self->priv->search_flatpak_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp50_, FALSE);
		_tmp51_ = self->priv->updates_flatpak_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp51_, FALSE);
		_g_object_unref0 (simple_row);
	}
}

static void
pamac_manager_window_set_pending_operations (PamacManagerWindow* self)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	if (!self->transaction_running) {
		_tmp0_ = !self->generate_mirrors_list;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkStack* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp1_ = self->view_stack;
		_tmp2_ = gtk_stack_get_visible_child_name (_tmp1_);
		_tmp3_ = _tmp2_;
		if (g_strcmp0 (_tmp3_, "updates") == 0) {
			guint64 total_dsize = 0ULL;
			GPtrArray* _tmp4_;
			GHashTable* _tmp22_;
			guint _tmp23_;
			guint _tmp24_;
			GtkButton* _tmp31_;
			GtkRevealer* _tmp32_;
			total_dsize = (guint64) 0;
			_tmp4_ = self->priv->repos_updates;
			{
				GPtrArray* pkg_collection = NULL;
				guint pkg_index = 0U;
				pkg_collection = _tmp4_;
				for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
					PamacAlpmPackage* pkg = NULL;
					pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
					{
						GHashTable* _tmp5_;
						PamacAlpmPackage* _tmp6_;
						const gchar* _tmp7_;
						const gchar* _tmp8_;
						_tmp5_ = pamac_to_update;
						_tmp6_ = pkg;
						_tmp7_ = pamac_package_get_name ((PamacPackage*) _tmp6_);
						_tmp8_ = _tmp7_;
						if (g_hash_table_contains (_tmp5_, _tmp8_)) {
							PamacAlpmPackage* _tmp9_;
							guint64 _tmp10_;
							guint64 _tmp11_;
							_tmp9_ = pkg;
							_tmp10_ = pamac_package_get_download_size ((PamacPackage*) _tmp9_);
							_tmp11_ = _tmp10_;
							total_dsize += _tmp11_;
						}
					}
				}
			}
			if (total_dsize > ((guint64) 0)) {
				PamacTransactionGtk* _tmp12_;
				PamacProgressBox* _tmp13_;
				GtkLabel* _tmp14_;
				gchar* _tmp15_;
				gchar* _tmp16_;
				gchar* _tmp17_;
				gchar* _tmp18_;
				_tmp12_ = self->transaction;
				_tmp13_ = _tmp12_->progress_box;
				_tmp14_ = _tmp13_->action_label;
				_tmp15_ = g_format_size_full (total_dsize, G_FORMAT_SIZE_DEFAULT);
				_tmp16_ = _tmp15_;
				_tmp17_ = g_strdup_printf ("<b>%s: %s</b>", g_dgettext (NULL, "Total download size"), _tmp16_);
				_tmp18_ = _tmp17_;
				gtk_label_set_markup (_tmp14_, _tmp18_);
				_g_free0 (_tmp18_);
				_g_free0 (_tmp16_);
			} else {
				PamacTransactionGtk* _tmp19_;
				PamacProgressBox* _tmp20_;
				GtkLabel* _tmp21_;
				_tmp19_ = self->transaction;
				_tmp20_ = _tmp19_->progress_box;
				_tmp21_ = _tmp20_->action_label;
				gtk_label_set_label (_tmp21_, "");
			}
			_tmp22_ = pamac_to_update;
			_tmp23_ = g_hash_table_size (_tmp22_);
			_tmp24_ = _tmp23_;
			if (_tmp24_ > ((guint) 0)) {
				GtkButton* _tmp25_;
				GtkButton* _tmp26_;
				GtkStyleContext* _tmp27_;
				_tmp25_ = self->apply_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp25_, TRUE);
				_tmp26_ = self->apply_button;
				_tmp27_ = gtk_widget_get_style_context ((GtkWidget*) _tmp26_);
				gtk_style_context_add_class (_tmp27_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
			} else {
				GtkButton* _tmp28_;
				GtkButton* _tmp29_;
				GtkStyleContext* _tmp30_;
				_tmp28_ = self->apply_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp28_, FALSE);
				_tmp29_ = self->apply_button;
				_tmp30_ = gtk_widget_get_style_context ((GtkWidget*) _tmp29_);
				gtk_style_context_remove_class (_tmp30_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
			}
			_tmp31_ = self->priv->cancel_button;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp31_, FALSE);
			_tmp32_ = self->infobox_revealer;
			gtk_revealer_set_reveal_child (_tmp32_, TRUE);
		} else {
			guint total_pending = 0U;
			GHashTable* _tmp33_;
			guint _tmp34_;
			guint _tmp35_;
			GHashTable* _tmp36_;
			guint _tmp37_;
			guint _tmp38_;
			GHashTable* _tmp39_;
			guint _tmp40_;
			guint _tmp41_;
			GHashTable* _tmp42_;
			guint _tmp43_;
			guint _tmp44_;
			GHashTable* _tmp45_;
			guint _tmp46_;
			guint _tmp47_;
			GHashTable* _tmp48_;
			guint _tmp49_;
			guint _tmp50_;
			GHashTable* _tmp51_;
			guint _tmp52_;
			guint _tmp53_;
			_tmp33_ = pamac_to_install;
			_tmp34_ = g_hash_table_size (_tmp33_);
			_tmp35_ = _tmp34_;
			_tmp36_ = pamac_snap_to_install;
			_tmp37_ = g_hash_table_size (_tmp36_);
			_tmp38_ = _tmp37_;
			_tmp39_ = pamac_snap_to_remove;
			_tmp40_ = g_hash_table_size (_tmp39_);
			_tmp41_ = _tmp40_;
			_tmp42_ = pamac_flatpak_to_install;
			_tmp43_ = g_hash_table_size (_tmp42_);
			_tmp44_ = _tmp43_;
			_tmp45_ = pamac_flatpak_to_remove;
			_tmp46_ = g_hash_table_size (_tmp45_);
			_tmp47_ = _tmp46_;
			_tmp48_ = pamac_to_remove;
			_tmp49_ = g_hash_table_size (_tmp48_);
			_tmp50_ = _tmp49_;
			_tmp51_ = pamac_to_build;
			_tmp52_ = g_hash_table_size (_tmp51_);
			_tmp53_ = _tmp52_;
			total_pending = (((((_tmp35_ + _tmp38_) + _tmp41_) + _tmp44_) + _tmp47_) + _tmp50_) + _tmp53_;
			if (total_pending == ((guint) 0)) {
				PamacTransactionGtk* _tmp54_;
				PamacProgressBox* _tmp55_;
				GtkLabel* _tmp56_;
				GtkButton* _tmp57_;
				GtkButton* _tmp58_;
				GtkButton* _tmp59_;
				GtkStyleContext* _tmp60_;
				GtkListBoxRow* _tmp62_;
				PamacSimpleRow* _tmp63_;
				GtkListBoxRow* _tmp64_;
				PamacSimpleRow* _tmp65_;
				_tmp54_ = self->transaction;
				_tmp55_ = _tmp54_->progress_box;
				_tmp56_ = _tmp55_->action_label;
				gtk_label_set_label (_tmp56_, "");
				_tmp57_ = self->priv->cancel_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp57_, FALSE);
				_tmp58_ = self->apply_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp58_, FALSE);
				_tmp59_ = self->apply_button;
				_tmp60_ = gtk_widget_get_style_context ((GtkWidget*) _tmp59_);
				gtk_style_context_remove_class (_tmp60_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
				if (!self->important_details) {
					GtkRevealer* _tmp61_;
					_tmp61_ = self->infobox_revealer;
					gtk_revealer_set_reveal_child (_tmp61_, FALSE);
				}
				_tmp62_ = self->priv->categories_pending_row_separator;
				gtk_widget_set_visible ((GtkWidget*) _tmp62_, FALSE);
				_tmp63_ = self->priv->categories_pending_row;
				gtk_widget_set_visible ((GtkWidget*) _tmp63_, FALSE);
				_tmp64_ = self->priv->filters_pending_row_separator;
				gtk_widget_set_visible ((GtkWidget*) _tmp64_, FALSE);
				_tmp65_ = self->priv->filters_pending_row;
				gtk_widget_set_visible ((GtkWidget*) _tmp65_, FALSE);
			} else {
				gchar* info = NULL;
				gchar* _tmp66_;
				PamacTransactionGtk* _tmp67_;
				PamacProgressBox* _tmp68_;
				GtkLabel* _tmp69_;
				const gchar* _tmp70_;
				GtkButton* _tmp71_;
				GtkButton* _tmp72_;
				GtkButton* _tmp73_;
				GtkStyleContext* _tmp74_;
				GtkRevealer* _tmp75_;
				PamacLocalConfig* _tmp76_;
				gboolean _tmp77_;
				gboolean _tmp78_;
				_tmp66_ = g_strdup_printf (g_dngettext (NULL, "%u pending operation", "%u pending operations", (gulong) total_pending), total_pending);
				info = _tmp66_;
				_tmp67_ = self->transaction;
				_tmp68_ = _tmp67_->progress_box;
				_tmp69_ = _tmp68_->action_label;
				_tmp70_ = info;
				gtk_label_set_label (_tmp69_, _tmp70_);
				_tmp71_ = self->priv->cancel_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp71_, TRUE);
				_tmp72_ = self->apply_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp72_, TRUE);
				_tmp73_ = self->apply_button;
				_tmp74_ = gtk_widget_get_style_context ((GtkWidget*) _tmp73_);
				gtk_style_context_add_class (_tmp74_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
				_tmp75_ = self->infobox_revealer;
				gtk_revealer_set_reveal_child (_tmp75_, TRUE);
				_tmp76_ = self->local_config;
				_tmp77_ = pamac_local_config_get_software_mode (_tmp76_);
				_tmp78_ = _tmp77_;
				if (_tmp78_) {
					GtkListBoxRow* _tmp79_;
					PamacSimpleRow* _tmp80_;
					_tmp79_ = self->priv->categories_pending_row_separator;
					gtk_widget_set_visible ((GtkWidget*) _tmp79_, TRUE);
					_tmp80_ = self->priv->categories_pending_row;
					gtk_widget_set_visible ((GtkWidget*) _tmp80_, TRUE);
				} else {
					GtkListBoxRow* _tmp81_;
					PamacSimpleRow* _tmp82_;
					_tmp81_ = self->priv->filters_pending_row_separator;
					gtk_widget_set_visible ((GtkWidget*) _tmp81_, TRUE);
					_tmp82_ = self->priv->filters_pending_row;
					gtk_widget_set_visible ((GtkWidget*) _tmp82_, TRUE);
				}
				_g_free0 (info);
			}
		}
	}
}

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

static void
pamac_manager_window_create_all_listbox (PamacManagerWindow* self)
{
	GtkListBoxRow* _tmp0_;
	GtkSeparator* separator = NULL;
	GtkSeparator* _tmp1_;
	GtkSeparator* _tmp2_;
	GtkListBoxRow* _tmp3_;
	GtkSeparator* _tmp4_;
	GtkListBoxRow* _tmp5_;
	GtkListBoxRow* _tmp6_;
	GtkListBox* _tmp7_;
	GtkListBoxRow* _tmp8_;
	PamacSimpleRow* _tmp9_;
	PamacSimpleRow* _tmp10_;
	GtkListBox* _tmp11_;
	PamacSimpleRow* _tmp12_;
	PamacBackRow* _tmp13_;
	GtkListBox* _tmp14_;
	PamacBackRow* _tmp15_;
	PamacDatabaseGtk* _tmp16_;
	GPtrArray* _tmp17_;
	GtkListBoxRow* _tmp22_;
	GtkSeparator* _tmp23_;
	GtkSeparator* _tmp24_;
	GtkListBoxRow* _tmp25_;
	GtkSeparator* _tmp26_;
	GtkListBoxRow* _tmp27_;
	GtkListBoxRow* _tmp28_;
	GtkListBox* _tmp29_;
	GtkListBoxRow* _tmp30_;
	PamacSimpleRow* _tmp31_;
	PamacSimpleRow* _tmp32_;
	GtkListBox* _tmp33_;
	PamacSimpleRow* _tmp34_;
	GtkListBox* _tmp35_;
	GtkListBox* _tmp36_;
	GtkListBoxRow* _tmp37_;
	GtkListBox* _tmp38_;
	PamacBackRow* _tmp39_;
	PamacBackRow* _tmp40_;
	PamacDatabaseGtk* _tmp41_;
	GPtrArray* _tmp42_;
	GPtrArray* _tmp43_;
	GPtrArray* _tmp44_;
	GtkListBox* _tmp49_;
	GtkListBox* _tmp50_;
	GtkListBoxRow* _tmp51_;
	GPtrArray* _tmp52_;
	gchar* _tmp53_;
	PamacDatabaseGtk* _tmp54_;
	GPtrArray* _tmp55_;
	GPtrArray* _tmp59_;
	gchar* _tmp60_;
	GtkListBox* _tmp61_;
	PamacBackRow* _tmp62_;
	PamacBackRow* _tmp63_;
	PamacDatabaseGtk* _tmp64_;
	GPtrArray* _tmp65_;
	GtkListBox* _tmp70_;
	GtkListBox* _tmp71_;
	GtkListBoxRow* _tmp72_;
	PamacSimpleRow* all_installed_row = NULL;
	PamacSimpleRow* _tmp73_;
	PamacSimpleRow* _tmp74_;
	PamacSimpleRow* _tmp75_;
	GtkListBox* _tmp76_;
	GtkListBox* _tmp77_;
	PamacSimpleRow* _tmp78_;
	PamacSimpleRow* _tmp79_;
	GtkListBox* _tmp80_;
	PamacSimpleRow* _tmp81_;
	PamacSimpleRow* _tmp82_;
	GtkListBox* _tmp83_;
	PamacSimpleRow* _tmp84_;
	PamacSimpleRow* _tmp85_;
	GtkListBox* _tmp86_;
	PamacSimpleRow* _tmp87_;
	GtkListBox* _tmp88_;
	PamacSimpleRow* _tmp89_;
	GtkListBox* _tmp90_;
	PamacSimpleRow* all_search_row = NULL;
	PamacSimpleRow* _tmp91_;
	PamacSimpleRow* _tmp92_;
	PamacSimpleRow* _tmp93_;
	PamacSimpleRow* _tmp94_;
	GtkListBox* _tmp95_;
	GtkListBox* _tmp96_;
	PamacSimpleRow* _tmp97_;
	PamacSimpleRow* _tmp98_;
	GtkListBox* _tmp99_;
	PamacSimpleRow* _tmp100_;
	PamacSimpleRow* _tmp101_;
	GtkListBox* _tmp102_;
	PamacSimpleRow* _tmp103_;
	GtkListBox* _tmp104_;
	PamacSimpleRow* _tmp105_;
	GtkListBox* _tmp106_;
	PamacSimpleRow* _tmp107_;
	GtkListBox* _tmp108_;
	PamacSimpleRow* all_updates_row = NULL;
	PamacSimpleRow* _tmp109_;
	PamacSimpleRow* _tmp110_;
	PamacSimpleRow* _tmp111_;
	PamacSimpleRow* _tmp112_;
	PamacSimpleRow* _tmp113_;
	GtkListBox* _tmp114_;
	GtkListBox* _tmp115_;
	PamacSimpleRow* _tmp116_;
	GtkListBox* _tmp117_;
	PamacSimpleRow* _tmp118_;
	GtkListBox* _tmp119_;
	PamacSimpleRow* _tmp120_;
	GtkListBox* _tmp121_;
	PamacSimpleRow* _tmp122_;
	GtkListBox* _tmp123_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkListBoxRow*) gtk_list_box_row_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->filters_pending_row_separator);
	self->priv->filters_pending_row_separator = _tmp0_;
	_tmp1_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp1_);
	separator = _tmp1_;
	_tmp2_ = separator;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, TRUE);
	_tmp3_ = self->priv->filters_pending_row_separator;
	_tmp4_ = separator;
	gtk_container_add ((GtkContainer*) _tmp3_, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->filters_pending_row_separator;
	gtk_list_box_row_set_selectable (_tmp5_, FALSE);
	_tmp6_ = self->priv->filters_pending_row_separator;
	gtk_list_box_row_set_activatable (_tmp6_, FALSE);
	_tmp7_ = self->priv->filters_listbox;
	_tmp8_ = self->priv->filters_pending_row_separator;
	gtk_container_add ((GtkContainer*) _tmp7_, (GtkWidget*) _tmp8_);
	_tmp9_ = pamac_simple_row_new (g_dgettext (NULL, "Pending"));
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->filters_pending_row);
	self->priv->filters_pending_row = _tmp9_;
	_tmp10_ = self->priv->filters_pending_row;
	gtk_widget_set_visible ((GtkWidget*) _tmp10_, FALSE);
	_tmp11_ = self->priv->filters_listbox;
	_tmp12_ = self->priv->filters_pending_row;
	gtk_container_add ((GtkContainer*) _tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = pamac_back_row_new ();
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->categories_backrow);
	self->priv->categories_backrow = _tmp13_;
	_tmp14_ = self->priv->categories_listbox;
	_tmp15_ = self->priv->categories_backrow;
	gtk_container_add ((GtkContainer*) _tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = self->priv->_database;
	_tmp17_ = pamac_database_get_categories_names ((PamacDatabase*) _tmp16_);
	{
		GPtrArray* name_collection = NULL;
		guint name_index = 0U;
		name_collection = _tmp17_;
		for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
			const gchar* name = NULL;
			name = (const gchar*) g_ptr_array_index (name_collection, name_index);
			{
				GtkListBox* _tmp18_;
				const gchar* _tmp19_;
				PamacSimpleRow* _tmp20_;
				PamacSimpleRow* _tmp21_;
				_tmp18_ = self->priv->categories_listbox;
				_tmp19_ = name;
				_tmp20_ = pamac_simple_row_new (g_dgettext (NULL, _tmp19_));
				g_object_ref_sink (_tmp20_);
				_tmp21_ = _tmp20_;
				gtk_container_add ((GtkContainer*) _tmp18_, (GtkWidget*) _tmp21_);
				_g_object_unref0 (_tmp21_);
			}
		}
	}
	_tmp22_ = (GtkListBoxRow*) gtk_list_box_row_new ();
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (self->priv->categories_pending_row_separator);
	self->priv->categories_pending_row_separator = _tmp22_;
	_tmp23_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp23_);
	_g_object_unref0 (separator);
	separator = _tmp23_;
	_tmp24_ = separator;
	gtk_widget_set_visible ((GtkWidget*) _tmp24_, TRUE);
	_tmp25_ = self->priv->categories_pending_row_separator;
	_tmp26_ = separator;
	gtk_container_add ((GtkContainer*) _tmp25_, (GtkWidget*) _tmp26_);
	_tmp27_ = self->priv->categories_pending_row_separator;
	gtk_list_box_row_set_selectable (_tmp27_, FALSE);
	_tmp28_ = self->priv->categories_pending_row_separator;
	gtk_list_box_row_set_activatable (_tmp28_, FALSE);
	_tmp29_ = self->priv->categories_listbox;
	_tmp30_ = self->priv->categories_pending_row_separator;
	gtk_container_add ((GtkContainer*) _tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = pamac_simple_row_new (g_dgettext (NULL, "Pending"));
	g_object_ref_sink (_tmp31_);
	_g_object_unref0 (self->priv->categories_pending_row);
	self->priv->categories_pending_row = _tmp31_;
	_tmp32_ = self->priv->categories_pending_row;
	gtk_widget_set_visible ((GtkWidget*) _tmp32_, FALSE);
	_tmp33_ = self->priv->categories_listbox;
	_tmp34_ = self->priv->categories_pending_row;
	gtk_container_add ((GtkContainer*) _tmp33_, (GtkWidget*) _tmp34_);
	_tmp35_ = self->priv->categories_listbox;
	_tmp36_ = self->priv->categories_listbox;
	_tmp37_ = gtk_list_box_get_row_at_index (_tmp36_, 1);
	gtk_list_box_select_row (_tmp35_, _tmp37_);
	_tmp38_ = self->priv->repos_listbox;
	_tmp39_ = pamac_back_row_new ();
	g_object_ref_sink (_tmp39_);
	_tmp40_ = _tmp39_;
	gtk_container_add ((GtkContainer*) _tmp38_, (GtkWidget*) _tmp40_);
	_g_object_unref0 (_tmp40_);
	_tmp41_ = self->priv->_database;
	_tmp42_ = pamac_database_get_repos_names ((PamacDatabase*) _tmp41_);
	_tmp43_ = _g_ptr_array_ref0 (_tmp42_);
	_g_ptr_array_unref0 (pamac_repos_names);
	pamac_repos_names = _tmp43_;
	_tmp44_ = pamac_repos_names;
	{
		GPtrArray* name_collection = NULL;
		guint name_index = 0U;
		name_collection = _tmp44_;
		for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
			const gchar* name = NULL;
			name = (const gchar*) g_ptr_array_index (name_collection, name_index);
			{
				GtkListBox* _tmp45_;
				const gchar* _tmp46_;
				PamacSimpleRow* _tmp47_;
				PamacSimpleRow* _tmp48_;
				_tmp45_ = self->priv->repos_listbox;
				_tmp46_ = name;
				_tmp47_ = pamac_simple_row_new (_tmp46_);
				g_object_ref_sink (_tmp47_);
				_tmp48_ = _tmp47_;
				gtk_container_add ((GtkContainer*) _tmp45_, (GtkWidget*) _tmp48_);
				_g_object_unref0 (_tmp48_);
			}
		}
	}
	_tmp49_ = self->priv->repos_listbox;
	_tmp50_ = self->priv->repos_listbox;
	_tmp51_ = gtk_list_box_get_row_at_index (_tmp50_, 1);
	gtk_list_box_select_row (_tmp49_, _tmp51_);
	_tmp52_ = pamac_repos_names;
	_tmp53_ = g_strdup (g_dgettext (NULL, "Snap"));
	g_ptr_array_add (_tmp52_, _tmp53_);
	_tmp54_ = self->priv->_database;
	_tmp55_ = pamac_database_get_flatpak_remotes_names ((PamacDatabase*) _tmp54_);
	{
		GPtrArray* name_collection = NULL;
		guint name_index = 0U;
		name_collection = _tmp55_;
		for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
			const gchar* name = NULL;
			name = (const gchar*) g_ptr_array_index (name_collection, name_index);
			{
				GPtrArray* _tmp56_;
				const gchar* _tmp57_;
				gchar* _tmp58_;
				_tmp56_ = pamac_repos_names;
				_tmp57_ = name;
				_tmp58_ = g_strdup (_tmp57_);
				g_ptr_array_add (_tmp56_, _tmp58_);
			}
		}
		_g_ptr_array_unref0 (name_collection);
	}
	_tmp59_ = pamac_repos_names;
	_tmp60_ = g_strdup (g_dgettext (NULL, "AUR"));
	g_ptr_array_add (_tmp59_, _tmp60_);
	_tmp61_ = self->priv->groups_listbox;
	_tmp62_ = pamac_back_row_new ();
	g_object_ref_sink (_tmp62_);
	_tmp63_ = _tmp62_;
	gtk_container_add ((GtkContainer*) _tmp61_, (GtkWidget*) _tmp63_);
	_g_object_unref0 (_tmp63_);
	_tmp64_ = self->priv->_database;
	_tmp65_ = pamac_database_get_groups_names ((PamacDatabase*) _tmp64_);
	{
		GPtrArray* name_collection = NULL;
		guint name_index = 0U;
		name_collection = _tmp65_;
		for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
			const gchar* name = NULL;
			name = (const gchar*) g_ptr_array_index (name_collection, name_index);
			{
				GtkListBox* _tmp66_;
				const gchar* _tmp67_;
				PamacSimpleRow* _tmp68_;
				PamacSimpleRow* _tmp69_;
				_tmp66_ = self->priv->groups_listbox;
				_tmp67_ = name;
				_tmp68_ = pamac_simple_row_new (_tmp67_);
				g_object_ref_sink (_tmp68_);
				_tmp69_ = _tmp68_;
				gtk_container_add ((GtkContainer*) _tmp66_, (GtkWidget*) _tmp69_);
				_g_object_unref0 (_tmp69_);
			}
		}
	}
	_tmp70_ = self->priv->groups_listbox;
	_tmp71_ = self->priv->groups_listbox;
	_tmp72_ = gtk_list_box_get_row_at_index (_tmp71_, 1);
	gtk_list_box_select_row (_tmp70_, _tmp72_);
	_tmp73_ = pamac_simple_row_new (g_dgettext (NULL, "All"));
	g_object_ref_sink (_tmp73_);
	all_installed_row = _tmp73_;
	_tmp74_ = pamac_simple_row_new (g_dgettext (NULL, "Snap"));
	g_object_ref_sink (_tmp74_);
	_g_object_unref0 (self->priv->installed_snap_row);
	self->priv->installed_snap_row = _tmp74_;
	_tmp75_ = pamac_simple_row_new (g_dgettext (NULL, "Flatpak"));
	g_object_ref_sink (_tmp75_);
	_g_object_unref0 (self->priv->installed_flatpak_row);
	self->priv->installed_flatpak_row = _tmp75_;
	_tmp76_ = self->priv->installed_listbox;
	gtk_container_add ((GtkContainer*) _tmp76_, (GtkWidget*) all_installed_row);
	_tmp77_ = self->priv->installed_listbox;
	_tmp78_ = pamac_simple_row_new (g_dgettext (NULL, "Explicitly installed"));
	g_object_ref_sink (_tmp78_);
	_tmp79_ = _tmp78_;
	gtk_container_add ((GtkContainer*) _tmp77_, (GtkWidget*) _tmp79_);
	_g_object_unref0 (_tmp79_);
	_tmp80_ = self->priv->installed_listbox;
	_tmp81_ = pamac_simple_row_new (g_dgettext (NULL, "Orphans"));
	g_object_ref_sink (_tmp81_);
	_tmp82_ = _tmp81_;
	gtk_container_add ((GtkContainer*) _tmp80_, (GtkWidget*) _tmp82_);
	_g_object_unref0 (_tmp82_);
	_tmp83_ = self->priv->installed_listbox;
	_tmp84_ = pamac_simple_row_new (g_dgettext (NULL, "Foreign"));
	g_object_ref_sink (_tmp84_);
	_tmp85_ = _tmp84_;
	gtk_container_add ((GtkContainer*) _tmp83_, (GtkWidget*) _tmp85_);
	_g_object_unref0 (_tmp85_);
	_tmp86_ = self->priv->installed_listbox;
	_tmp87_ = self->priv->installed_snap_row;
	gtk_container_add ((GtkContainer*) _tmp86_, (GtkWidget*) _tmp87_);
	_tmp88_ = self->priv->installed_listbox;
	_tmp89_ = self->priv->installed_flatpak_row;
	gtk_container_add ((GtkContainer*) _tmp88_, (GtkWidget*) _tmp89_);
	_tmp90_ = self->priv->installed_listbox;
	gtk_list_box_select_row (_tmp90_, (GtkListBoxRow*) all_installed_row);
	_tmp91_ = pamac_simple_row_new (g_dgettext (NULL, "All"));
	g_object_ref_sink (_tmp91_);
	all_search_row = _tmp91_;
	_tmp92_ = pamac_simple_row_new (g_dgettext (NULL, "AUR"));
	g_object_ref_sink (_tmp92_);
	_g_object_unref0 (self->priv->search_aur_row);
	self->priv->search_aur_row = _tmp92_;
	_tmp93_ = pamac_simple_row_new (g_dgettext (NULL, "Snap"));
	g_object_ref_sink (_tmp93_);
	_g_object_unref0 (self->priv->search_snap_row);
	self->priv->search_snap_row = _tmp93_;
	_tmp94_ = pamac_simple_row_new (g_dgettext (NULL, "Flatpak"));
	g_object_ref_sink (_tmp94_);
	_g_object_unref0 (self->priv->search_flatpak_row);
	self->priv->search_flatpak_row = _tmp94_;
	_tmp95_ = self->priv->search_listbox;
	gtk_container_add ((GtkContainer*) _tmp95_, (GtkWidget*) all_search_row);
	_tmp96_ = self->priv->search_listbox;
	_tmp97_ = pamac_simple_row_new (g_dgettext (NULL, "Installed"));
	g_object_ref_sink (_tmp97_);
	_tmp98_ = _tmp97_;
	gtk_container_add ((GtkContainer*) _tmp96_, (GtkWidget*) _tmp98_);
	_g_object_unref0 (_tmp98_);
	_tmp99_ = self->priv->search_listbox;
	_tmp100_ = pamac_simple_row_new (g_dgettext (NULL, "Repositories"));
	g_object_ref_sink (_tmp100_);
	_tmp101_ = _tmp100_;
	gtk_container_add ((GtkContainer*) _tmp99_, (GtkWidget*) _tmp101_);
	_g_object_unref0 (_tmp101_);
	_tmp102_ = self->priv->search_listbox;
	_tmp103_ = self->priv->search_aur_row;
	gtk_container_add ((GtkContainer*) _tmp102_, (GtkWidget*) _tmp103_);
	_tmp104_ = self->priv->search_listbox;
	_tmp105_ = self->priv->search_snap_row;
	gtk_container_add ((GtkContainer*) _tmp104_, (GtkWidget*) _tmp105_);
	_tmp106_ = self->priv->search_listbox;
	_tmp107_ = self->priv->search_flatpak_row;
	gtk_container_add ((GtkContainer*) _tmp106_, (GtkWidget*) _tmp107_);
	_tmp108_ = self->priv->search_listbox;
	gtk_list_box_select_row (_tmp108_, (GtkListBoxRow*) all_search_row);
	_tmp109_ = pamac_simple_row_new (g_dgettext (NULL, "All"));
	g_object_ref_sink (_tmp109_);
	all_updates_row = _tmp109_;
	_tmp110_ = pamac_simple_row_new (g_dgettext (NULL, "Repositories"));
	g_object_ref_sink (_tmp110_);
	_g_object_unref0 (self->priv->updates_repos_row);
	self->priv->updates_repos_row = _tmp110_;
	_tmp111_ = pamac_simple_row_new (g_dgettext (NULL, "AUR"));
	g_object_ref_sink (_tmp111_);
	_g_object_unref0 (self->priv->updates_aur_row);
	self->priv->updates_aur_row = _tmp111_;
	_tmp112_ = pamac_simple_row_new (g_dgettext (NULL, "Flatpak"));
	g_object_ref_sink (_tmp112_);
	_g_object_unref0 (self->priv->updates_flatpak_row);
	self->priv->updates_flatpak_row = _tmp112_;
	_tmp113_ = pamac_simple_row_new (g_dgettext (NULL, "Ignored"));
	g_object_ref_sink (_tmp113_);
	_g_object_unref0 (self->priv->updates_ignored_row);
	self->priv->updates_ignored_row = _tmp113_;
	_tmp114_ = self->priv->updates_listbox;
	gtk_container_add ((GtkContainer*) _tmp114_, (GtkWidget*) all_updates_row);
	_tmp115_ = self->priv->updates_listbox;
	_tmp116_ = self->priv->updates_repos_row;
	gtk_container_add ((GtkContainer*) _tmp115_, (GtkWidget*) _tmp116_);
	_tmp117_ = self->priv->updates_listbox;
	_tmp118_ = self->priv->updates_aur_row;
	gtk_container_add ((GtkContainer*) _tmp117_, (GtkWidget*) _tmp118_);
	_tmp119_ = self->priv->updates_listbox;
	_tmp120_ = self->priv->updates_flatpak_row;
	gtk_container_add ((GtkContainer*) _tmp119_, (GtkWidget*) _tmp120_);
	_tmp121_ = self->priv->updates_listbox;
	_tmp122_ = self->priv->updates_ignored_row;
	gtk_container_add ((GtkContainer*) _tmp121_, (GtkWidget*) _tmp122_);
	_tmp123_ = self->priv->updates_listbox;
	gtk_list_box_select_row (_tmp123_, (GtkListBoxRow*) all_updates_row);
	_g_object_unref0 (all_updates_row);
	_g_object_unref0 (all_search_row);
	_g_object_unref0 (all_installed_row);
	_g_object_unref0 (separator);
}

static void
__lambda15_ (PamacManagerWindow* self,
             GtkWidget* child)
{
	GtkFlowBox* _tmp0_;
	g_return_if_fail (child != NULL);
	_tmp0_ = self->priv->packages_listbox;
	gtk_container_remove ((GtkContainer*) _tmp0_, child);
}

static void
___lambda15__gtk_callback (GtkWidget* widget,
                           gpointer self)
{
	__lambda15_ ((PamacManagerWindow*) self, widget);
}

static void
pamac_manager_window_clear_packages_listbox (PamacManagerWindow* self)
{
	GtkFlowBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->packages_listbox;
	gtk_container_foreach ((GtkContainer*) _tmp0_, ___lambda15__gtk_callback, self);
}

static void
pamac_manager_window_clear_lists (PamacManagerWindow* self)
{
	GHashTable* _tmp0_;
	GHashTable* _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	GHashTable* _tmp5_;
	GHashTable* _tmp6_;
	GHashTable* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pamac_to_install;
	g_hash_table_remove_all (_tmp0_);
	_tmp1_ = pamac_to_remove;
	g_hash_table_remove_all (_tmp1_);
	_tmp2_ = pamac_to_build;
	g_hash_table_remove_all (_tmp2_);
	_tmp3_ = pamac_to_load;
	g_hash_table_remove_all (_tmp3_);
	_tmp4_ = pamac_snap_to_install;
	g_hash_table_remove_all (_tmp4_);
	_tmp5_ = pamac_snap_to_remove;
	g_hash_table_remove_all (_tmp5_);
	_tmp6_ = pamac_flatpak_to_install;
	g_hash_table_remove_all (_tmp6_);
	_tmp7_ = pamac_flatpak_to_remove;
	g_hash_table_remove_all (_tmp7_);
}

static void
pamac_manager_window_clear_previous_lists (PamacManagerWindow* self)
{
	GHashTable* _tmp0_;
	GHashTable* _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	GHashTable* _tmp5_;
	GHashTable* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->previous_to_install;
	g_hash_table_remove_all (_tmp0_);
	_tmp1_ = self->priv->previous_to_remove;
	g_hash_table_remove_all (_tmp1_);
	_tmp2_ = self->priv->previous_to_build;
	g_hash_table_remove_all (_tmp2_);
	_tmp3_ = self->priv->previous_snap_to_install;
	g_hash_table_remove_all (_tmp3_);
	_tmp4_ = self->priv->previous_snap_to_remove;
	g_hash_table_remove_all (_tmp4_);
	_tmp5_ = self->priv->previous_flatpak_to_install;
	g_hash_table_remove_all (_tmp5_);
	_tmp6_ = self->priv->previous_flatpak_to_remove;
	g_hash_table_remove_all (_tmp6_);
}

static void
__lambda10_ (PamacManagerWindow* self)
{
	pamac_manager_window_refresh_details (self);
	pamac_manager_window_refresh_packages_list (self);
}

static void
___lambda10__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda10_ ((PamacManagerWindow*) self);
	g_object_unref (self);
}

static void
pamac_manager_window_on_mark_explicit_button_clicked (PamacManagerWindow* self,
                                                      GtkButton* button)
{
	PamacTransactionGtk* _tmp0_;
	PamacPackage* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = self->transaction;
	_tmp1_ = self->priv->current_package_displayed;
	_tmp2_ = pamac_package_get_name (_tmp1_);
	_tmp3_ = _tmp2_;
	pamac_transaction_set_pkgreason_async ((PamacTransaction*) _tmp0_, _tmp3_, (guint) 0, ___lambda10__gasync_ready_callback, g_object_ref (self));
}

static void
_pamac_manager_window_on_mark_explicit_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self)
{
	pamac_manager_window_on_mark_explicit_button_clicked ((PamacManagerWindow*) self, _sender);
}

static GtkWidget*
pamac_manager_window_populate_details_grid (PamacManagerWindow* self,
                                            const gchar* detail_type,
                                            const gchar* detail,
                                            GtkWidget* previous_widget)
{
	GtkLabel* label = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkLabel* _tmp7_;
	GtkGrid* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp44_;
	GtkWidget* _tmp45_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (detail_type != NULL, NULL);
	_tmp0_ = g_strdup_printf ("<b>%s:</b>", detail_type);
	_tmp1_ = _tmp0_;
	_tmp2_ = (GtkLabel*) gtk_label_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	label = _tmp3_;
	_tmp4_ = label;
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, TRUE);
	_tmp5_ = label;
	gtk_label_set_use_markup (_tmp5_, TRUE);
	_tmp6_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	_tmp7_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_START);
	_tmp8_ = self->priv->details_grid;
	_tmp9_ = label;
	gtk_grid_attach_next_to (_tmp8_, (GtkWidget*) _tmp9_, previous_widget, GTK_POS_BOTTOM, 1, 1);
	if (detail == NULL) {
		GtkLabel* label2 = NULL;
		GtkLabel* _tmp10_;
		GtkLabel* _tmp11_;
		GtkLabel* _tmp12_;
		GtkLabel* _tmp13_;
		GtkGrid* _tmp14_;
		GtkLabel* _tmp15_;
		GtkLabel* _tmp16_;
		_tmp10_ = (GtkLabel*) gtk_label_new (g_dgettext (NULL, "None"));
		g_object_ref_sink (_tmp10_);
		label2 = _tmp10_;
		_tmp11_ = label2;
		gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE);
		_tmp12_ = label2;
		gtk_label_set_use_markup (_tmp12_, TRUE);
		_tmp13_ = label2;
		gtk_widget_set_halign ((GtkWidget*) _tmp13_, GTK_ALIGN_START);
		_tmp14_ = self->priv->details_grid;
		_tmp15_ = label2;
		_tmp16_ = label;
		gtk_grid_attach_next_to (_tmp14_, (GtkWidget*) _tmp15_, (GtkWidget*) _tmp16_, GTK_POS_RIGHT, 1, 1);
		_g_object_unref0 (label2);
	} else {
		gboolean _tmp17_ = FALSE;
		gboolean _tmp18_ = FALSE;
		if (!self->transaction_running) {
			_tmp18_ = g_strcmp0 (detail_type, g_dgettext (NULL, "Install Reason")) == 0;
		} else {
			_tmp18_ = FALSE;
		}
		if (_tmp18_) {
			_tmp17_ = g_strcmp0 (detail, g_dgettext (NULL, "Installed as a dependency for another package")) == 0;
		} else {
			_tmp17_ = FALSE;
		}
		if (_tmp17_) {
			GtkBox* box = NULL;
			GtkBox* _tmp19_;
			GtkBox* _tmp20_;
			GtkBox* _tmp21_;
			GtkLabel* label2 = NULL;
			GtkLabel* _tmp22_;
			GtkLabel* _tmp23_;
			GtkLabel* _tmp24_;
			GtkBox* _tmp25_;
			GtkLabel* _tmp26_;
			GtkButton* mark_explicit_button = NULL;
			GtkButton* _tmp27_;
			GtkButton* _tmp28_;
			GtkButton* _tmp29_;
			GtkButton* _tmp30_;
			GtkButton* _tmp31_;
			GtkBox* _tmp32_;
			GtkButton* _tmp33_;
			GtkGrid* _tmp34_;
			GtkBox* _tmp35_;
			GtkLabel* _tmp36_;
			_tmp19_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
			g_object_ref_sink (_tmp19_);
			box = _tmp19_;
			_tmp20_ = box;
			gtk_widget_set_visible ((GtkWidget*) _tmp20_, TRUE);
			_tmp21_ = box;
			gtk_box_set_homogeneous (_tmp21_, FALSE);
			_tmp22_ = (GtkLabel*) gtk_label_new (detail);
			g_object_ref_sink (_tmp22_);
			label2 = _tmp22_;
			_tmp23_ = label2;
			gtk_widget_set_visible ((GtkWidget*) _tmp23_, TRUE);
			_tmp24_ = label2;
			gtk_widget_set_halign ((GtkWidget*) _tmp24_, GTK_ALIGN_START);
			_tmp25_ = box;
			_tmp26_ = label2;
			gtk_container_add ((GtkContainer*) _tmp25_, (GtkWidget*) _tmp26_);
			_tmp27_ = (GtkButton*) gtk_button_new_with_label (g_dgettext (NULL, "Mark as explicitly installed"));
			g_object_ref_sink (_tmp27_);
			mark_explicit_button = _tmp27_;
			_tmp28_ = mark_explicit_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp28_, TRUE);
			_tmp29_ = mark_explicit_button;
			gtk_widget_set_halign ((GtkWidget*) _tmp29_, GTK_ALIGN_START);
			_tmp30_ = mark_explicit_button;
			gtk_widget_set_margin_bottom ((GtkWidget*) _tmp30_, 6);
			_tmp31_ = mark_explicit_button;
			g_signal_connect_object (_tmp31_, "clicked", (GCallback) _pamac_manager_window_on_mark_explicit_button_clicked_gtk_button_clicked, self, 0);
			_tmp32_ = box;
			_tmp33_ = mark_explicit_button;
			gtk_container_add ((GtkContainer*) _tmp32_, (GtkWidget*) _tmp33_);
			_tmp34_ = self->priv->details_grid;
			_tmp35_ = box;
			_tmp36_ = label;
			gtk_grid_attach_next_to (_tmp34_, (GtkWidget*) _tmp35_, (GtkWidget*) _tmp36_, GTK_POS_RIGHT, 1, 1);
			_g_object_unref0 (mark_explicit_button);
			_g_object_unref0 (label2);
			_g_object_unref0 (box);
		} else {
			GtkLabel* label2 = NULL;
			GtkLabel* _tmp37_;
			GtkLabel* _tmp38_;
			GtkLabel* _tmp39_;
			GtkLabel* _tmp40_;
			GtkGrid* _tmp41_;
			GtkLabel* _tmp42_;
			GtkLabel* _tmp43_;
			_tmp37_ = (GtkLabel*) gtk_label_new (detail);
			g_object_ref_sink (_tmp37_);
			label2 = _tmp37_;
			_tmp38_ = label2;
			gtk_widget_set_visible ((GtkWidget*) _tmp38_, TRUE);
			_tmp39_ = label2;
			gtk_label_set_use_markup (_tmp39_, TRUE);
			_tmp40_ = label2;
			gtk_widget_set_halign ((GtkWidget*) _tmp40_, GTK_ALIGN_START);
			_tmp41_ = self->priv->details_grid;
			_tmp42_ = label2;
			_tmp43_ = label;
			gtk_grid_attach_next_to (_tmp41_, (GtkWidget*) _tmp42_, (GtkWidget*) _tmp43_, GTK_POS_RIGHT, 1, 1);
			_g_object_unref0 (label2);
		}
	}
	_tmp44_ = label;
	_tmp45_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp44_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp44_) : NULL);
	result = _tmp45_;
	_g_object_unref0 (label);
	return result;
}

static gchar*
pamac_manager_window_find_install_button_dep_name (PamacManagerWindow* self,
                                                   GtkButton* button,
                                                   GtkImage** select_image)
{
	GtkImage* _vala_select_image = NULL;
	gchar* dep_name = NULL;
	gchar* _tmp0_;
	GList* list = NULL;
	GtkContainer* _tmp1_;
	GList* _tmp2_;
	GList* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (button != NULL, NULL);
	_tmp0_ = g_strdup ("");
	dep_name = _tmp0_;
	_g_object_unref0 (_vala_select_image);
	_vala_select_image = NULL;
	_tmp1_ = gtk_widget_get_parent ((GtkWidget*) button);
	_tmp2_ = gtk_container_get_children (_tmp1_);
	list = _tmp2_;
	_tmp3_ = list;
	{
		GList* widget_collection = NULL;
		GList* widget_it = NULL;
		widget_collection = _tmp3_;
		for (widget_it = widget_collection; widget_it != NULL; widget_it = widget_it->next) {
			GtkWidget* widget = NULL;
			widget = (GtkWidget*) widget_it->data;
			{
				GtkWidget* _tmp4_;
				const gchar* _tmp5_;
				const gchar* _tmp6_;
				GtkWidget* _tmp22_;
				const gchar* _tmp23_;
				const gchar* _tmp24_;
				_tmp4_ = widget;
				_tmp5_ = gtk_widget_get_name (_tmp4_);
				_tmp6_ = _tmp5_;
				if (g_strcmp0 (_tmp6_, "GtkLabel") == 0) {
					GtkLabel* dep_label = NULL;
					GtkWidget* _tmp7_;
					PamacDatabaseGtk* _tmp8_;
					GtkLabel* _tmp9_;
					const gchar* _tmp10_;
					const gchar* _tmp11_;
					_tmp7_ = widget;
					dep_label = G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp7_) : NULL;
					_tmp8_ = self->priv->_database;
					_tmp9_ = dep_label;
					_tmp10_ = gtk_label_get_label (_tmp9_);
					_tmp11_ = _tmp10_;
					if (pamac_database_has_sync_satisfier ((PamacDatabase*) _tmp8_, _tmp11_)) {
						PamacAlpmPackage* pkg = NULL;
						PamacDatabaseGtk* _tmp12_;
						GtkLabel* _tmp13_;
						const gchar* _tmp14_;
						const gchar* _tmp15_;
						PamacAlpmPackage* _tmp16_;
						PamacAlpmPackage* _tmp17_;
						PamacAlpmPackage* _tmp18_;
						const gchar* _tmp19_;
						const gchar* _tmp20_;
						gchar* _tmp21_;
						_tmp12_ = self->priv->_database;
						_tmp13_ = dep_label;
						_tmp14_ = gtk_label_get_label (_tmp13_);
						_tmp15_ = _tmp14_;
						_tmp16_ = pamac_database_get_sync_satisfier ((PamacDatabase*) _tmp12_, _tmp15_);
						_tmp17_ = _g_object_ref0 (_tmp16_);
						pkg = _tmp17_;
						_tmp18_ = pkg;
						_tmp19_ = pamac_package_get_name ((PamacPackage*) _tmp18_);
						_tmp20_ = _tmp19_;
						_tmp21_ = g_strdup (_tmp20_);
						_g_free0 (dep_name);
						dep_name = _tmp21_;
						_g_object_unref0 (pkg);
					}
				}
				_tmp22_ = widget;
				_tmp23_ = gtk_widget_get_name (_tmp22_);
				_tmp24_ = _tmp23_;
				if (g_strcmp0 (_tmp24_, "GtkImage") == 0) {
					GtkImage* image = NULL;
					GtkWidget* _tmp25_;
					GtkImage* _tmp26_;
					GtkImage* _tmp27_;
					_tmp25_ = widget;
					image = G_TYPE_CHECK_INSTANCE_TYPE (_tmp25_, gtk_image_get_type ()) ? ((GtkImage*) _tmp25_) : NULL;
					_tmp26_ = image;
					_tmp27_ = _g_object_ref0 (_tmp26_);
					_g_object_unref0 (_vala_select_image);
					_vala_select_image = _tmp27_;
				}
			}
		}
	}
	result = dep_name;
	(list == NULL) ? NULL : (list = (g_list_free (list), NULL));
	if (select_image) {
		*select_image = _vala_select_image;
	} else {
		_g_object_unref0 (_vala_select_image);
	}
	return result;
}

static void
pamac_manager_window_on_install_dep_button_toggled (PamacManagerWindow* self,
                                                    GtkToggleButton* button)
{
	GtkImage* select_image = NULL;
	gchar* dep_name = NULL;
	GtkImage* _tmp0_ = NULL;
	gchar* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp1_ = pamac_manager_window_find_install_button_dep_name (self, (GtkButton*) button, &_tmp0_);
	_g_object_unref0 (select_image);
	select_image = _tmp0_;
	dep_name = _tmp1_;
	_tmp2_ = gtk_toggle_button_get_active (button);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		GHashTable* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		GtkImage* _tmp7_;
		_tmp4_ = pamac_to_install;
		_tmp5_ = dep_name;
		_tmp6_ = g_strdup (_tmp5_);
		g_hash_table_add (_tmp4_, _tmp6_);
		_tmp7_ = select_image;
		gtk_widget_set_visible ((GtkWidget*) _tmp7_, TRUE);
		gtk_widget_set_margin_start ((GtkWidget*) button, 0);
	} else {
		GHashTable* _tmp8_;
		const gchar* _tmp9_;
		GtkImage* _tmp10_;
		_tmp8_ = pamac_to_install;
		_tmp9_ = dep_name;
		g_hash_table_remove (_tmp8_, _tmp9_);
		_tmp10_ = select_image;
		gtk_widget_set_visible ((GtkWidget*) _tmp10_, FALSE);
		gtk_widget_set_margin_start ((GtkWidget*) button, 19);
	}
	pamac_manager_window_set_pending_operations (self);
	_g_free0 (dep_name);
	_g_object_unref0 (select_image);
}

static void
pamac_manager_window_on_next_screenshot_button_clicked (PamacManagerWindow* self)
{
	GtkImage* image = NULL;
	GPtrArray* _tmp0_;
	gconstpointer _tmp1_;
	HdyCarousel* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_screenshots;
	_tmp1_ = g_ptr_array_index (_tmp0_, self->priv->current_screenshots_index + 1);
	image = (GtkImage*) _tmp1_;
	_tmp2_ = self->priv->screenshots_carousel;
	hdy_carousel_scroll_to (_tmp2_, (GtkWidget*) image);
}

static void
_pamac_manager_window_on_next_screenshot_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self)
{
	pamac_manager_window_on_next_screenshot_button_clicked ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_previous_screenshot_button_clicked (PamacManagerWindow* self)
{
	GtkImage* image = NULL;
	GPtrArray* _tmp0_;
	gconstpointer _tmp1_;
	HdyCarousel* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_screenshots;
	_tmp1_ = g_ptr_array_index (_tmp0_, self->priv->current_screenshots_index - 1);
	image = (GtkImage*) _tmp1_;
	_tmp2_ = self->priv->screenshots_carousel;
	hdy_carousel_scroll_to (_tmp2_, (GtkWidget*) image);
}

static void
_pamac_manager_window_on_previous_screenshot_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                gpointer self)
{
	pamac_manager_window_on_previous_screenshot_button_clicked ((PamacManagerWindow*) self);
}

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_manager_window_on_screenshots_carousel_page_changed (PamacManagerWindow* self,
                                                           guint index)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GPtrArray* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_if_fail (self != NULL);
	self->priv->current_screenshots_index = index;
	_tmp0_ = self->priv->previous_screenshot_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, self->priv->current_screenshots_index > ((guint) 0));
	_tmp1_ = self->priv->next_screenshot_button;
	_tmp2_ = self->priv->current_screenshots;
	_tmp3_ = vala_g_ptr_array_get_length (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, self->priv->current_screenshots_index < ((guint) (_tmp4_ - 1)));
}

static void
_pamac_manager_window_on_screenshots_carousel_page_changed_hdy_carousel_page_changed (HdyCarousel* _sender,
                                                                                      guint index,
                                                                                      gpointer self)
{
	pamac_manager_window_on_screenshots_carousel_page_changed ((PamacManagerWindow*) self, index);
}

static gboolean
pamac_manager_window_remove_screenshots_overlay_timeout (PamacManagerWindow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (self->priv->screenshots_overlay_timeout_id != ((guint) 0)) {
		g_source_remove (self->priv->screenshots_overlay_timeout_id);
		self->priv->screenshots_overlay_timeout_id = (guint) 0;
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}

static void
pamac_manager_window_on_screenshots_carousel_enter (PamacManagerWindow* self)
{
	g_return_if_fail (self != NULL);
	if (!pamac_manager_window_remove_screenshots_overlay_timeout (self)) {
		GtkButton* _tmp0_;
		GtkButton* _tmp1_;
		GPtrArray* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp0_ = self->priv->previous_screenshot_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp0_, self->priv->current_screenshots_index > ((guint) 0));
		_tmp1_ = self->priv->next_screenshot_button;
		_tmp2_ = self->priv->current_screenshots;
		_tmp3_ = vala_g_ptr_array_get_length (_tmp2_);
		_tmp4_ = _tmp3_;
		gtk_widget_set_visible ((GtkWidget*) _tmp1_, self->priv->current_screenshots_index < ((guint) (_tmp4_ - 1)));
	}
}

static gboolean
_pamac_manager_window_screenshots_overlay_timeout_callback_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_manager_window_screenshots_overlay_timeout_callback ((PamacManagerWindow*) self);
	return result;
}

static void
pamac_manager_window_on_screenshots_carousel_leave (PamacManagerWindow* self)
{
	g_return_if_fail (self != NULL);
	self->priv->screenshots_overlay_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 1000, _pamac_manager_window_screenshots_overlay_timeout_callback_gsource_func, g_object_ref (self), g_object_unref);
}

static gboolean
pamac_manager_window_screenshots_overlay_timeout_callback (PamacManagerWindow* self)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->previous_screenshot_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = self->priv->next_screenshot_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
	self->priv->screenshots_overlay_timeout_id = (guint) 0;
	result = FALSE;
	return result;
}

static void
_pamac_manager_window_on_install_dep_button_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                               gpointer self)
{
	pamac_manager_window_on_install_dep_button_toggled ((PamacManagerWindow*) self, _sender);
}

static void
_pamac_manager_window_on_deps_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                GtkListBoxRow* row,
                                                                                gpointer self)
{
	pamac_manager_window_on_deps_listbox_row_activated ((PamacManagerWindow*) self, row);
}

static void
pamac_manager_window_populate_deps_box (PamacManagerWindow* self,
                                        const gchar* dep_type,
                                        GPtrArray* dep_list,
                                        gboolean add_install_button)
{
	GtkLabel* label = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkLabel* _tmp7_;
	GtkBox* _tmp8_;
	GtkLabel* _tmp9_;
	GtkListBox* listbox = NULL;
	GtkListBox* _tmp10_;
	GtkListBox* _tmp11_;
	GtkListBox* _tmp12_;
	GtkStyleContext* _tmp13_;
	GtkListBox* _tmp63_;
	GtkBox* _tmp64_;
	GtkListBox* _tmp65_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dep_type != NULL);
	g_return_if_fail (dep_list != NULL);
	_tmp0_ = g_strdup_printf ("<b>%s:</b>", dep_type);
	_tmp1_ = _tmp0_;
	_tmp2_ = (GtkLabel*) gtk_label_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	label = _tmp3_;
	_tmp4_ = label;
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, TRUE);
	_tmp5_ = label;
	gtk_label_set_use_markup (_tmp5_, TRUE);
	_tmp6_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	_tmp7_ = label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp7_, 12);
	_tmp8_ = self->priv->deps_box;
	_tmp9_ = label;
	gtk_container_add ((GtkContainer*) _tmp8_, (GtkWidget*) _tmp9_);
	_tmp10_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp10_);
	listbox = _tmp10_;
	_tmp11_ = listbox;
	gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE);
	_tmp12_ = listbox;
	_tmp13_ = gtk_widget_get_style_context ((GtkWidget*) _tmp12_);
	gtk_style_context_add_class (_tmp13_, "content");
	{
		GPtrArray* dep_collection = NULL;
		guint dep_index = 0U;
		dep_collection = dep_list;
		for (dep_index = 0; dep_index < dep_collection->len; dep_index = dep_index + 1) {
			const gchar* dep = NULL;
			dep = (const gchar*) g_ptr_array_index (dep_collection, dep_index);
			{
				if (add_install_button) {
					GtkBox* box = NULL;
					GtkBox* _tmp14_;
					GtkBox* _tmp15_;
					GtkLabel* dep_label = NULL;
					const gchar* _tmp16_;
					GtkLabel* _tmp17_;
					GtkLabel* _tmp18_;
					GtkLabel* _tmp19_;
					GtkLabel* _tmp20_;
					GtkLabel* _tmp21_;
					GtkLabel* _tmp22_;
					GtkLabel* _tmp23_;
					GtkLabel* _tmp24_;
					GtkBox* _tmp25_;
					GtkLabel* _tmp26_;
					PamacDatabaseGtk* _tmp27_;
					const gchar* _tmp28_;
					GtkListBox* _tmp51_;
					GtkBox* _tmp52_;
					_tmp14_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
					g_object_ref_sink (_tmp14_);
					box = _tmp14_;
					_tmp15_ = box;
					gtk_widget_set_visible ((GtkWidget*) _tmp15_, TRUE);
					_tmp16_ = dep;
					_tmp17_ = (GtkLabel*) gtk_label_new (_tmp16_);
					g_object_ref_sink (_tmp17_);
					dep_label = _tmp17_;
					_tmp18_ = dep_label;
					gtk_widget_set_visible ((GtkWidget*) _tmp18_, TRUE);
					_tmp19_ = dep_label;
					gtk_widget_set_margin_top ((GtkWidget*) _tmp19_, 12);
					_tmp20_ = dep_label;
					gtk_widget_set_margin_bottom ((GtkWidget*) _tmp20_, 12);
					_tmp21_ = dep_label;
					gtk_widget_set_margin_start ((GtkWidget*) _tmp21_, 12);
					_tmp22_ = dep_label;
					gtk_widget_set_margin_end ((GtkWidget*) _tmp22_, 12);
					_tmp23_ = dep_label;
					gtk_widget_set_halign ((GtkWidget*) _tmp23_, GTK_ALIGN_START);
					_tmp24_ = dep_label;
					gtk_widget_set_hexpand ((GtkWidget*) _tmp24_, TRUE);
					_tmp25_ = box;
					_tmp26_ = dep_label;
					gtk_container_add ((GtkContainer*) _tmp25_, (GtkWidget*) _tmp26_);
					_tmp27_ = self->priv->_database;
					_tmp28_ = dep;
					if (!pamac_database_has_installed_satisfier ((PamacDatabase*) _tmp27_, _tmp28_)) {
						GtkImage* select_image = NULL;
						GtkImage* _tmp29_;
						GtkImage* _tmp30_;
						GtkImage* _tmp31_;
						GtkImage* _tmp32_;
						GtkBox* _tmp33_;
						GtkImage* _tmp34_;
						GtkToggleButton* install_dep_button = NULL;
						GtkToggleButton* _tmp35_;
						GtkToggleButton* _tmp36_;
						GtkToggleButton* _tmp37_;
						GtkImage* _tmp38_;
						GtkImage* _tmp39_;
						GtkToggleButton* _tmp40_;
						GtkToggleButton* _tmp41_;
						GtkToggleButton* _tmp42_;
						GtkToggleButton* _tmp43_;
						GtkBox* _tmp44_;
						GtkToggleButton* _tmp45_;
						gchar* dep_name = NULL;
						GtkToggleButton* _tmp46_;
						gchar* _tmp47_;
						GtkToggleButton* _tmp48_;
						GHashTable* _tmp49_;
						const gchar* _tmp50_;
						_tmp29_ = (GtkImage*) gtk_image_new_from_icon_name ("object-select-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
						g_object_ref_sink (_tmp29_);
						select_image = _tmp29_;
						_tmp30_ = select_image;
						gtk_widget_set_visible ((GtkWidget*) _tmp30_, TRUE);
						_tmp31_ = select_image;
						gtk_image_set_pixel_size (_tmp31_, 16);
						_tmp32_ = select_image;
						gtk_widget_set_visible ((GtkWidget*) _tmp32_, FALSE);
						_tmp33_ = box;
						_tmp34_ = select_image;
						gtk_container_add ((GtkContainer*) _tmp33_, (GtkWidget*) _tmp34_);
						_tmp35_ = (GtkToggleButton*) gtk_toggle_button_new ();
						g_object_ref_sink (_tmp35_);
						install_dep_button = _tmp35_;
						_tmp36_ = install_dep_button;
						gtk_widget_set_visible ((GtkWidget*) _tmp36_, TRUE);
						_tmp37_ = install_dep_button;
						_tmp38_ = (GtkImage*) gtk_image_new_from_icon_name ("software-install-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
						g_object_ref_sink (_tmp38_);
						_tmp39_ = _tmp38_;
						gtk_button_set_image ((GtkButton*) _tmp37_, (GtkWidget*) _tmp39_);
						_g_object_unref0 (_tmp39_);
						_tmp40_ = install_dep_button;
						gtk_widget_set_margin_start ((GtkWidget*) _tmp40_, 19);
						_tmp41_ = install_dep_button;
						gtk_widget_set_margin_end ((GtkWidget*) _tmp41_, 12);
						_tmp42_ = install_dep_button;
						gtk_widget_set_valign ((GtkWidget*) _tmp42_, GTK_ALIGN_CENTER);
						_tmp43_ = install_dep_button;
						g_signal_connect_object (_tmp43_, "toggled", (GCallback) _pamac_manager_window_on_install_dep_button_toggled_gtk_toggle_button_toggled, self, 0);
						_tmp44_ = box;
						_tmp45_ = install_dep_button;
						gtk_container_add ((GtkContainer*) _tmp44_, (GtkWidget*) _tmp45_);
						_tmp46_ = install_dep_button;
						_tmp47_ = pamac_manager_window_find_install_button_dep_name (self, (GtkButton*) _tmp46_, NULL);
						dep_name = _tmp47_;
						_tmp48_ = install_dep_button;
						_tmp49_ = pamac_to_install;
						_tmp50_ = dep_name;
						gtk_toggle_button_set_active (_tmp48_, g_hash_table_contains (_tmp49_, _tmp50_));
						_g_free0 (dep_name);
						_g_object_unref0 (install_dep_button);
						_g_object_unref0 (select_image);
					}
					_tmp51_ = listbox;
					_tmp52_ = box;
					gtk_container_add ((GtkContainer*) _tmp51_, (GtkWidget*) _tmp52_);
					_g_object_unref0 (dep_label);
					_g_object_unref0 (box);
				} else {
					GtkLabel* dep_label = NULL;
					const gchar* _tmp53_;
					GtkLabel* _tmp54_;
					GtkLabel* _tmp55_;
					GtkLabel* _tmp56_;
					GtkLabel* _tmp57_;
					GtkLabel* _tmp58_;
					GtkLabel* _tmp59_;
					GtkLabel* _tmp60_;
					GtkListBox* _tmp61_;
					GtkLabel* _tmp62_;
					_tmp53_ = dep;
					_tmp54_ = (GtkLabel*) gtk_label_new (_tmp53_);
					g_object_ref_sink (_tmp54_);
					dep_label = _tmp54_;
					_tmp55_ = dep_label;
					gtk_widget_set_visible ((GtkWidget*) _tmp55_, TRUE);
					_tmp56_ = dep_label;
					gtk_widget_set_margin_top ((GtkWidget*) _tmp56_, 12);
					_tmp57_ = dep_label;
					gtk_widget_set_margin_bottom ((GtkWidget*) _tmp57_, 12);
					_tmp58_ = dep_label;
					gtk_widget_set_margin_start ((GtkWidget*) _tmp58_, 12);
					_tmp59_ = dep_label;
					gtk_widget_set_margin_end ((GtkWidget*) _tmp59_, 12);
					_tmp60_ = dep_label;
					gtk_widget_set_halign ((GtkWidget*) _tmp60_, GTK_ALIGN_START);
					_tmp61_ = listbox;
					_tmp62_ = dep_label;
					gtk_container_add ((GtkContainer*) _tmp61_, (GtkWidget*) _tmp62_);
					_g_object_unref0 (dep_label);
				}
			}
		}
	}
	_tmp63_ = listbox;
	g_signal_connect_object (_tmp63_, "row-activated", (GCallback) _pamac_manager_window_on_deps_listbox_row_activated_gtk_list_box_row_activated, self, 0);
	_tmp64_ = self->priv->deps_box;
	_tmp65_ = listbox;
	gtk_container_add ((GtkContainer*) _tmp64_, (GtkWidget*) _tmp65_);
	_g_object_unref0 (listbox);
	_g_object_unref0 (label);
}

static void
pamac_manager_window_get_screenshots_images_data_free (gpointer _data)
{
	PamacManagerWindowGetScreenshotsImagesData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->urls);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacManagerWindowGetScreenshotsImagesData, _data_);
}

static void
pamac_manager_window_get_screenshots_images (PamacManagerWindow* self,
                                             GPtrArray* urls,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	PamacManagerWindowGetScreenshotsImagesData* _data_;
	PamacManagerWindow* _tmp0_;
	GPtrArray* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (urls != NULL);
	_data_ = g_slice_new0 (PamacManagerWindowGetScreenshotsImagesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_manager_window_get_screenshots_images_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_ptr_array_ref0 (urls);
	_g_ptr_array_unref0 (_data_->urls);
	_data_->urls = _tmp1_;
	pamac_manager_window_get_screenshots_images_co (_data_);
}

static void
pamac_manager_window_get_screenshots_images_finish (PamacManagerWindow* self,
                                                    GAsyncResult* _res_)
{
	PamacManagerWindowGetScreenshotsImagesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
pamac_manager_window_get_screenshots_images_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_)
{
	PamacManagerWindowGetScreenshotsImagesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_manager_window_get_screenshots_images_co (_data_);
}

static gboolean
pamac_manager_window_get_screenshots_images_co (PamacManagerWindowGetScreenshotsImagesData* _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_->url_collection = _data_->urls;
		for (_data_->url_index = 0; _data_->url_index < _data_->url_collection->len; _data_->url_index = _data_->url_index + 1) {
			_data_->url = (const gchar*) g_ptr_array_index (_data_->url_collection, _data_->url_index);
			{
				_data_->image = NULL;
				_data_->_tmp0_ = _data_->url;
				_data_->_tmp1_ = g_file_new_for_uri (_data_->_tmp0_);
				_data_->uri = _data_->_tmp1_;
				_data_->_tmp2_ = _data_->uri;
				_data_->_tmp3_ = g_file_get_basename (_data_->_tmp2_);
				_data_->_tmp4_ = _data_->_tmp3_;
				_data_->_tmp5_ = g_strdup_printf ("/tmp/pamac-app-screenshots/%s", _data_->_tmp4_);
				_data_->_tmp6_ = _data_->_tmp5_;
				_data_->_tmp7_ = g_file_new_for_path (_data_->_tmp6_);
				_data_->_tmp8_ = _data_->_tmp7_;
				_g_free0 (_data_->_tmp6_);
				_g_free0 (_data_->_tmp4_);
				_data_->cached_screenshot = _data_->_tmp8_;
				_data_->_tmp9_ = _data_->cached_screenshot;
				if (g_file_query_exists (_data_->_tmp9_, NULL)) {
					_data_->_tmp10_ = _data_->cached_screenshot;
					_data_->_tmp11_ = g_file_get_path (_data_->_tmp10_);
					_data_->_tmp12_ = _data_->_tmp11_;
					_data_->_tmp13_ = (GtkImage*) gtk_image_new_from_file (_data_->_tmp12_);
					g_object_ref_sink (_data_->_tmp13_);
					_g_object_unref0 (_data_->image);
					_data_->image = _data_->_tmp13_;
					_g_free0 (_data_->_tmp12_);
					_data_->_tmp14_ = _data_->image;
					gtk_widget_set_visible ((GtkWidget*) _data_->_tmp14_, TRUE);
				} else {
					{
						_data_->_tmp15_ = _data_->self->priv->_database;
						_data_->_tmp16_ = _data_->url;
						_data_->_state_ = 1;
						pamac_database_get_url_stream ((PamacDatabase*) _data_->_tmp15_, _data_->_tmp16_, pamac_manager_window_get_screenshots_images_ready, _data_);
						return FALSE;
						_state_1:
						_data_->_tmp17_ = pamac_database_get_url_stream_finish ((PamacDatabase*) _data_->_tmp15_, _data_->_res_, &_data_->_inner_error0_);
						_data_->inputstream = _data_->_tmp17_;
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							goto __catch0_g_error;
						}
						_data_->_tmp18_ = _data_->inputstream;
						_data_->_state_ = 2;
						gdk_pixbuf_new_from_stream_at_scale_async (_data_->_tmp18_, -1, 300, TRUE, NULL, pamac_manager_window_get_screenshots_images_ready, _data_);
						return FALSE;
						_state_2:
						_data_->_tmp19_ = (GdkPixbuf*) gdk_pixbuf_new_from_stream_finish (_data_->_res_, &_data_->_inner_error0_);
						_data_->pixbuf = _data_->_tmp19_;
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							_g_object_unref0 (_data_->inputstream);
							goto __catch0_g_error;
						}
						_data_->_tmp20_ = _data_->cached_screenshot;
						_data_->_tmp21_ = g_file_append_to (_data_->_tmp20_, G_FILE_CREATE_NONE, NULL, &_data_->_inner_error0_);
						_data_->os = _data_->_tmp21_;
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							_g_object_unref0 (_data_->pixbuf);
							_g_object_unref0 (_data_->inputstream);
							goto __catch0_g_error;
						}
						_data_->_tmp22_ = _data_->pixbuf;
						_data_->_tmp23_ = _data_->os;
						gdk_pixbuf_save_to_stream (_data_->_tmp22_, (GOutputStream*) _data_->_tmp23_, "png", NULL, &_data_->_inner_error0_, NULL);
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							_g_object_unref0 (_data_->os);
							_g_object_unref0 (_data_->pixbuf);
							_g_object_unref0 (_data_->inputstream);
							goto __catch0_g_error;
						}
						_data_->_tmp24_ = _data_->pixbuf;
						_data_->_tmp25_ = (GtkImage*) gtk_image_new_from_pixbuf (_data_->_tmp24_);
						g_object_ref_sink (_data_->_tmp25_);
						_g_object_unref0 (_data_->image);
						_data_->image = _data_->_tmp25_;
						_data_->_tmp26_ = _data_->image;
						gtk_widget_set_visible ((GtkWidget*) _data_->_tmp26_, TRUE);
						_g_object_unref0 (_data_->os);
						_g_object_unref0 (_data_->pixbuf);
						_g_object_unref0 (_data_->inputstream);
					}
					goto __finally0;
					__catch0_g_error:
					{
						_data_->e = _data_->_inner_error0_;
						_data_->_inner_error0_ = NULL;
						_data_->_tmp27_ = _data_->url;
						_data_->_tmp28_ = _data_->e;
						_data_->_tmp29_ = _data_->_tmp28_->message;
						g_warning ("manager_window.vala:1397: %s: %s", _data_->_tmp27_, _data_->_tmp29_);
						_g_error_free0 (_data_->e);
					}
					__finally0:
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						_g_object_unref0 (_data_->cached_screenshot);
						_g_object_unref0 (_data_->uri);
						_g_object_unref0 (_data_->image);
						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_->_tmp30_ = _data_->image;
				if (_data_->_tmp30_ != NULL) {
					_data_->_tmp31_ = _data_->self->priv->current_screenshots;
					_data_->_tmp32_ = _data_->image;
					_data_->_tmp33_ = _g_object_ref0 (_data_->_tmp32_);
					g_ptr_array_add (_data_->_tmp31_, _data_->_tmp33_);
					_data_->_tmp34_ = _data_->self->priv->screenshots_carousel;
					_data_->_tmp35_ = _data_->image;
					gtk_container_add ((GtkContainer*) _data_->_tmp34_, (GtkWidget*) _data_->_tmp35_);
					_data_->_tmp36_ = _data_->self->priv->current_screenshots;
					_data_->_tmp37_ = vala_g_ptr_array_get_length (_data_->_tmp36_);
					_data_->_tmp38_ = _data_->_tmp37_;
					if (_data_->_tmp38_ > 1) {
						_data_->_tmp39_ = _data_->self->priv->next_screenshot_button;
						gtk_widget_set_visible ((GtkWidget*) _data_->_tmp39_, TRUE);
					}
				}
				_g_object_unref0 (_data_->cached_screenshot);
				_g_object_unref0 (_data_->uri);
				_g_object_unref0 (_data_->image);
			}
		}
	}
	_data_->_tmp40_ = _data_->self->priv->current_screenshots;
	_data_->_tmp41_ = vala_g_ptr_array_get_length (_data_->_tmp40_);
	_data_->_tmp42_ = _data_->_tmp41_;
	if (_data_->_tmp42_ == 0) {
		_data_->_tmp43_ = _data_->self->priv->screenshots_box;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp43_, 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;
}

static void
pamac_manager_window_clear_details_grid (PamacManagerWindow* self)
{
	GtkGrid* _tmp0_;
	GtkGrid* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->details_grid;
	gtk_grid_remove_column (_tmp0_, 1);
	_tmp1_ = self->priv->details_grid;
	gtk_grid_remove_column (_tmp1_, 0);
}

static void
__lambda8_ (PamacManagerWindow* self,
            GtkWidget* child)
{
	GtkBox* _tmp0_;
	g_return_if_fail (child != NULL);
	_tmp0_ = self->priv->deps_box;
	gtk_container_remove ((GtkContainer*) _tmp0_, child);
}

static void
___lambda8__gtk_callback (GtkWidget* widget,
                          gpointer self)
{
	__lambda8_ ((PamacManagerWindow*) self, widget);
}

static void
pamac_manager_window_clear_deps_box (PamacManagerWindow* self)
{
	GtkBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->deps_box;
	gtk_container_foreach ((GtkContainer*) _tmp0_, ___lambda8__gtk_callback, self);
}

static void
__lambda9_ (PamacManagerWindow* self,
            GtkWidget* child)
{
	HdyCarousel* _tmp0_;
	g_return_if_fail (child != NULL);
	_tmp0_ = self->priv->screenshots_carousel;
	gtk_container_remove ((GtkContainer*) _tmp0_, child);
}

static void
___lambda9__gtk_callback (GtkWidget* widget,
                          gpointer self)
{
	__lambda9_ ((PamacManagerWindow*) self, widget);
}

static void
pamac_manager_window_clear_screenshots_carousel (PamacManagerWindow* self)
{
	HdyCarousel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->screenshots_carousel;
	gtk_container_foreach ((GtkContainer*) _tmp0_, ___lambda9__gtk_callback, self);
}

static void
pamac_manager_window_set_screenshots (PamacManagerWindow* self,
                                      PamacPackage* pkg)
{
	GtkBox* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GPtrArray* _tmp3_;
	GPtrArray* urls = NULL;
	GPtrArray* _tmp4_;
	GPtrArray* _tmp5_;
	GPtrArray* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pkg != NULL);
	pamac_manager_window_remove_screenshots_overlay_timeout (self);
	_tmp0_ = self->priv->screenshots_box;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = self->priv->previous_screenshot_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
	_tmp2_ = self->priv->next_screenshot_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, FALSE);
	self->priv->current_screenshots_index = (guint) 0;
	_tmp3_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->current_screenshots);
	self->priv->current_screenshots = _tmp3_;
	_tmp4_ = pamac_package_get_screenshots (pkg);
	_tmp5_ = _tmp4_;
	urls = _tmp5_;
	_tmp6_ = urls;
	_tmp7_ = vala_g_ptr_array_get_length (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_ != 0) {
		GtkBox* _tmp9_;
		GPtrArray* _tmp10_;
		_tmp9_ = self->priv->screenshots_box;
		gtk_widget_set_visible ((GtkWidget*) _tmp9_, TRUE);
		_tmp10_ = urls;
		pamac_manager_window_get_screenshots_images (self, _tmp10_, NULL, NULL);
	}
}

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_manager_window_set_package_details (PamacManagerWindow* self,
                                          PamacAlpmPackage* pkg,
                                          PamacAURPackage* aur_pkg)
{
	gboolean software_mode = FALSE;
	PamacLocalConfig* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	const gchar* version = NULL;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* app_name = NULL;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* desc = NULL;
	const gchar* _tmp61_;
	const gchar* _tmp62_;
	const gchar* _tmp63_;
	const gchar* long_desc = NULL;
	const gchar* _tmp67_;
	const gchar* _tmp68_;
	const gchar* _tmp69_;
	const gchar* url = NULL;
	const gchar* _tmp81_;
	const gchar* _tmp82_;
	gchar* escaped_url = NULL;
	const gchar* _tmp83_;
	const gchar* _tmp92_;
	const gchar* _tmp93_;
	GtkWidget* previous_widget = NULL;
	const gchar* _tmp166_;
	const gchar* _tmp167_;
	const gchar* _tmp275_;
	const gchar* _tmp276_;
	const gchar* _tmp315_;
	const gchar* _tmp316_;
	GPtrArray* _tmp401_;
	GPtrArray* _tmp402_;
	gint _tmp403_;
	gint _tmp404_;
	GPtrArray* _tmp407_;
	GPtrArray* _tmp408_;
	gint _tmp409_;
	gint _tmp410_;
	GPtrArray* _tmp413_;
	GPtrArray* _tmp414_;
	gint _tmp415_;
	gint _tmp416_;
	GPtrArray* _tmp419_;
	GPtrArray* _tmp420_;
	gint _tmp421_;
	gint _tmp422_;
	GPtrArray* _tmp425_;
	GPtrArray* _tmp426_;
	gint _tmp427_;
	gint _tmp428_;
	GPtrArray* _tmp431_;
	GPtrArray* _tmp432_;
	gint _tmp433_;
	gint _tmp434_;
	GPtrArray* _tmp437_;
	GPtrArray* _tmp438_;
	gint _tmp439_;
	gint _tmp440_;
	GtkStack* _tmp443_;
	const gchar* _tmp444_;
	const gchar* _tmp445_;
	GtkStack* _tmp447_;
	const gchar* _tmp448_;
	const gchar* _tmp449_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pkg != NULL);
	pamac_manager_window_on_packages_leaflet_folded_changed (self);
	pamac_manager_window_clear_screenshots_carousel (self);
	pamac_manager_window_set_screenshots (self, (PamacPackage*) pkg);
	_tmp0_ = self->local_config;
	_tmp1_ = pamac_local_config_get_software_mode (_tmp0_);
	_tmp2_ = _tmp1_;
	software_mode = _tmp2_;
	_tmp3_ = pamac_package_get_installed_version ((PamacPackage*) pkg);
	_tmp4_ = _tmp3_;
	version = _tmp4_;
	_tmp5_ = version;
	if (_tmp5_ == NULL) {
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp6_ = pamac_package_get_version ((PamacPackage*) pkg);
		_tmp7_ = _tmp6_;
		version = _tmp7_;
	}
	_tmp8_ = pamac_package_get_app_name ((PamacPackage*) pkg);
	_tmp9_ = _tmp8_;
	app_name = _tmp9_;
	_tmp10_ = app_name;
	if (_tmp10_ == NULL) {
		GtkLabel* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		GtkImage* _tmp17_;
		GdkPixbuf* _tmp18_;
		_tmp11_ = self->priv->name_label;
		_tmp12_ = pamac_package_get_name ((PamacPackage*) pkg);
		_tmp13_ = _tmp12_;
		_tmp14_ = version;
		_tmp15_ = g_strdup_printf ("<big><b>%s  %s</b></big>", _tmp13_, _tmp14_);
		_tmp16_ = _tmp15_;
		gtk_label_set_markup (_tmp11_, _tmp16_);
		_g_free0 (_tmp16_);
		_tmp17_ = self->priv->app_image;
		_tmp18_ = self->priv->package_icon;
		g_object_set (_tmp17_, "pixbuf", _tmp18_, NULL);
	} else {
		const gchar* icon = NULL;
		const gchar* _tmp35_;
		const gchar* _tmp36_;
		const gchar* _tmp37_;
		if (software_mode) {
			GtkLabel* _tmp19_;
			const gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			const gchar* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			_tmp19_ = self->priv->name_label;
			_tmp20_ = app_name;
			_tmp21_ = g_markup_escape_text (_tmp20_, (gssize) -1);
			_tmp22_ = _tmp21_;
			_tmp23_ = version;
			_tmp24_ = g_strdup_printf ("<big><b>%s  %s</b></big>", _tmp22_, _tmp23_);
			_tmp25_ = _tmp24_;
			gtk_label_set_markup (_tmp19_, _tmp25_);
			_g_free0 (_tmp25_);
			_g_free0 (_tmp22_);
		} else {
			GtkLabel* _tmp26_;
			const gchar* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			const gchar* _tmp30_;
			const gchar* _tmp31_;
			const gchar* _tmp32_;
			gchar* _tmp33_;
			gchar* _tmp34_;
			_tmp26_ = self->priv->name_label;
			_tmp27_ = app_name;
			_tmp28_ = g_markup_escape_text (_tmp27_, (gssize) -1);
			_tmp29_ = _tmp28_;
			_tmp30_ = pamac_package_get_name ((PamacPackage*) pkg);
			_tmp31_ = _tmp30_;
			_tmp32_ = version;
			_tmp33_ = g_strdup_printf ("<big><b>%s (%s)  %s</b></big>", _tmp29_, _tmp31_, _tmp32_);
			_tmp34_ = _tmp33_;
			gtk_label_set_markup (_tmp26_, _tmp34_);
			_g_free0 (_tmp34_);
			_g_free0 (_tmp29_);
		}
		_tmp35_ = pamac_package_get_icon ((PamacPackage*) pkg);
		_tmp36_ = _tmp35_;
		icon = _tmp36_;
		_tmp37_ = icon;
		if (_tmp37_ != NULL) {
			{
				GdkPixbuf* pixbuf = NULL;
				const gchar* _tmp38_;
				GdkPixbuf* _tmp39_;
				GtkImage* _tmp40_;
				GdkPixbuf* _tmp41_;
				_tmp38_ = icon;
				_tmp39_ = gdk_pixbuf_new_from_file (_tmp38_, &_inner_error0_);
				pixbuf = _tmp39_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				_tmp40_ = self->priv->app_image;
				_tmp41_ = pixbuf;
				g_object_set (_tmp40_, "pixbuf", _tmp41_, NULL);
				_g_object_unref0 (pixbuf);
			}
			goto __finally0;
			__catch0_g_error:
			{
				gchar* new_icon = NULL;
				const gchar* _tmp42_;
				gchar* _tmp43_;
				const gchar* _tmp44_;
				g_clear_error (&_inner_error0_);
				_tmp42_ = icon;
				_tmp43_ = g_strdup (_tmp42_);
				new_icon = _tmp43_;
				_tmp44_ = icon;
				if (string_contains (_tmp44_, "extra")) {
					const gchar* _tmp45_;
					gchar* _tmp46_;
					_tmp45_ = icon;
					_tmp46_ = string_replace (_tmp45_, "extra", "community");
					_g_free0 (new_icon);
					new_icon = _tmp46_;
				} else {
					const gchar* _tmp47_;
					_tmp47_ = icon;
					if (string_contains (_tmp47_, "community")) {
						const gchar* _tmp48_;
						gchar* _tmp49_;
						_tmp48_ = icon;
						_tmp49_ = string_replace (_tmp48_, "community", "extra");
						_g_free0 (new_icon);
						new_icon = _tmp49_;
					}
				}
				{
					GdkPixbuf* pixbuf = NULL;
					const gchar* _tmp50_;
					GdkPixbuf* _tmp51_;
					GtkImage* _tmp52_;
					GdkPixbuf* _tmp53_;
					_tmp50_ = new_icon;
					_tmp51_ = gdk_pixbuf_new_from_file (_tmp50_, &_inner_error0_);
					pixbuf = _tmp51_;
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch1_g_error;
					}
					_tmp52_ = self->priv->app_image;
					_tmp53_ = pixbuf;
					g_object_set (_tmp52_, "pixbuf", _tmp53_, NULL);
					_g_object_unref0 (pixbuf);
				}
				goto __finally1;
				__catch1_g_error:
				{
					GError* e = NULL;
					GtkImage* _tmp54_;
					GdkPixbuf* _tmp55_;
					const gchar* _tmp56_;
					GError* _tmp57_;
					const gchar* _tmp58_;
					e = _inner_error0_;
					_inner_error0_ = NULL;
					_tmp54_ = self->priv->app_image;
					_tmp55_ = self->priv->package_icon;
					g_object_set (_tmp54_, "pixbuf", _tmp55_, NULL);
					_tmp56_ = icon;
					_tmp57_ = e;
					_tmp58_ = _tmp57_->message;
					g_warning ("manager_window.vala:1485: %s: %s", _tmp56_, _tmp58_);
					_g_error_free0 (e);
				}
				__finally1:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_free0 (new_icon);
					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);
			}
			__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;
			}
		} else {
			GtkImage* _tmp59_;
			GdkPixbuf* _tmp60_;
			_tmp59_ = self->priv->app_image;
			_tmp60_ = self->priv->package_icon;
			g_object_set (_tmp59_, "pixbuf", _tmp60_, NULL);
		}
	}
	_tmp61_ = pamac_package_get_desc ((PamacPackage*) pkg);
	_tmp62_ = _tmp61_;
	desc = _tmp62_;
	_tmp63_ = desc;
	if (_tmp63_ != NULL) {
		GtkLabel* _tmp64_;
		const gchar* _tmp65_;
		const gchar* _tmp66_;
		_tmp64_ = self->priv->desc_label;
		_tmp65_ = pamac_package_get_desc ((PamacPackage*) pkg);
		_tmp66_ = _tmp65_;
		gtk_label_set_text (_tmp64_, _tmp66_);
	}
	_tmp67_ = pamac_package_get_long_desc ((PamacPackage*) pkg);
	_tmp68_ = _tmp67_;
	long_desc = _tmp68_;
	_tmp69_ = long_desc;
	if (_tmp69_ == NULL) {
		GtkLabel* _tmp70_;
		_tmp70_ = self->priv->long_desc_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp70_, FALSE);
	} else {
		gchar* markup_long_desc = NULL;
		const gchar* _tmp71_;
		gchar* _tmp72_;
		gchar* _tmp73_;
		gchar* _tmp74_;
		gchar* _tmp75_;
		gchar* _tmp76_;
		gchar* _tmp77_;
		GtkLabel* _tmp78_;
		const gchar* _tmp79_;
		GtkLabel* _tmp80_;
		_tmp71_ = long_desc;
		_tmp72_ = string_replace (_tmp71_, "em>", "i>");
		_tmp73_ = _tmp72_;
		_tmp74_ = string_replace (_tmp73_, "code>", "tt>");
		_tmp75_ = _tmp74_;
		_tmp76_ = g_markup_escape_text (_tmp75_, (gssize) -1);
		_tmp77_ = _tmp76_;
		_g_free0 (_tmp75_);
		_g_free0 (_tmp73_);
		markup_long_desc = _tmp77_;
		_tmp78_ = self->priv->long_desc_label;
		_tmp79_ = markup_long_desc;
		gtk_label_set_markup (_tmp78_, _tmp79_);
		_tmp80_ = self->priv->long_desc_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp80_, TRUE);
		_g_free0 (markup_long_desc);
	}
	_tmp81_ = pamac_package_get_url ((PamacPackage*) pkg);
	_tmp82_ = _tmp81_;
	url = _tmp82_;
	escaped_url = NULL;
	_tmp83_ = url;
	if (_tmp83_ != NULL) {
		const gchar* _tmp84_;
		gchar* _tmp85_;
		GtkLabel* _tmp86_;
		const gchar* _tmp87_;
		const gchar* _tmp88_;
		gchar* _tmp89_;
		gchar* _tmp90_;
		_tmp84_ = url;
		_tmp85_ = g_markup_escape_text (_tmp84_, (gssize) -1);
		_g_free0 (escaped_url);
		escaped_url = _tmp85_;
		_tmp86_ = self->priv->link_label;
		_tmp87_ = escaped_url;
		_tmp88_ = escaped_url;
		_tmp89_ = g_strdup_printf ("<a href=\"%s\">%s</a>", _tmp87_, _tmp88_);
		_tmp90_ = _tmp89_;
		gtk_label_set_markup (_tmp86_, _tmp90_);
		_g_free0 (_tmp90_);
	} else {
		GtkLabel* _tmp91_;
		_tmp91_ = self->priv->link_label;
		gtk_label_set_label (_tmp91_, "");
	}
	_tmp92_ = pamac_package_get_installed_version ((PamacPackage*) pkg);
	_tmp93_ = _tmp92_;
	if (_tmp93_ != NULL) {
		const gchar* launchable = NULL;
		const gchar* _tmp94_;
		const gchar* _tmp95_;
		const gchar* _tmp96_;
		GtkToggleButton* _tmp101_;
		GtkToggleButton* _tmp102_;
		GtkToggleButton* _tmp103_;
		GtkStack* _tmp104_;
		const gchar* _tmp105_;
		const gchar* _tmp106_;
		_tmp94_ = pamac_package_get_launchable ((PamacPackage*) pkg);
		_tmp95_ = _tmp94_;
		launchable = _tmp95_;
		_tmp96_ = launchable;
		if (_tmp96_ != NULL) {
			GtkButton* _tmp97_;
			const gchar* _tmp98_;
			gchar* _tmp99_;
			_tmp97_ = self->priv->launch_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp97_, TRUE);
			_tmp98_ = launchable;
			_tmp99_ = g_strdup (_tmp98_);
			_g_free0 (self->priv->current_launchable);
			self->priv->current_launchable = _tmp99_;
		} else {
			GtkButton* _tmp100_;
			_tmp100_ = self->priv->launch_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp100_, FALSE);
		}
		_tmp101_ = self->priv->install_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp101_, FALSE);
		_tmp102_ = self->priv->build_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp102_, FALSE);
		_tmp103_ = self->priv->reinstall_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp103_, FALSE);
		_tmp104_ = self->view_stack;
		_tmp105_ = gtk_stack_get_visible_child_name (_tmp104_);
		_tmp106_ = _tmp105_;
		if (g_strcmp0 (_tmp106_, "updates") == 0) {
			GtkToggleButton* _tmp107_;
			GtkToggleButton* _tmp108_;
			GtkToggleButton* _tmp109_;
			GHashTable* _tmp110_;
			const gchar* _tmp111_;
			const gchar* _tmp112_;
			_tmp107_ = self->priv->remove_togglebutton;
			gtk_widget_set_visible ((GtkWidget*) _tmp107_, TRUE);
			_tmp108_ = self->priv->remove_togglebutton;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp108_, TRUE);
			_tmp109_ = self->priv->remove_togglebutton;
			_tmp110_ = pamac_to_remove;
			_tmp111_ = pamac_package_get_name ((PamacPackage*) pkg);
			_tmp112_ = _tmp111_;
			gtk_toggle_button_set_active (_tmp109_, g_hash_table_contains (_tmp110_, _tmp112_));
		} else {
			PamacDatabaseGtk* _tmp113_;
			const gchar* _tmp114_;
			const gchar* _tmp115_;
			_tmp113_ = self->priv->_database;
			_tmp114_ = pamac_package_get_name ((PamacPackage*) pkg);
			_tmp115_ = _tmp114_;
			if (pamac_database_should_hold ((PamacDatabase*) _tmp113_, _tmp115_)) {
				GtkToggleButton* _tmp116_;
				GtkToggleButton* _tmp117_;
				_tmp116_ = self->priv->remove_togglebutton;
				gtk_widget_set_visible ((GtkWidget*) _tmp116_, TRUE);
				_tmp117_ = self->priv->remove_togglebutton;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp117_, FALSE);
			} else {
				GtkToggleButton* _tmp118_;
				GtkToggleButton* _tmp119_;
				GtkToggleButton* _tmp120_;
				GHashTable* _tmp121_;
				const gchar* _tmp122_;
				const gchar* _tmp123_;
				_tmp118_ = self->priv->remove_togglebutton;
				gtk_widget_set_visible ((GtkWidget*) _tmp118_, TRUE);
				_tmp119_ = self->priv->remove_togglebutton;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp119_, TRUE);
				_tmp120_ = self->priv->remove_togglebutton;
				_tmp121_ = pamac_to_remove;
				_tmp122_ = pamac_package_get_name ((PamacPackage*) pkg);
				_tmp123_ = _tmp122_;
				gtk_toggle_button_set_active (_tmp120_, g_hash_table_contains (_tmp121_, _tmp123_));
				if (aur_pkg == NULL) {
					gboolean _tmp124_ = FALSE;
					const gchar* _tmp125_;
					const gchar* _tmp126_;
					_tmp125_ = pamac_package_get_repo ((PamacPackage*) pkg);
					_tmp126_ = _tmp125_;
					if (_tmp126_ != NULL) {
						const gchar* _tmp127_;
						const gchar* _tmp128_;
						const gchar* _tmp129_;
						const gchar* _tmp130_;
						_tmp127_ = pamac_package_get_version ((PamacPackage*) pkg);
						_tmp128_ = _tmp127_;
						_tmp129_ = pamac_package_get_installed_version ((PamacPackage*) pkg);
						_tmp130_ = _tmp129_;
						_tmp124_ = g_strcmp0 (_tmp128_, _tmp130_) == 0;
					} else {
						_tmp124_ = FALSE;
					}
					if (_tmp124_) {
						GtkToggleButton* _tmp131_;
						GtkToggleButton* _tmp132_;
						GHashTable* _tmp133_;
						const gchar* _tmp134_;
						const gchar* _tmp135_;
						_tmp131_ = self->priv->reinstall_togglebutton;
						gtk_widget_set_visible ((GtkWidget*) _tmp131_, TRUE);
						_tmp132_ = self->priv->reinstall_togglebutton;
						_tmp133_ = pamac_to_install;
						_tmp134_ = pamac_package_get_name ((PamacPackage*) pkg);
						_tmp135_ = _tmp134_;
						gtk_toggle_button_set_active (_tmp132_, g_hash_table_contains (_tmp133_, _tmp135_));
					}
				} else {
					GtkToggleButton* _tmp136_;
					GtkToggleButton* _tmp137_;
					GHashTable* _tmp138_;
					const gchar* _tmp139_;
					const gchar* _tmp140_;
					gchar* aur_url = NULL;
					const gchar* _tmp141_;
					const gchar* _tmp142_;
					gchar* _tmp143_;
					const gchar* _tmp144_;
					_tmp136_ = self->priv->build_togglebutton;
					gtk_widget_set_visible ((GtkWidget*) _tmp136_, TRUE);
					_tmp137_ = self->priv->build_togglebutton;
					_tmp138_ = pamac_to_build;
					_tmp139_ = pamac_package_get_name ((PamacPackage*) pkg);
					_tmp140_ = _tmp139_;
					gtk_toggle_button_set_active (_tmp137_, g_hash_table_contains (_tmp138_, _tmp140_));
					_tmp141_ = pamac_package_get_name ((PamacPackage*) pkg);
					_tmp142_ = _tmp141_;
					_tmp143_ = g_strconcat ("http://aur.archlinux.org/packages/", _tmp142_, NULL);
					aur_url = _tmp143_;
					_tmp144_ = escaped_url;
					if (_tmp144_ != NULL) {
						GtkLabel* _tmp145_;
						const gchar* _tmp146_;
						const gchar* _tmp147_;
						const gchar* _tmp148_;
						const gchar* _tmp149_;
						gchar* _tmp150_;
						gchar* _tmp151_;
						_tmp145_ = self->priv->link_label;
						_tmp146_ = escaped_url;
						_tmp147_ = escaped_url;
						_tmp148_ = aur_url;
						_tmp149_ = aur_url;
						_tmp150_ = g_strdup_printf ("<a href=\"%s\">%s</a>\n\n<a href=\"%s\">%s</a>", _tmp146_, _tmp147_, _tmp148_, _tmp149_);
						_tmp151_ = _tmp150_;
						gtk_label_set_markup (_tmp145_, _tmp151_);
						_g_free0 (_tmp151_);
					} else {
						GtkLabel* _tmp152_;
						const gchar* _tmp153_;
						const gchar* _tmp154_;
						gchar* _tmp155_;
						gchar* _tmp156_;
						_tmp152_ = self->priv->link_label;
						_tmp153_ = aur_url;
						_tmp154_ = aur_url;
						_tmp155_ = g_strdup_printf ("<a href=\"%s\">%s</a>", _tmp153_, _tmp154_);
						_tmp156_ = _tmp155_;
						gtk_label_set_markup (_tmp152_, _tmp156_);
						_g_free0 (_tmp156_);
					}
					_g_free0 (aur_url);
				}
			}
		}
	} else {
		GtkButton* _tmp157_;
		GtkToggleButton* _tmp158_;
		GtkToggleButton* _tmp159_;
		GtkToggleButton* _tmp160_;
		GtkToggleButton* _tmp161_;
		GtkToggleButton* _tmp162_;
		GHashTable* _tmp163_;
		const gchar* _tmp164_;
		const gchar* _tmp165_;
		_tmp157_ = self->priv->launch_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp157_, FALSE);
		_tmp158_ = self->priv->remove_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp158_, FALSE);
		_tmp159_ = self->priv->reinstall_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp159_, FALSE);
		_tmp160_ = self->priv->build_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp160_, FALSE);
		_tmp161_ = self->priv->install_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp161_, TRUE);
		_tmp162_ = self->priv->install_togglebutton;
		_tmp163_ = pamac_to_install;
		_tmp164_ = pamac_package_get_name ((PamacPackage*) pkg);
		_tmp165_ = _tmp164_;
		gtk_toggle_button_set_active (_tmp162_, g_hash_table_contains (_tmp163_, _tmp165_));
	}
	pamac_manager_window_clear_details_grid (self);
	previous_widget = NULL;
	_tmp166_ = pamac_package_get_license ((PamacPackage*) pkg);
	_tmp167_ = _tmp166_;
	if (_tmp167_ != NULL) {
		const gchar* _tmp168_;
		const gchar* _tmp169_;
		GtkWidget* _tmp170_;
		GtkWidget* _tmp171_;
		_tmp168_ = pamac_package_get_license ((PamacPackage*) pkg);
		_tmp169_ = _tmp168_;
		_tmp170_ = previous_widget;
		_tmp171_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Licenses"), _tmp169_, _tmp170_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp171_;
	} else {
		GtkWidget* _tmp172_;
		GtkWidget* _tmp173_;
		_tmp172_ = previous_widget;
		_tmp173_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Licenses"), g_dgettext (NULL, "Unknown"), _tmp172_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp173_;
	}
	if (software_mode) {
		gboolean _tmp174_ = FALSE;
		gboolean _tmp175_ = FALSE;
		gboolean _tmp176_ = FALSE;
		const gchar* _tmp177_;
		const gchar* _tmp178_;
		_tmp177_ = pamac_package_get_repo ((PamacPackage*) pkg);
		_tmp178_ = _tmp177_;
		if (g_strcmp0 (_tmp178_, "community") == 0) {
			_tmp176_ = TRUE;
		} else {
			const gchar* _tmp179_;
			const gchar* _tmp180_;
			_tmp179_ = pamac_package_get_repo ((PamacPackage*) pkg);
			_tmp180_ = _tmp179_;
			_tmp176_ = g_strcmp0 (_tmp180_, "extra") == 0;
		}
		if (_tmp176_) {
			_tmp175_ = TRUE;
		} else {
			const gchar* _tmp181_;
			const gchar* _tmp182_;
			_tmp181_ = pamac_package_get_repo ((PamacPackage*) pkg);
			_tmp182_ = _tmp181_;
			_tmp175_ = g_strcmp0 (_tmp182_, "core") == 0;
		}
		if (_tmp175_) {
			_tmp174_ = TRUE;
		} else {
			const gchar* _tmp183_;
			const gchar* _tmp184_;
			_tmp183_ = pamac_package_get_repo ((PamacPackage*) pkg);
			_tmp184_ = _tmp183_;
			_tmp174_ = g_strcmp0 (_tmp184_, "multilib") == 0;
		}
		if (_tmp174_) {
			GtkWidget* _tmp185_;
			GtkWidget* _tmp186_;
			_tmp185_ = previous_widget;
			_tmp186_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Repository"), g_dgettext (NULL, "Official Repositories"), _tmp185_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp186_;
		} else {
			const gchar* _tmp187_;
			const gchar* _tmp188_;
			GtkWidget* _tmp189_;
			GtkWidget* _tmp190_;
			_tmp187_ = pamac_package_get_repo ((PamacPackage*) pkg);
			_tmp188_ = _tmp187_;
			_tmp189_ = previous_widget;
			_tmp190_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Repository"), _tmp188_, _tmp189_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp190_;
		}
	} else {
		const gchar* _tmp191_;
		const gchar* _tmp192_;
		GtkWidget* _tmp193_;
		GtkWidget* _tmp194_;
		_tmp191_ = pamac_package_get_repo ((PamacPackage*) pkg);
		_tmp192_ = _tmp191_;
		_tmp193_ = previous_widget;
		_tmp194_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Repository"), _tmp192_, _tmp193_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp194_;
	}
	if (aur_pkg != NULL) {
		const gchar* _tmp195_;
		const gchar* _tmp196_;
		const gchar* _tmp197_;
		const gchar* _tmp198_;
		const gchar* _tmp203_;
		const gchar* _tmp204_;
		GtkWidget* _tmp205_;
		GtkWidget* _tmp206_;
		GDateTime* _tmp207_;
		GDateTime* _tmp208_;
		GDateTime* _tmp217_;
		GDateTime* _tmp218_;
		guint64 _tmp227_;
		guint64 _tmp228_;
		GDateTime* _tmp235_;
		GDateTime* _tmp236_;
		_tmp195_ = pamac_aur_package_get_packagebase (aur_pkg);
		_tmp196_ = _tmp195_;
		_tmp197_ = pamac_package_get_name ((PamacPackage*) pkg);
		_tmp198_ = _tmp197_;
		if (g_strcmp0 (_tmp196_, _tmp198_) != 0) {
			const gchar* _tmp199_;
			const gchar* _tmp200_;
			GtkWidget* _tmp201_;
			GtkWidget* _tmp202_;
			_tmp199_ = pamac_aur_package_get_packagebase (aur_pkg);
			_tmp200_ = _tmp199_;
			_tmp201_ = previous_widget;
			_tmp202_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Package Base"), _tmp200_, _tmp201_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp202_;
		}
		_tmp203_ = pamac_aur_package_get_maintainer (aur_pkg);
		_tmp204_ = _tmp203_;
		_tmp205_ = previous_widget;
		_tmp206_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Maintainer"), _tmp204_, _tmp205_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp206_;
		_tmp207_ = pamac_aur_package_get_firstsubmitted (aur_pkg);
		_tmp208_ = _tmp207_;
		if (_tmp208_ != NULL) {
			GDateTime* _tmp209_;
			GDateTime* _tmp210_;
			gchar* _tmp211_;
			gchar* _tmp212_;
			GtkWidget* _tmp213_;
			GtkWidget* _tmp214_;
			_tmp209_ = pamac_aur_package_get_firstsubmitted (aur_pkg);
			_tmp210_ = _tmp209_;
			_tmp211_ = g_date_time_format (_tmp210_, "%c");
			_tmp212_ = _tmp211_;
			_tmp213_ = previous_widget;
			_tmp214_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "First Submitted"), _tmp212_, _tmp213_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp214_;
			_g_free0 (_tmp212_);
		} else {
			GtkWidget* _tmp215_;
			GtkWidget* _tmp216_;
			_tmp215_ = previous_widget;
			_tmp216_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "First Submitted"), g_dgettext (NULL, "Unknown"), _tmp215_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp216_;
		}
		_tmp217_ = pamac_aur_package_get_lastmodified (aur_pkg);
		_tmp218_ = _tmp217_;
		if (_tmp218_ != NULL) {
			GDateTime* _tmp219_;
			GDateTime* _tmp220_;
			gchar* _tmp221_;
			gchar* _tmp222_;
			GtkWidget* _tmp223_;
			GtkWidget* _tmp224_;
			_tmp219_ = pamac_aur_package_get_lastmodified (aur_pkg);
			_tmp220_ = _tmp219_;
			_tmp221_ = g_date_time_format (_tmp220_, "%c");
			_tmp222_ = _tmp221_;
			_tmp223_ = previous_widget;
			_tmp224_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Last Modified"), _tmp222_, _tmp223_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp224_;
			_g_free0 (_tmp222_);
		} else {
			GtkWidget* _tmp225_;
			GtkWidget* _tmp226_;
			_tmp225_ = previous_widget;
			_tmp226_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "First Submitted"), g_dgettext (NULL, "Unknown"), _tmp225_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp226_;
		}
		_tmp227_ = pamac_aur_package_get_numvotes (aur_pkg);
		_tmp228_ = _tmp227_;
		if (_tmp228_ != ((guint64) 0)) {
			guint64 _tmp229_;
			guint64 _tmp230_;
			gchar* _tmp231_;
			gchar* _tmp232_;
			GtkWidget* _tmp233_;
			GtkWidget* _tmp234_;
			_tmp229_ = pamac_aur_package_get_numvotes (aur_pkg);
			_tmp230_ = _tmp229_;
			_tmp231_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp230_);
			_tmp232_ = _tmp231_;
			_tmp233_ = previous_widget;
			_tmp234_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Votes"), _tmp232_, _tmp233_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp234_;
			_g_free0 (_tmp232_);
		}
		_tmp235_ = pamac_aur_package_get_outofdate (aur_pkg);
		_tmp236_ = _tmp235_;
		if (_tmp236_ != NULL) {
			GDateTime* _tmp237_;
			GDateTime* _tmp238_;
			gchar* _tmp239_;
			gchar* _tmp240_;
			GtkWidget* _tmp241_;
			GtkWidget* _tmp242_;
			_tmp237_ = pamac_aur_package_get_outofdate (aur_pkg);
			_tmp238_ = _tmp237_;
			_tmp239_ = g_date_time_format (_tmp238_, "%c");
			_tmp240_ = _tmp239_;
			_tmp241_ = previous_widget;
			_tmp242_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Out of Date"), _tmp240_, _tmp241_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp242_;
			_g_free0 (_tmp240_);
		}
	}
	if (!software_mode) {
		GPtrArray* _tmp243_;
		GPtrArray* _tmp244_;
		gint _tmp245_;
		gint _tmp246_;
		_tmp243_ = pamac_alpm_package_get_groups (pkg);
		_tmp244_ = _tmp243_;
		_tmp245_ = vala_g_ptr_array_get_length (_tmp244_);
		_tmp246_ = _tmp245_;
		if (_tmp246_ != 0) {
			GtkLabel* label = NULL;
			gchar* _tmp247_;
			gchar* _tmp248_;
			gchar* _tmp249_;
			gchar* _tmp250_;
			GtkLabel* _tmp251_;
			GtkLabel* _tmp252_;
			GtkLabel* _tmp253_;
			GtkLabel* _tmp254_;
			GtkLabel* _tmp255_;
			GtkLabel* _tmp256_;
			GtkGrid* _tmp257_;
			GtkLabel* _tmp258_;
			GtkWidget* _tmp259_;
			GtkBox* box = NULL;
			GtkBox* _tmp260_;
			GtkBox* _tmp261_;
			GPtrArray* _tmp262_;
			GPtrArray* _tmp263_;
			GtkGrid* _tmp270_;
			GtkBox* _tmp271_;
			GtkLabel* _tmp272_;
			GtkLabel* _tmp273_;
			GtkWidget* _tmp274_;
			_tmp247_ = g_strconcat (g_dgettext (NULL, "Groups"), ":", NULL);
			_tmp248_ = _tmp247_;
			_tmp249_ = g_strdup_printf ("<b>%s</b>", _tmp248_);
			_tmp250_ = _tmp249_;
			_tmp251_ = (GtkLabel*) gtk_label_new (_tmp250_);
			g_object_ref_sink (_tmp251_);
			_tmp252_ = _tmp251_;
			_g_free0 (_tmp250_);
			_g_free0 (_tmp248_);
			label = _tmp252_;
			_tmp253_ = label;
			gtk_widget_set_visible ((GtkWidget*) _tmp253_, TRUE);
			_tmp254_ = label;
			gtk_label_set_use_markup (_tmp254_, TRUE);
			_tmp255_ = label;
			gtk_widget_set_halign ((GtkWidget*) _tmp255_, GTK_ALIGN_START);
			_tmp256_ = label;
			gtk_widget_set_valign ((GtkWidget*) _tmp256_, GTK_ALIGN_START);
			_tmp257_ = self->priv->details_grid;
			_tmp258_ = label;
			_tmp259_ = previous_widget;
			gtk_grid_attach_next_to (_tmp257_, (GtkWidget*) _tmp258_, _tmp259_, GTK_POS_BOTTOM, 1, 1);
			_tmp260_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
			g_object_ref_sink (_tmp260_);
			box = _tmp260_;
			_tmp261_ = box;
			gtk_widget_set_visible ((GtkWidget*) _tmp261_, TRUE);
			_tmp262_ = pamac_alpm_package_get_groups (pkg);
			_tmp263_ = _tmp262_;
			{
				GPtrArray* name_collection = NULL;
				guint name_index = 0U;
				name_collection = _tmp263_;
				for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
					const gchar* name = NULL;
					name = (const gchar*) g_ptr_array_index (name_collection, name_index);
					{
						GtkLabel* label2 = NULL;
						const gchar* _tmp264_;
						GtkLabel* _tmp265_;
						GtkLabel* _tmp266_;
						GtkLabel* _tmp267_;
						GtkBox* _tmp268_;
						GtkLabel* _tmp269_;
						_tmp264_ = name;
						_tmp265_ = (GtkLabel*) gtk_label_new (_tmp264_);
						g_object_ref_sink (_tmp265_);
						label2 = _tmp265_;
						_tmp266_ = label2;
						gtk_widget_set_visible ((GtkWidget*) _tmp266_, TRUE);
						_tmp267_ = label2;
						gtk_widget_set_halign ((GtkWidget*) _tmp267_, GTK_ALIGN_START);
						_tmp268_ = box;
						_tmp269_ = label2;
						gtk_container_add ((GtkContainer*) _tmp268_, (GtkWidget*) _tmp269_);
						_g_object_unref0 (label2);
					}
				}
			}
			_tmp270_ = self->priv->details_grid;
			_tmp271_ = box;
			_tmp272_ = label;
			gtk_grid_attach_next_to (_tmp270_, (GtkWidget*) _tmp271_, (GtkWidget*) _tmp272_, GTK_POS_RIGHT, 1, 1);
			_tmp273_ = label;
			_tmp274_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp273_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp273_) : NULL);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp274_;
			_g_object_unref0 (box);
			_g_object_unref0 (label);
		}
	}
	_tmp275_ = pamac_alpm_package_get_packager (pkg);
	_tmp276_ = _tmp275_;
	if (_tmp276_ != NULL) {
		gchar** splitted = NULL;
		const gchar* _tmp277_;
		const gchar* _tmp278_;
		gchar** _tmp279_;
		gchar** _tmp280_;
		gint splitted_length1;
		gint _splitted_size_;
		const gchar* packager_name = NULL;
		gchar** _tmp281_;
		gint _tmp281__length1;
		const gchar* _tmp282_;
		gchar** _tmp283_;
		gint _tmp283__length1;
		_tmp277_ = pamac_alpm_package_get_packager (pkg);
		_tmp278_ = _tmp277_;
		_tmp280_ = _tmp279_ = g_strsplit (_tmp278_, "<", 2);
		splitted = _tmp280_;
		splitted_length1 = _vala_array_length (_tmp279_);
		_splitted_size_ = splitted_length1;
		_tmp281_ = splitted;
		_tmp281__length1 = splitted_length1;
		_tmp282_ = _tmp281_[0];
		packager_name = _tmp282_;
		_tmp283_ = splitted;
		_tmp283__length1 = splitted_length1;
		if (_tmp283__length1 > 1) {
			gchar* packager_mail = NULL;
			gchar** _tmp284_;
			gint _tmp284__length1;
			const gchar* _tmp285_;
			gchar** _tmp286_;
			gchar** _tmp287_;
			gchar** _tmp288_;
			gint _tmp288__length1;
			const gchar* _tmp289_;
			gchar* _tmp290_;
			gchar* _tmp291_;
			gchar* packager_detail = NULL;
			const gchar* _tmp292_;
			const gchar* _tmp293_;
			const gchar* _tmp294_;
			gchar* _tmp295_;
			const gchar* _tmp296_;
			GtkWidget* _tmp297_;
			GtkWidget* _tmp298_;
			_tmp284_ = splitted;
			_tmp284__length1 = splitted_length1;
			_tmp285_ = _tmp284_[1];
			_tmp287_ = _tmp286_ = g_strsplit (_tmp285_, ">", 2);
			_tmp288_ = _tmp287_;
			_tmp288__length1 = _vala_array_length (_tmp286_);
			_tmp289_ = _tmp288_[0];
			_tmp290_ = g_strdup (_tmp289_);
			_tmp291_ = _tmp290_;
			_tmp288_ = (_vala_array_free (_tmp288_, _tmp288__length1, (GDestroyNotify) g_free), NULL);
			packager_mail = _tmp291_;
			_tmp292_ = packager_name;
			_tmp293_ = packager_mail;
			_tmp294_ = packager_mail;
			_tmp295_ = g_strdup_printf ("%s <a href=\"mailto:%s\">%s</a>", _tmp292_, _tmp293_, _tmp294_);
			packager_detail = _tmp295_;
			_tmp296_ = packager_detail;
			_tmp297_ = previous_widget;
			_tmp298_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Packager"), _tmp296_, _tmp297_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp298_;
			_g_free0 (packager_detail);
			_g_free0 (packager_mail);
		} else {
			const gchar* _tmp299_;
			const gchar* _tmp300_;
			GtkWidget* _tmp301_;
			GtkWidget* _tmp302_;
			_tmp299_ = pamac_alpm_package_get_packager (pkg);
			_tmp300_ = _tmp299_;
			_tmp301_ = previous_widget;
			_tmp302_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Packager"), _tmp300_, _tmp301_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp302_;
		}
		splitted = (_vala_array_free (splitted, splitted_length1, (GDestroyNotify) g_free), NULL);
	} else {
		GtkWidget* _tmp303_;
		GtkWidget* _tmp304_;
		_tmp303_ = previous_widget;
		_tmp304_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Packager"), g_dgettext (NULL, "Unknown"), _tmp303_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp304_;
	}
	if (!software_mode) {
		GDateTime* _tmp305_;
		GDateTime* _tmp306_;
		_tmp305_ = pamac_alpm_package_get_build_date (pkg);
		_tmp306_ = _tmp305_;
		if (_tmp306_ != NULL) {
			GDateTime* _tmp307_;
			GDateTime* _tmp308_;
			gchar* _tmp309_;
			gchar* _tmp310_;
			GtkWidget* _tmp311_;
			GtkWidget* _tmp312_;
			_tmp307_ = pamac_alpm_package_get_build_date (pkg);
			_tmp308_ = _tmp307_;
			_tmp309_ = g_date_time_format (_tmp308_, "%c");
			_tmp310_ = _tmp309_;
			_tmp311_ = previous_widget;
			_tmp312_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Build Date"), _tmp310_, _tmp311_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp312_;
			_g_free0 (_tmp310_);
		} else {
			GtkWidget* _tmp313_;
			GtkWidget* _tmp314_;
			_tmp313_ = previous_widget;
			_tmp314_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Build Date"), g_dgettext (NULL, "Unknown"), _tmp313_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp314_;
		}
	}
	_tmp315_ = pamac_package_get_installed_version ((PamacPackage*) pkg);
	_tmp316_ = _tmp315_;
	if (_tmp316_ != NULL) {
		GDateTime* _tmp317_;
		GDateTime* _tmp318_;
		_tmp317_ = pamac_package_get_install_date ((PamacPackage*) pkg);
		_tmp318_ = _tmp317_;
		if (_tmp318_ != NULL) {
			GDateTime* _tmp319_;
			GDateTime* _tmp320_;
			gchar* _tmp321_;
			gchar* _tmp322_;
			GtkWidget* _tmp323_;
			GtkWidget* _tmp324_;
			_tmp319_ = pamac_package_get_install_date ((PamacPackage*) pkg);
			_tmp320_ = _tmp319_;
			_tmp321_ = g_date_time_format (_tmp320_, "%c");
			_tmp322_ = _tmp321_;
			_tmp323_ = previous_widget;
			_tmp324_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Install Date"), _tmp322_, _tmp323_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp324_;
			_g_free0 (_tmp322_);
		} else {
			GtkWidget* _tmp325_;
			GtkWidget* _tmp326_;
			_tmp325_ = previous_widget;
			_tmp326_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Install Date"), g_dgettext (NULL, "Unknown"), _tmp325_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp326_;
		}
	}
	if (!software_mode) {
		const gchar* _tmp327_;
		const gchar* _tmp328_;
		GPtrArray* _tmp337_;
		GPtrArray* _tmp338_;
		gint _tmp339_;
		gint _tmp340_;
		GPtrArray* _tmp371_;
		GPtrArray* _tmp372_;
		gint _tmp373_;
		gint _tmp374_;
		_tmp327_ = pamac_package_get_installed_version ((PamacPackage*) pkg);
		_tmp328_ = _tmp327_;
		if (_tmp328_ != NULL) {
			const gchar* _tmp329_;
			const gchar* _tmp330_;
			_tmp329_ = pamac_alpm_package_get_reason (pkg);
			_tmp330_ = _tmp329_;
			if (_tmp330_ != NULL) {
				const gchar* _tmp331_;
				const gchar* _tmp332_;
				GtkWidget* _tmp333_;
				GtkWidget* _tmp334_;
				_tmp331_ = pamac_alpm_package_get_reason (pkg);
				_tmp332_ = _tmp331_;
				_tmp333_ = previous_widget;
				_tmp334_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Install Reason"), _tmp332_, _tmp333_);
				_g_object_unref0 (previous_widget);
				previous_widget = _tmp334_;
			} else {
				GtkWidget* _tmp335_;
				GtkWidget* _tmp336_;
				_tmp335_ = previous_widget;
				_tmp336_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Install Reason"), g_dgettext (NULL, "Unknown"), _tmp335_);
				_g_object_unref0 (previous_widget);
				previous_widget = _tmp336_;
			}
		}
		_tmp337_ = pamac_alpm_package_get_validations (pkg);
		_tmp338_ = _tmp337_;
		_tmp339_ = vala_g_ptr_array_get_length (_tmp338_);
		_tmp340_ = _tmp339_;
		if (_tmp340_ != 0) {
			GtkLabel* label = NULL;
			gchar* _tmp341_;
			gchar* _tmp342_;
			gchar* _tmp343_;
			gchar* _tmp344_;
			GtkLabel* _tmp345_;
			GtkLabel* _tmp346_;
			GtkLabel* _tmp347_;
			GtkLabel* _tmp348_;
			GtkLabel* _tmp349_;
			GtkLabel* _tmp350_;
			GtkGrid* _tmp351_;
			GtkLabel* _tmp352_;
			GtkWidget* _tmp353_;
			GtkBox* box = NULL;
			GtkBox* _tmp354_;
			GtkBox* _tmp355_;
			GPtrArray* _tmp356_;
			GPtrArray* _tmp357_;
			GtkGrid* _tmp364_;
			GtkBox* _tmp365_;
			GtkLabel* _tmp366_;
			GtkLabel* _tmp367_;
			GtkWidget* _tmp368_;
			_tmp341_ = g_strconcat (g_dgettext (NULL, "Validated By"), ":", NULL);
			_tmp342_ = _tmp341_;
			_tmp343_ = g_strdup_printf ("<b>%s</b>", _tmp342_);
			_tmp344_ = _tmp343_;
			_tmp345_ = (GtkLabel*) gtk_label_new (_tmp344_);
			g_object_ref_sink (_tmp345_);
			_tmp346_ = _tmp345_;
			_g_free0 (_tmp344_);
			_g_free0 (_tmp342_);
			label = _tmp346_;
			_tmp347_ = label;
			gtk_widget_set_visible ((GtkWidget*) _tmp347_, TRUE);
			_tmp348_ = label;
			gtk_label_set_use_markup (_tmp348_, TRUE);
			_tmp349_ = label;
			gtk_widget_set_halign ((GtkWidget*) _tmp349_, GTK_ALIGN_START);
			_tmp350_ = label;
			gtk_widget_set_valign ((GtkWidget*) _tmp350_, GTK_ALIGN_START);
			_tmp351_ = self->priv->details_grid;
			_tmp352_ = label;
			_tmp353_ = previous_widget;
			gtk_grid_attach_next_to (_tmp351_, (GtkWidget*) _tmp352_, _tmp353_, GTK_POS_BOTTOM, 1, 1);
			_tmp354_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
			g_object_ref_sink (_tmp354_);
			box = _tmp354_;
			_tmp355_ = box;
			gtk_widget_set_visible ((GtkWidget*) _tmp355_, TRUE);
			_tmp356_ = pamac_alpm_package_get_validations (pkg);
			_tmp357_ = _tmp356_;
			{
				GPtrArray* name_collection = NULL;
				guint name_index = 0U;
				name_collection = _tmp357_;
				for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
					const gchar* name = NULL;
					name = (const gchar*) g_ptr_array_index (name_collection, name_index);
					{
						GtkLabel* label2 = NULL;
						const gchar* _tmp358_;
						GtkLabel* _tmp359_;
						GtkLabel* _tmp360_;
						GtkLabel* _tmp361_;
						GtkBox* _tmp362_;
						GtkLabel* _tmp363_;
						_tmp358_ = name;
						_tmp359_ = (GtkLabel*) gtk_label_new (_tmp358_);
						g_object_ref_sink (_tmp359_);
						label2 = _tmp359_;
						_tmp360_ = label2;
						gtk_widget_set_visible ((GtkWidget*) _tmp360_, TRUE);
						_tmp361_ = label2;
						gtk_widget_set_halign ((GtkWidget*) _tmp361_, GTK_ALIGN_START);
						_tmp362_ = box;
						_tmp363_ = label2;
						gtk_container_add ((GtkContainer*) _tmp362_, (GtkWidget*) _tmp363_);
						_g_object_unref0 (label2);
					}
				}
			}
			_tmp364_ = self->priv->details_grid;
			_tmp365_ = box;
			_tmp366_ = label;
			gtk_grid_attach_next_to (_tmp364_, (GtkWidget*) _tmp365_, (GtkWidget*) _tmp366_, GTK_POS_RIGHT, 1, 1);
			_tmp367_ = label;
			_tmp368_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp367_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp367_) : NULL);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp368_;
			_g_object_unref0 (box);
			_g_object_unref0 (label);
		} else {
			GtkWidget* _tmp369_;
			GtkWidget* _tmp370_;
			_tmp369_ = previous_widget;
			_tmp370_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Validated By"), g_dgettext (NULL, "Unknown"), _tmp369_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp370_;
		}
		_tmp371_ = pamac_alpm_package_get_backups (pkg);
		_tmp372_ = _tmp371_;
		_tmp373_ = vala_g_ptr_array_get_length (_tmp372_);
		_tmp374_ = _tmp373_;
		if (_tmp374_ != 0) {
			GtkLabel* label = NULL;
			gchar* _tmp375_;
			gchar* _tmp376_;
			gchar* _tmp377_;
			gchar* _tmp378_;
			GtkLabel* _tmp379_;
			GtkLabel* _tmp380_;
			GtkLabel* _tmp381_;
			GtkLabel* _tmp382_;
			GtkLabel* _tmp383_;
			GtkLabel* _tmp384_;
			GtkGrid* _tmp385_;
			GtkLabel* _tmp386_;
			GtkWidget* _tmp387_;
			GtkBox* box = NULL;
			GtkBox* _tmp388_;
			GtkBox* _tmp389_;
			GPtrArray* _tmp390_;
			GPtrArray* _tmp391_;
			GtkGrid* _tmp398_;
			GtkBox* _tmp399_;
			GtkLabel* _tmp400_;
			_tmp375_ = g_strconcat (g_dgettext (NULL, "Backup files"), ":", NULL);
			_tmp376_ = _tmp375_;
			_tmp377_ = g_strdup_printf ("<b>%s</b>", _tmp376_);
			_tmp378_ = _tmp377_;
			_tmp379_ = (GtkLabel*) gtk_label_new (_tmp378_);
			g_object_ref_sink (_tmp379_);
			_tmp380_ = _tmp379_;
			_g_free0 (_tmp378_);
			_g_free0 (_tmp376_);
			label = _tmp380_;
			_tmp381_ = label;
			gtk_widget_set_visible ((GtkWidget*) _tmp381_, TRUE);
			_tmp382_ = label;
			gtk_label_set_use_markup (_tmp382_, TRUE);
			_tmp383_ = label;
			gtk_widget_set_halign ((GtkWidget*) _tmp383_, GTK_ALIGN_START);
			_tmp384_ = label;
			gtk_widget_set_valign ((GtkWidget*) _tmp384_, GTK_ALIGN_START);
			_tmp385_ = self->priv->details_grid;
			_tmp386_ = label;
			_tmp387_ = previous_widget;
			gtk_grid_attach_next_to (_tmp385_, (GtkWidget*) _tmp386_, _tmp387_, GTK_POS_BOTTOM, 1, 1);
			_tmp388_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
			g_object_ref_sink (_tmp388_);
			box = _tmp388_;
			_tmp389_ = box;
			gtk_widget_set_visible ((GtkWidget*) _tmp389_, TRUE);
			_tmp390_ = pamac_alpm_package_get_backups (pkg);
			_tmp391_ = _tmp390_;
			{
				GPtrArray* name_collection = NULL;
				guint name_index = 0U;
				name_collection = _tmp391_;
				for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
					const gchar* name = NULL;
					name = (const gchar*) g_ptr_array_index (name_collection, name_index);
					{
						GtkLabel* label2 = NULL;
						const gchar* _tmp392_;
						GtkLabel* _tmp393_;
						GtkLabel* _tmp394_;
						GtkLabel* _tmp395_;
						GtkBox* _tmp396_;
						GtkLabel* _tmp397_;
						_tmp392_ = name;
						_tmp393_ = (GtkLabel*) gtk_label_new (_tmp392_);
						g_object_ref_sink (_tmp393_);
						label2 = _tmp393_;
						_tmp394_ = label2;
						gtk_widget_set_visible ((GtkWidget*) _tmp394_, TRUE);
						_tmp395_ = label2;
						gtk_widget_set_halign ((GtkWidget*) _tmp395_, GTK_ALIGN_START);
						_tmp396_ = box;
						_tmp397_ = label2;
						gtk_container_add ((GtkContainer*) _tmp396_, (GtkWidget*) _tmp397_);
						_g_object_unref0 (label2);
					}
				}
			}
			_tmp398_ = self->priv->details_grid;
			_tmp399_ = box;
			_tmp400_ = label;
			gtk_grid_attach_next_to (_tmp398_, (GtkWidget*) _tmp399_, (GtkWidget*) _tmp400_, GTK_POS_RIGHT, 1, 1);
			_g_object_unref0 (box);
			_g_object_unref0 (label);
		}
	}
	pamac_manager_window_clear_deps_box (self);
	_tmp401_ = pamac_alpm_package_get_depends (pkg);
	_tmp402_ = _tmp401_;
	_tmp403_ = vala_g_ptr_array_get_length (_tmp402_);
	_tmp404_ = _tmp403_;
	if (_tmp404_ != 0) {
		GPtrArray* _tmp405_;
		GPtrArray* _tmp406_;
		_tmp405_ = pamac_alpm_package_get_depends (pkg);
		_tmp406_ = _tmp405_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Depends On"), _tmp406_, FALSE);
	}
	_tmp407_ = pamac_alpm_package_get_optdepends (pkg);
	_tmp408_ = _tmp407_;
	_tmp409_ = vala_g_ptr_array_get_length (_tmp408_);
	_tmp410_ = _tmp409_;
	if (_tmp410_ != 0) {
		GPtrArray* _tmp411_;
		GPtrArray* _tmp412_;
		_tmp411_ = pamac_alpm_package_get_optdepends (pkg);
		_tmp412_ = _tmp411_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Optional Dependencies"), _tmp412_, TRUE);
	}
	_tmp413_ = pamac_alpm_package_get_requiredby (pkg);
	_tmp414_ = _tmp413_;
	_tmp415_ = vala_g_ptr_array_get_length (_tmp414_);
	_tmp416_ = _tmp415_;
	if (_tmp416_ != 0) {
		GPtrArray* _tmp417_;
		GPtrArray* _tmp418_;
		_tmp417_ = pamac_alpm_package_get_requiredby (pkg);
		_tmp418_ = _tmp417_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Required By"), _tmp418_, FALSE);
	}
	_tmp419_ = pamac_alpm_package_get_optionalfor (pkg);
	_tmp420_ = _tmp419_;
	_tmp421_ = vala_g_ptr_array_get_length (_tmp420_);
	_tmp422_ = _tmp421_;
	if (_tmp422_ != 0) {
		GPtrArray* _tmp423_;
		GPtrArray* _tmp424_;
		_tmp423_ = pamac_alpm_package_get_optionalfor (pkg);
		_tmp424_ = _tmp423_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Optional For"), _tmp424_, FALSE);
	}
	_tmp425_ = pamac_alpm_package_get_provides (pkg);
	_tmp426_ = _tmp425_;
	_tmp427_ = vala_g_ptr_array_get_length (_tmp426_);
	_tmp428_ = _tmp427_;
	if (_tmp428_ != 0) {
		GPtrArray* _tmp429_;
		GPtrArray* _tmp430_;
		_tmp429_ = pamac_alpm_package_get_provides (pkg);
		_tmp430_ = _tmp429_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Provides"), _tmp430_, FALSE);
	}
	_tmp431_ = pamac_alpm_package_get_replaces (pkg);
	_tmp432_ = _tmp431_;
	_tmp433_ = vala_g_ptr_array_get_length (_tmp432_);
	_tmp434_ = _tmp433_;
	if (_tmp434_ != 0) {
		GPtrArray* _tmp435_;
		GPtrArray* _tmp436_;
		_tmp435_ = pamac_alpm_package_get_replaces (pkg);
		_tmp436_ = _tmp435_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Replaces"), _tmp436_, FALSE);
	}
	_tmp437_ = pamac_alpm_package_get_conflicts (pkg);
	_tmp438_ = _tmp437_;
	_tmp439_ = vala_g_ptr_array_get_length (_tmp438_);
	_tmp440_ = _tmp439_;
	if (_tmp440_ != 0) {
		GPtrArray* _tmp441_;
		GPtrArray* _tmp442_;
		_tmp441_ = pamac_alpm_package_get_conflicts (pkg);
		_tmp442_ = _tmp441_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Conflicts With"), _tmp442_, FALSE);
	}
	_tmp443_ = self->priv->properties_stack;
	_tmp444_ = gtk_stack_get_visible_child_name (_tmp443_);
	_tmp445_ = _tmp444_;
	if (g_strcmp0 (_tmp445_, "files") == 0) {
		GtkStack* _tmp446_;
		_tmp446_ = self->priv->properties_stack;
		gtk_stack_set_visible_child_name (_tmp446_, "details");
	}
	_tmp447_ = self->priv->properties_stack;
	_tmp448_ = gtk_stack_get_visible_child_name (_tmp447_);
	_tmp449_ = _tmp448_;
	if (g_strcmp0 (_tmp449_, "build_files") == 0) {
		GtkStack* _tmp450_;
		_tmp450_ = self->priv->properties_stack;
		gtk_stack_set_visible_child_name (_tmp450_, "details");
	}
	_g_object_unref0 (previous_widget);
	_g_free0 (escaped_url);
}

static void
pamac_manager_window_set_aur_details (PamacManagerWindow* self,
                                      PamacAURPackage* aur_pkg)
{
	GtkBox* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkToggleButton* _tmp4_;
	GtkToggleButton* _tmp5_;
	GtkLabel* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkImage* _tmp13_;
	GdkPixbuf* _tmp14_;
	GtkLabel* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	GtkLabel* _tmp18_;
	GtkStack* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	gchar* aur_url = NULL;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	const gchar* url = NULL;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	GtkWidget* previous_widget = NULL;
	const gchar* _tmp58_;
	const gchar* _tmp59_;
	const gchar* _tmp66_;
	const gchar* _tmp67_;
	GtkWidget* _tmp68_;
	GtkWidget* _tmp69_;
	const gchar* _tmp70_;
	const gchar* _tmp71_;
	const gchar* _tmp72_;
	const gchar* _tmp73_;
	const gchar* _tmp78_;
	const gchar* _tmp79_;
	GtkWidget* _tmp80_;
	GtkWidget* _tmp81_;
	GDateTime* _tmp82_;
	GDateTime* _tmp83_;
	GDateTime* _tmp92_;
	GDateTime* _tmp93_;
	guint64 _tmp102_;
	guint64 _tmp103_;
	gchar* _tmp104_;
	gchar* _tmp105_;
	GtkWidget* _tmp106_;
	GtkWidget* _tmp107_;
	GDateTime* _tmp108_;
	GDateTime* _tmp109_;
	const gchar* _tmp116_;
	const gchar* _tmp117_;
	GPtrArray* _tmp240_;
	GPtrArray* _tmp241_;
	gint _tmp242_;
	gint _tmp243_;
	GPtrArray* _tmp246_;
	GPtrArray* _tmp247_;
	gint _tmp248_;
	gint _tmp249_;
	GPtrArray* _tmp252_;
	GPtrArray* _tmp253_;
	gint _tmp254_;
	gint _tmp255_;
	GPtrArray* _tmp258_;
	GPtrArray* _tmp259_;
	gint _tmp260_;
	gint _tmp261_;
	GPtrArray* _tmp264_;
	GPtrArray* _tmp265_;
	gint _tmp266_;
	gint _tmp267_;
	GPtrArray* _tmp270_;
	GPtrArray* _tmp271_;
	gint _tmp272_;
	gint _tmp273_;
	GPtrArray* _tmp276_;
	GPtrArray* _tmp277_;
	gint _tmp278_;
	gint _tmp279_;
	GtkStack* _tmp282_;
	const gchar* _tmp283_;
	const gchar* _tmp284_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (aur_pkg != NULL);
	pamac_manager_window_clear_details_grid (self);
	pamac_manager_window_clear_deps_box (self);
	pamac_manager_window_on_packages_leaflet_folded_changed (self);
	pamac_manager_window_clear_screenshots_carousel (self);
	_tmp0_ = self->priv->screenshots_box;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = self->priv->previous_screenshot_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
	_tmp2_ = self->priv->next_screenshot_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, FALSE);
	_tmp3_ = self->priv->launch_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp3_, FALSE);
	_tmp4_ = self->priv->reinstall_togglebutton;
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, FALSE);
	_tmp5_ = self->priv->install_togglebutton;
	gtk_widget_set_visible ((GtkWidget*) _tmp5_, FALSE);
	_tmp6_ = self->priv->name_label;
	_tmp7_ = pamac_package_get_name ((PamacPackage*) aur_pkg);
	_tmp8_ = _tmp7_;
	_tmp9_ = pamac_package_get_version ((PamacPackage*) aur_pkg);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strdup_printf ("<big><b>%s  %s</b></big>", _tmp8_, _tmp10_);
	_tmp12_ = _tmp11_;
	gtk_label_set_markup (_tmp6_, _tmp12_);
	_g_free0 (_tmp12_);
	_tmp13_ = self->priv->app_image;
	_tmp14_ = self->priv->package_icon;
	g_object_set (_tmp13_, "pixbuf", _tmp14_, NULL);
	_tmp15_ = self->priv->desc_label;
	_tmp16_ = pamac_package_get_desc ((PamacPackage*) aur_pkg);
	_tmp17_ = _tmp16_;
	gtk_label_set_text (_tmp15_, _tmp17_);
	_tmp18_ = self->priv->long_desc_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp18_, FALSE);
	_tmp19_ = self->view_stack;
	_tmp20_ = gtk_stack_get_visible_child_name (_tmp19_);
	_tmp21_ = _tmp20_;
	if (g_strcmp0 (_tmp21_, "updates") == 0) {
		GtkToggleButton* _tmp22_;
		GtkToggleButton* _tmp23_;
		_tmp22_ = self->priv->build_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp22_, FALSE);
		_tmp23_ = self->priv->remove_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp23_, FALSE);
	} else {
		GtkToggleButton* _tmp24_;
		GtkToggleButton* _tmp25_;
		GHashTable* _tmp26_;
		const gchar* _tmp27_;
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		const gchar* _tmp30_;
		_tmp24_ = self->priv->build_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp24_, TRUE);
		_tmp25_ = self->priv->build_togglebutton;
		_tmp26_ = pamac_to_build;
		_tmp27_ = pamac_package_get_name ((PamacPackage*) aur_pkg);
		_tmp28_ = _tmp27_;
		gtk_toggle_button_set_active (_tmp25_, g_hash_table_contains (_tmp26_, _tmp28_));
		_tmp29_ = pamac_package_get_installed_version ((PamacPackage*) aur_pkg);
		_tmp30_ = _tmp29_;
		if (_tmp30_ != NULL) {
			GtkToggleButton* _tmp31_;
			GtkToggleButton* _tmp32_;
			GtkToggleButton* _tmp33_;
			GHashTable* _tmp34_;
			const gchar* _tmp35_;
			const gchar* _tmp36_;
			_tmp31_ = self->priv->remove_togglebutton;
			gtk_widget_set_visible ((GtkWidget*) _tmp31_, TRUE);
			_tmp32_ = self->priv->remove_togglebutton;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp32_, TRUE);
			_tmp33_ = self->priv->remove_togglebutton;
			_tmp34_ = pamac_to_remove;
			_tmp35_ = pamac_package_get_name ((PamacPackage*) aur_pkg);
			_tmp36_ = _tmp35_;
			gtk_toggle_button_set_active (_tmp33_, g_hash_table_contains (_tmp34_, _tmp36_));
		} else {
			GtkToggleButton* _tmp37_;
			_tmp37_ = self->priv->remove_togglebutton;
			gtk_widget_set_visible ((GtkWidget*) _tmp37_, FALSE);
		}
	}
	_tmp38_ = pamac_package_get_name ((PamacPackage*) aur_pkg);
	_tmp39_ = _tmp38_;
	_tmp40_ = g_strconcat ("http://aur.archlinux.org/packages/", _tmp39_, NULL);
	aur_url = _tmp40_;
	_tmp41_ = pamac_package_get_url ((PamacPackage*) aur_pkg);
	_tmp42_ = _tmp41_;
	url = _tmp42_;
	_tmp43_ = url;
	if (_tmp43_ != NULL) {
		gchar* escaped_url = NULL;
		const gchar* _tmp44_;
		gchar* _tmp45_;
		GtkLabel* _tmp46_;
		const gchar* _tmp47_;
		const gchar* _tmp48_;
		const gchar* _tmp49_;
		const gchar* _tmp50_;
		gchar* _tmp51_;
		gchar* _tmp52_;
		_tmp44_ = url;
		_tmp45_ = g_markup_escape_text (_tmp44_, (gssize) -1);
		escaped_url = _tmp45_;
		_tmp46_ = self->priv->link_label;
		_tmp47_ = escaped_url;
		_tmp48_ = escaped_url;
		_tmp49_ = aur_url;
		_tmp50_ = aur_url;
		_tmp51_ = g_strdup_printf ("<a href=\"%s\">%s</a>\n\n<a href=\"%s\">%s</a>", _tmp47_, _tmp48_, _tmp49_, _tmp50_);
		_tmp52_ = _tmp51_;
		gtk_label_set_markup (_tmp46_, _tmp52_);
		_g_free0 (_tmp52_);
		_g_free0 (escaped_url);
	} else {
		GtkLabel* _tmp53_;
		const gchar* _tmp54_;
		const gchar* _tmp55_;
		gchar* _tmp56_;
		gchar* _tmp57_;
		_tmp53_ = self->priv->link_label;
		_tmp54_ = aur_url;
		_tmp55_ = aur_url;
		_tmp56_ = g_strdup_printf ("<a href=\"%s\">%s</a>", _tmp54_, _tmp55_);
		_tmp57_ = _tmp56_;
		gtk_label_set_markup (_tmp53_, _tmp57_);
		_g_free0 (_tmp57_);
	}
	previous_widget = NULL;
	_tmp58_ = pamac_package_get_license ((PamacPackage*) aur_pkg);
	_tmp59_ = _tmp58_;
	if (_tmp59_ != NULL) {
		const gchar* _tmp60_;
		const gchar* _tmp61_;
		GtkWidget* _tmp62_;
		GtkWidget* _tmp63_;
		_tmp60_ = pamac_package_get_license ((PamacPackage*) aur_pkg);
		_tmp61_ = _tmp60_;
		_tmp62_ = previous_widget;
		_tmp63_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Licenses"), _tmp61_, _tmp62_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp63_;
	} else {
		GtkWidget* _tmp64_;
		GtkWidget* _tmp65_;
		_tmp64_ = previous_widget;
		_tmp65_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Licenses"), g_dgettext (NULL, "Unknown"), _tmp64_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp65_;
	}
	_tmp66_ = pamac_package_get_repo ((PamacPackage*) aur_pkg);
	_tmp67_ = _tmp66_;
	_tmp68_ = previous_widget;
	_tmp69_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Repository"), _tmp67_, _tmp68_);
	_g_object_unref0 (previous_widget);
	previous_widget = _tmp69_;
	_tmp70_ = pamac_aur_package_get_packagebase (aur_pkg);
	_tmp71_ = _tmp70_;
	_tmp72_ = pamac_package_get_name ((PamacPackage*) aur_pkg);
	_tmp73_ = _tmp72_;
	if (g_strcmp0 (_tmp71_, _tmp73_) != 0) {
		const gchar* _tmp74_;
		const gchar* _tmp75_;
		GtkWidget* _tmp76_;
		GtkWidget* _tmp77_;
		_tmp74_ = pamac_aur_package_get_packagebase (aur_pkg);
		_tmp75_ = _tmp74_;
		_tmp76_ = previous_widget;
		_tmp77_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Package Base"), _tmp75_, _tmp76_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp77_;
	}
	_tmp78_ = pamac_aur_package_get_maintainer (aur_pkg);
	_tmp79_ = _tmp78_;
	_tmp80_ = previous_widget;
	_tmp81_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Maintainer"), _tmp79_, _tmp80_);
	_g_object_unref0 (previous_widget);
	previous_widget = _tmp81_;
	_tmp82_ = pamac_aur_package_get_firstsubmitted (aur_pkg);
	_tmp83_ = _tmp82_;
	if (_tmp83_ != NULL) {
		GDateTime* _tmp84_;
		GDateTime* _tmp85_;
		gchar* _tmp86_;
		gchar* _tmp87_;
		GtkWidget* _tmp88_;
		GtkWidget* _tmp89_;
		_tmp84_ = pamac_aur_package_get_firstsubmitted (aur_pkg);
		_tmp85_ = _tmp84_;
		_tmp86_ = g_date_time_format (_tmp85_, "%c");
		_tmp87_ = _tmp86_;
		_tmp88_ = previous_widget;
		_tmp89_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "First Submitted"), _tmp87_, _tmp88_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp89_;
		_g_free0 (_tmp87_);
	} else {
		GtkWidget* _tmp90_;
		GtkWidget* _tmp91_;
		_tmp90_ = previous_widget;
		_tmp91_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "First Submitted"), g_dgettext (NULL, "Unknown"), _tmp90_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp91_;
	}
	_tmp92_ = pamac_aur_package_get_lastmodified (aur_pkg);
	_tmp93_ = _tmp92_;
	if (_tmp93_ != NULL) {
		GDateTime* _tmp94_;
		GDateTime* _tmp95_;
		gchar* _tmp96_;
		gchar* _tmp97_;
		GtkWidget* _tmp98_;
		GtkWidget* _tmp99_;
		_tmp94_ = pamac_aur_package_get_lastmodified (aur_pkg);
		_tmp95_ = _tmp94_;
		_tmp96_ = g_date_time_format (_tmp95_, "%c");
		_tmp97_ = _tmp96_;
		_tmp98_ = previous_widget;
		_tmp99_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Last Modified"), _tmp97_, _tmp98_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp99_;
		_g_free0 (_tmp97_);
	} else {
		GtkWidget* _tmp100_;
		GtkWidget* _tmp101_;
		_tmp100_ = previous_widget;
		_tmp101_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Last Modified"), g_dgettext (NULL, "Unknown"), _tmp100_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp101_;
	}
	_tmp102_ = pamac_aur_package_get_numvotes (aur_pkg);
	_tmp103_ = _tmp102_;
	_tmp104_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp103_);
	_tmp105_ = _tmp104_;
	_tmp106_ = previous_widget;
	_tmp107_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Votes"), _tmp105_, _tmp106_);
	_g_object_unref0 (previous_widget);
	previous_widget = _tmp107_;
	_g_free0 (_tmp105_);
	_tmp108_ = pamac_aur_package_get_outofdate (aur_pkg);
	_tmp109_ = _tmp108_;
	if (_tmp109_ != NULL) {
		GDateTime* _tmp110_;
		GDateTime* _tmp111_;
		gchar* _tmp112_;
		gchar* _tmp113_;
		GtkWidget* _tmp114_;
		GtkWidget* _tmp115_;
		_tmp110_ = pamac_aur_package_get_outofdate (aur_pkg);
		_tmp111_ = _tmp110_;
		_tmp112_ = g_date_time_format (_tmp111_, "%c");
		_tmp113_ = _tmp112_;
		_tmp114_ = previous_widget;
		_tmp115_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Out of Date"), _tmp113_, _tmp114_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp115_;
		_g_free0 (_tmp113_);
	}
	_tmp116_ = pamac_package_get_installed_version ((PamacPackage*) aur_pkg);
	_tmp117_ = _tmp116_;
	if (_tmp117_ != NULL) {
		const gchar* _tmp118_;
		const gchar* _tmp119_;
		GDateTime* _tmp148_;
		GDateTime* _tmp149_;
		GDateTime* _tmp158_;
		GDateTime* _tmp159_;
		const gchar* _tmp168_;
		const gchar* _tmp169_;
		GPtrArray* _tmp176_;
		GPtrArray* _tmp177_;
		gint _tmp178_;
		gint _tmp179_;
		GPtrArray* _tmp210_;
		GPtrArray* _tmp211_;
		gint _tmp212_;
		gint _tmp213_;
		_tmp118_ = pamac_alpm_package_get_packager ((PamacAlpmPackage*) aur_pkg);
		_tmp119_ = _tmp118_;
		if (_tmp119_ != NULL) {
			gchar** splitted = NULL;
			const gchar* _tmp120_;
			const gchar* _tmp121_;
			gchar** _tmp122_;
			gchar** _tmp123_;
			gint splitted_length1;
			gint _splitted_size_;
			const gchar* packager_name = NULL;
			gchar** _tmp124_;
			gint _tmp124__length1;
			const gchar* _tmp125_;
			gchar** _tmp126_;
			gint _tmp126__length1;
			_tmp120_ = pamac_alpm_package_get_packager ((PamacAlpmPackage*) aur_pkg);
			_tmp121_ = _tmp120_;
			_tmp123_ = _tmp122_ = g_strsplit (_tmp121_, "<", 2);
			splitted = _tmp123_;
			splitted_length1 = _vala_array_length (_tmp122_);
			_splitted_size_ = splitted_length1;
			_tmp124_ = splitted;
			_tmp124__length1 = splitted_length1;
			_tmp125_ = _tmp124_[0];
			packager_name = _tmp125_;
			_tmp126_ = splitted;
			_tmp126__length1 = splitted_length1;
			if (_tmp126__length1 > 1) {
				gchar* packager_mail = NULL;
				gchar** _tmp127_;
				gint _tmp127__length1;
				const gchar* _tmp128_;
				gchar** _tmp129_;
				gchar** _tmp130_;
				gchar** _tmp131_;
				gint _tmp131__length1;
				const gchar* _tmp132_;
				gchar* _tmp133_;
				gchar* _tmp134_;
				gchar* packager_detail = NULL;
				const gchar* _tmp135_;
				const gchar* _tmp136_;
				const gchar* _tmp137_;
				gchar* _tmp138_;
				const gchar* _tmp139_;
				GtkWidget* _tmp140_;
				GtkWidget* _tmp141_;
				_tmp127_ = splitted;
				_tmp127__length1 = splitted_length1;
				_tmp128_ = _tmp127_[1];
				_tmp130_ = _tmp129_ = g_strsplit (_tmp128_, ">", 2);
				_tmp131_ = _tmp130_;
				_tmp131__length1 = _vala_array_length (_tmp129_);
				_tmp132_ = _tmp131_[0];
				_tmp133_ = g_strdup (_tmp132_);
				_tmp134_ = _tmp133_;
				_tmp131_ = (_vala_array_free (_tmp131_, _tmp131__length1, (GDestroyNotify) g_free), NULL);
				packager_mail = _tmp134_;
				_tmp135_ = packager_name;
				_tmp136_ = packager_mail;
				_tmp137_ = packager_mail;
				_tmp138_ = g_strdup_printf ("%s <a href=\"mailto:%s\">%s</a>", _tmp135_, _tmp136_, _tmp137_);
				packager_detail = _tmp138_;
				_tmp139_ = packager_detail;
				_tmp140_ = previous_widget;
				_tmp141_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Packager"), _tmp139_, _tmp140_);
				_g_object_unref0 (previous_widget);
				previous_widget = _tmp141_;
				_g_free0 (packager_detail);
				_g_free0 (packager_mail);
			} else {
				const gchar* _tmp142_;
				const gchar* _tmp143_;
				GtkWidget* _tmp144_;
				GtkWidget* _tmp145_;
				_tmp142_ = pamac_alpm_package_get_packager ((PamacAlpmPackage*) aur_pkg);
				_tmp143_ = _tmp142_;
				_tmp144_ = previous_widget;
				_tmp145_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Packager"), _tmp143_, _tmp144_);
				_g_object_unref0 (previous_widget);
				previous_widget = _tmp145_;
			}
			splitted = (_vala_array_free (splitted, splitted_length1, (GDestroyNotify) g_free), NULL);
		} else {
			GtkWidget* _tmp146_;
			GtkWidget* _tmp147_;
			_tmp146_ = previous_widget;
			_tmp147_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Packager"), g_dgettext (NULL, "Unknown"), _tmp146_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp147_;
		}
		_tmp148_ = pamac_alpm_package_get_build_date ((PamacAlpmPackage*) aur_pkg);
		_tmp149_ = _tmp148_;
		if (_tmp149_ != NULL) {
			GDateTime* _tmp150_;
			GDateTime* _tmp151_;
			gchar* _tmp152_;
			gchar* _tmp153_;
			GtkWidget* _tmp154_;
			GtkWidget* _tmp155_;
			_tmp150_ = pamac_alpm_package_get_build_date ((PamacAlpmPackage*) aur_pkg);
			_tmp151_ = _tmp150_;
			_tmp152_ = g_date_time_format (_tmp151_, "%c");
			_tmp153_ = _tmp152_;
			_tmp154_ = previous_widget;
			_tmp155_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Build Date"), _tmp153_, _tmp154_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp155_;
			_g_free0 (_tmp153_);
		} else {
			GtkWidget* _tmp156_;
			GtkWidget* _tmp157_;
			_tmp156_ = previous_widget;
			_tmp157_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Build Date"), g_dgettext (NULL, "Unknown"), _tmp156_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp157_;
		}
		_tmp158_ = pamac_package_get_install_date ((PamacPackage*) aur_pkg);
		_tmp159_ = _tmp158_;
		if (_tmp159_ != NULL) {
			GDateTime* _tmp160_;
			GDateTime* _tmp161_;
			gchar* _tmp162_;
			gchar* _tmp163_;
			GtkWidget* _tmp164_;
			GtkWidget* _tmp165_;
			_tmp160_ = pamac_package_get_install_date ((PamacPackage*) aur_pkg);
			_tmp161_ = _tmp160_;
			_tmp162_ = g_date_time_format (_tmp161_, "%c");
			_tmp163_ = _tmp162_;
			_tmp164_ = previous_widget;
			_tmp165_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Install Date"), _tmp163_, _tmp164_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp165_;
			_g_free0 (_tmp163_);
		} else {
			GtkWidget* _tmp166_;
			GtkWidget* _tmp167_;
			_tmp166_ = previous_widget;
			_tmp167_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Install Date"), g_dgettext (NULL, "Unknown"), _tmp166_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp167_;
		}
		_tmp168_ = pamac_alpm_package_get_reason ((PamacAlpmPackage*) aur_pkg);
		_tmp169_ = _tmp168_;
		if (_tmp169_ != NULL) {
			const gchar* _tmp170_;
			const gchar* _tmp171_;
			GtkWidget* _tmp172_;
			GtkWidget* _tmp173_;
			_tmp170_ = pamac_alpm_package_get_reason ((PamacAlpmPackage*) aur_pkg);
			_tmp171_ = _tmp170_;
			_tmp172_ = previous_widget;
			_tmp173_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Install Reason"), _tmp171_, _tmp172_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp173_;
		} else {
			GtkWidget* _tmp174_;
			GtkWidget* _tmp175_;
			_tmp174_ = previous_widget;
			_tmp175_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Install Reason"), g_dgettext (NULL, "Unknown"), _tmp174_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp175_;
		}
		_tmp176_ = pamac_alpm_package_get_validations ((PamacAlpmPackage*) aur_pkg);
		_tmp177_ = _tmp176_;
		_tmp178_ = vala_g_ptr_array_get_length (_tmp177_);
		_tmp179_ = _tmp178_;
		if (_tmp179_ != 0) {
			GtkLabel* label = NULL;
			gchar* _tmp180_;
			gchar* _tmp181_;
			gchar* _tmp182_;
			gchar* _tmp183_;
			GtkLabel* _tmp184_;
			GtkLabel* _tmp185_;
			GtkLabel* _tmp186_;
			GtkLabel* _tmp187_;
			GtkLabel* _tmp188_;
			GtkLabel* _tmp189_;
			GtkGrid* _tmp190_;
			GtkLabel* _tmp191_;
			GtkWidget* _tmp192_;
			GtkBox* box = NULL;
			GtkBox* _tmp193_;
			GtkBox* _tmp194_;
			GPtrArray* _tmp195_;
			GPtrArray* _tmp196_;
			GtkGrid* _tmp203_;
			GtkBox* _tmp204_;
			GtkLabel* _tmp205_;
			GtkLabel* _tmp206_;
			GtkWidget* _tmp207_;
			_tmp180_ = g_strconcat (g_dgettext (NULL, "Validated By"), ":", NULL);
			_tmp181_ = _tmp180_;
			_tmp182_ = g_strdup_printf ("<b>%s</b>", _tmp181_);
			_tmp183_ = _tmp182_;
			_tmp184_ = (GtkLabel*) gtk_label_new (_tmp183_);
			g_object_ref_sink (_tmp184_);
			_tmp185_ = _tmp184_;
			_g_free0 (_tmp183_);
			_g_free0 (_tmp181_);
			label = _tmp185_;
			_tmp186_ = label;
			gtk_widget_set_visible ((GtkWidget*) _tmp186_, TRUE);
			_tmp187_ = label;
			gtk_label_set_use_markup (_tmp187_, TRUE);
			_tmp188_ = label;
			gtk_widget_set_halign ((GtkWidget*) _tmp188_, GTK_ALIGN_START);
			_tmp189_ = label;
			gtk_widget_set_valign ((GtkWidget*) _tmp189_, GTK_ALIGN_START);
			_tmp190_ = self->priv->details_grid;
			_tmp191_ = label;
			_tmp192_ = previous_widget;
			gtk_grid_attach_next_to (_tmp190_, (GtkWidget*) _tmp191_, _tmp192_, GTK_POS_BOTTOM, 1, 1);
			_tmp193_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
			g_object_ref_sink (_tmp193_);
			box = _tmp193_;
			_tmp194_ = box;
			gtk_widget_set_visible ((GtkWidget*) _tmp194_, TRUE);
			_tmp195_ = pamac_alpm_package_get_validations ((PamacAlpmPackage*) aur_pkg);
			_tmp196_ = _tmp195_;
			{
				GPtrArray* name_collection = NULL;
				guint name_index = 0U;
				name_collection = _tmp196_;
				for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
					const gchar* name = NULL;
					name = (const gchar*) g_ptr_array_index (name_collection, name_index);
					{
						GtkLabel* label2 = NULL;
						const gchar* _tmp197_;
						GtkLabel* _tmp198_;
						GtkLabel* _tmp199_;
						GtkLabel* _tmp200_;
						GtkBox* _tmp201_;
						GtkLabel* _tmp202_;
						_tmp197_ = name;
						_tmp198_ = (GtkLabel*) gtk_label_new (_tmp197_);
						g_object_ref_sink (_tmp198_);
						label2 = _tmp198_;
						_tmp199_ = label2;
						gtk_widget_set_visible ((GtkWidget*) _tmp199_, TRUE);
						_tmp200_ = label2;
						gtk_widget_set_halign ((GtkWidget*) _tmp200_, GTK_ALIGN_START);
						_tmp201_ = box;
						_tmp202_ = label2;
						gtk_container_add ((GtkContainer*) _tmp201_, (GtkWidget*) _tmp202_);
						_g_object_unref0 (label2);
					}
				}
			}
			_tmp203_ = self->priv->details_grid;
			_tmp204_ = box;
			_tmp205_ = label;
			gtk_grid_attach_next_to (_tmp203_, (GtkWidget*) _tmp204_, (GtkWidget*) _tmp205_, GTK_POS_RIGHT, 1, 1);
			_tmp206_ = label;
			_tmp207_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp206_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp206_) : NULL);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp207_;
			_g_object_unref0 (box);
			_g_object_unref0 (label);
		} else {
			GtkWidget* _tmp208_;
			GtkWidget* _tmp209_;
			_tmp208_ = previous_widget;
			_tmp209_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Validated By"), g_dgettext (NULL, "Unknown"), _tmp208_);
			_g_object_unref0 (previous_widget);
			previous_widget = _tmp209_;
		}
		_tmp210_ = pamac_alpm_package_get_backups ((PamacAlpmPackage*) aur_pkg);
		_tmp211_ = _tmp210_;
		_tmp212_ = vala_g_ptr_array_get_length (_tmp211_);
		_tmp213_ = _tmp212_;
		if (_tmp213_ != 0) {
			GtkLabel* label = NULL;
			gchar* _tmp214_;
			gchar* _tmp215_;
			gchar* _tmp216_;
			gchar* _tmp217_;
			GtkLabel* _tmp218_;
			GtkLabel* _tmp219_;
			GtkLabel* _tmp220_;
			GtkLabel* _tmp221_;
			GtkLabel* _tmp222_;
			GtkLabel* _tmp223_;
			GtkGrid* _tmp224_;
			GtkLabel* _tmp225_;
			GtkWidget* _tmp226_;
			GtkBox* box = NULL;
			GtkBox* _tmp227_;
			GtkBox* _tmp228_;
			GPtrArray* _tmp229_;
			GPtrArray* _tmp230_;
			GtkGrid* _tmp237_;
			GtkBox* _tmp238_;
			GtkLabel* _tmp239_;
			_tmp214_ = g_strconcat (g_dgettext (NULL, "Backup files"), ":", NULL);
			_tmp215_ = _tmp214_;
			_tmp216_ = g_strdup_printf ("<b>%s</b>", _tmp215_);
			_tmp217_ = _tmp216_;
			_tmp218_ = (GtkLabel*) gtk_label_new (_tmp217_);
			g_object_ref_sink (_tmp218_);
			_tmp219_ = _tmp218_;
			_g_free0 (_tmp217_);
			_g_free0 (_tmp215_);
			label = _tmp219_;
			_tmp220_ = label;
			gtk_widget_set_visible ((GtkWidget*) _tmp220_, TRUE);
			_tmp221_ = label;
			gtk_label_set_use_markup (_tmp221_, TRUE);
			_tmp222_ = label;
			gtk_widget_set_halign ((GtkWidget*) _tmp222_, GTK_ALIGN_START);
			_tmp223_ = label;
			gtk_widget_set_valign ((GtkWidget*) _tmp223_, GTK_ALIGN_START);
			_tmp224_ = self->priv->details_grid;
			_tmp225_ = label;
			_tmp226_ = previous_widget;
			gtk_grid_attach_next_to (_tmp224_, (GtkWidget*) _tmp225_, _tmp226_, GTK_POS_BOTTOM, 1, 1);
			_tmp227_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
			g_object_ref_sink (_tmp227_);
			box = _tmp227_;
			_tmp228_ = box;
			gtk_widget_set_visible ((GtkWidget*) _tmp228_, TRUE);
			_tmp229_ = pamac_alpm_package_get_backups ((PamacAlpmPackage*) aur_pkg);
			_tmp230_ = _tmp229_;
			{
				GPtrArray* name_collection = NULL;
				guint name_index = 0U;
				name_collection = _tmp230_;
				for (name_index = 0; name_index < name_collection->len; name_index = name_index + 1) {
					const gchar* name = NULL;
					name = (const gchar*) g_ptr_array_index (name_collection, name_index);
					{
						GtkLabel* label2 = NULL;
						const gchar* _tmp231_;
						GtkLabel* _tmp232_;
						GtkLabel* _tmp233_;
						GtkLabel* _tmp234_;
						GtkBox* _tmp235_;
						GtkLabel* _tmp236_;
						_tmp231_ = name;
						_tmp232_ = (GtkLabel*) gtk_label_new (_tmp231_);
						g_object_ref_sink (_tmp232_);
						label2 = _tmp232_;
						_tmp233_ = label2;
						gtk_widget_set_visible ((GtkWidget*) _tmp233_, TRUE);
						_tmp234_ = label2;
						gtk_widget_set_halign ((GtkWidget*) _tmp234_, GTK_ALIGN_START);
						_tmp235_ = box;
						_tmp236_ = label2;
						gtk_container_add ((GtkContainer*) _tmp235_, (GtkWidget*) _tmp236_);
						_g_object_unref0 (label2);
					}
				}
			}
			_tmp237_ = self->priv->details_grid;
			_tmp238_ = box;
			_tmp239_ = label;
			gtk_grid_attach_next_to (_tmp237_, (GtkWidget*) _tmp238_, (GtkWidget*) _tmp239_, GTK_POS_RIGHT, 1, 1);
			_g_object_unref0 (box);
			_g_object_unref0 (label);
		}
	}
	_tmp240_ = pamac_alpm_package_get_depends ((PamacAlpmPackage*) aur_pkg);
	_tmp241_ = _tmp240_;
	_tmp242_ = vala_g_ptr_array_get_length (_tmp241_);
	_tmp243_ = _tmp242_;
	if (_tmp243_ != 0) {
		GPtrArray* _tmp244_;
		GPtrArray* _tmp245_;
		_tmp244_ = pamac_alpm_package_get_depends ((PamacAlpmPackage*) aur_pkg);
		_tmp245_ = _tmp244_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Depends On"), _tmp245_, FALSE);
	}
	_tmp246_ = pamac_alpm_package_get_makedepends ((PamacAlpmPackage*) aur_pkg);
	_tmp247_ = _tmp246_;
	_tmp248_ = vala_g_ptr_array_get_length (_tmp247_);
	_tmp249_ = _tmp248_;
	if (_tmp249_ != 0) {
		GPtrArray* _tmp250_;
		GPtrArray* _tmp251_;
		_tmp250_ = pamac_alpm_package_get_makedepends ((PamacAlpmPackage*) aur_pkg);
		_tmp251_ = _tmp250_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Make Dependencies"), _tmp251_, FALSE);
	}
	_tmp252_ = pamac_alpm_package_get_checkdepends ((PamacAlpmPackage*) aur_pkg);
	_tmp253_ = _tmp252_;
	_tmp254_ = vala_g_ptr_array_get_length (_tmp253_);
	_tmp255_ = _tmp254_;
	if (_tmp255_ != 0) {
		GPtrArray* _tmp256_;
		GPtrArray* _tmp257_;
		_tmp256_ = pamac_alpm_package_get_checkdepends ((PamacAlpmPackage*) aur_pkg);
		_tmp257_ = _tmp256_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Check Dependencies"), _tmp257_, FALSE);
	}
	_tmp258_ = pamac_alpm_package_get_optdepends ((PamacAlpmPackage*) aur_pkg);
	_tmp259_ = _tmp258_;
	_tmp260_ = vala_g_ptr_array_get_length (_tmp259_);
	_tmp261_ = _tmp260_;
	if (_tmp261_ != 0) {
		GPtrArray* _tmp262_;
		GPtrArray* _tmp263_;
		_tmp262_ = pamac_alpm_package_get_optdepends ((PamacAlpmPackage*) aur_pkg);
		_tmp263_ = _tmp262_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Optional Dependencies"), _tmp263_, FALSE);
	}
	_tmp264_ = pamac_alpm_package_get_provides ((PamacAlpmPackage*) aur_pkg);
	_tmp265_ = _tmp264_;
	_tmp266_ = vala_g_ptr_array_get_length (_tmp265_);
	_tmp267_ = _tmp266_;
	if (_tmp267_ != 0) {
		GPtrArray* _tmp268_;
		GPtrArray* _tmp269_;
		_tmp268_ = pamac_alpm_package_get_provides ((PamacAlpmPackage*) aur_pkg);
		_tmp269_ = _tmp268_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Provides"), _tmp269_, FALSE);
	}
	_tmp270_ = pamac_alpm_package_get_replaces ((PamacAlpmPackage*) aur_pkg);
	_tmp271_ = _tmp270_;
	_tmp272_ = vala_g_ptr_array_get_length (_tmp271_);
	_tmp273_ = _tmp272_;
	if (_tmp273_ != 0) {
		GPtrArray* _tmp274_;
		GPtrArray* _tmp275_;
		_tmp274_ = pamac_alpm_package_get_replaces ((PamacAlpmPackage*) aur_pkg);
		_tmp275_ = _tmp274_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Replaces"), _tmp275_, FALSE);
	}
	_tmp276_ = pamac_alpm_package_get_conflicts ((PamacAlpmPackage*) aur_pkg);
	_tmp277_ = _tmp276_;
	_tmp278_ = vala_g_ptr_array_get_length (_tmp277_);
	_tmp279_ = _tmp278_;
	if (_tmp279_ != 0) {
		GPtrArray* _tmp280_;
		GPtrArray* _tmp281_;
		_tmp280_ = pamac_alpm_package_get_conflicts ((PamacAlpmPackage*) aur_pkg);
		_tmp281_ = _tmp280_;
		pamac_manager_window_populate_deps_box (self, g_dgettext (NULL, "Conflicts With"), _tmp281_, FALSE);
	}
	_tmp282_ = self->priv->properties_stack;
	_tmp283_ = gtk_stack_get_visible_child_name (_tmp282_);
	_tmp284_ = _tmp283_;
	if (g_strcmp0 (_tmp284_, "build_files") == 0) {
		GtkStack* _tmp285_;
		_tmp285_ = self->priv->properties_stack;
		gtk_stack_set_visible_child_name (_tmp285_, "details");
	}
	_g_object_unref0 (previous_widget);
	_g_free0 (aur_url);
}

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_)) {
		PamacManagerWindow* self;
		self = _data11_->self;
		_g_object_unref0 (_data11_->snap_pkg);
		_g_object_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

static void
____lambda52_ (PamacManagerWindow* self,
               GObject* obj,
               GAsyncResult* res)
{
	GtkImage* _tmp0_;
	PamacTransactionGtk* _tmp1_;
	GdkPixbuf* _tmp2_;
	GdkPixbuf* _tmp3_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->app_image;
	_tmp1_ = self->transaction;
	_tmp2_ = pamac_transaction_gtk_get_icon_pixbuf_finish (_tmp1_, res);
	_tmp3_ = _tmp2_;
	g_object_set (_tmp0_, "pixbuf", _tmp3_, NULL);
	_g_object_unref0 (_tmp3_);
}

static void
_____lambda52__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda52_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
_____lambda53_ (Block11Data* _data11_,
                GObject* obj,
                GAsyncResult* res)
{
	PamacManagerWindow* self;
	gchar* downloaded_pixbuf_path = NULL;
	PamacDatabaseGtk* _tmp0_;
	gchar* _tmp1_;
	GError* _inner_error0_ = NULL;
	self = _data11_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_installed_snap_icon_finish ((PamacDatabase*) _tmp0_, res);
	downloaded_pixbuf_path = _tmp1_;
	{
		GdkPixbuf* _tmp2_ = NULL;
		GdkPixbuf* _tmp3_;
		GtkImage* _tmp4_;
		_tmp3_ = gdk_pixbuf_new_from_file_at_scale (downloaded_pixbuf_path, 64, 64, TRUE, &_inner_error0_);
		_tmp2_ = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp4_ = self->priv->app_image;
		g_object_set (_tmp4_, "pixbuf", _tmp2_, NULL);
		_g_object_unref0 (_tmp2_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		GError* _tmp7_;
		const gchar* _tmp8_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = pamac_package_get_name ((PamacPackage*) _data11_->snap_pkg);
		_tmp6_ = _tmp5_;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		g_warning ("manager_window.vala:1913: %s: %s", _tmp6_, _tmp8_);
		_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
______lambda53__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	_____lambda53_ (self, source_object, res);
	block11_data_unref (self);
}

static Block12Data*
block12_data_ref (Block12Data* _data12_)
{
	g_atomic_int_inc (&_data12_->_ref_count_);
	return _data12_;
}

static void
block12_data_unref (void * _userdata_)
{
	Block12Data* _data12_;
	_data12_ = (Block12Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data12_->_data11_->self;
		_g_free0 (_data12_->channel_name);
		block11_data_unref (_data12_->_data11_);
		_data12_->_data11_ = NULL;
		g_slice_free (Block12Data, _data12_);
	}
}

static void
___lambda56_ (PamacManagerWindow* self,
              GObject* obj,
              GAsyncResult* res)
{
	PamacSnapPackage* new_snap_pkg = NULL;
	PamacDatabaseGtk* _tmp0_;
	PamacSnapPackage* _tmp1_;
	PamacSnapPackage* _tmp2_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_snap_finish ((PamacDatabase*) _tmp0_, res);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	new_snap_pkg = _tmp2_;
	pamac_manager_window_set_snap_details (self, new_snap_pkg);
	_g_object_unref0 (new_snap_pkg);
}

static void
____lambda56__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda56_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
__lambda55_ (Block12Data* _data12_)
{
	Block11Data* _data11_;
	PamacManagerWindow* self;
	PamacTransactionGtk* _tmp0_;
	PamacPackage* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	_data11_ = _data12_->_data11_;
	self = _data11_->self;
	self->transaction_running = FALSE;
	_tmp0_ = self->transaction;
	pamac_transaction_gtk_reset_progress_box (_tmp0_);
	_tmp1_ = self->priv->current_package_displayed;
	_tmp2_ = pamac_package_get_name (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = pamac_package_get_name ((PamacPackage*) _data11_->snap_pkg);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp3_, _tmp5_) == 0) {
		PamacDatabaseGtk* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp6_ = self->priv->_database;
		_tmp7_ = pamac_package_get_name ((PamacPackage*) _data11_->snap_pkg);
		_tmp8_ = _tmp7_;
		pamac_database_get_snap_async ((PamacDatabase*) _tmp6_, _tmp8_, ____lambda56__gasync_ready_callback, g_object_ref (self));
	}
}

static void
___lambda55__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda55_ (self);
	block12_data_unref (self);
}

static void
________lambda54_ (Block12Data* _data12_,
                   GtkButton* button)
{
	Block11Data* _data11_;
	PamacManagerWindow* self;
	PamacTransactionGtk* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	_data11_ = _data12_->_data11_;
	self = _data11_->self;
	g_return_if_fail (button != NULL);
	self->transaction_running = TRUE;
	pamac_manager_window_set_snap_details (self, _data11_->snap_pkg);
	_tmp0_ = self->transaction;
	_tmp1_ = pamac_package_get_name ((PamacPackage*) _data11_->snap_pkg);
	_tmp2_ = _tmp1_;
	_tmp3_ = _data12_->channel_name;
	pamac_transaction_snap_switch_channel_async ((PamacTransaction*) _tmp0_, _tmp2_, _tmp3_, ___lambda55__gasync_ready_callback, block12_data_ref (_data12_));
}

static void
_________lambda54__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self)
{
	________lambda54_ (self, _sender);
}

static void
pamac_manager_window_set_snap_details (PamacManagerWindow* self,
                                       PamacSnapPackage* snap_pkg)
{
	Block11Data* _data11_;
	PamacSnapPackage* _tmp0_;
	GtkLabel* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* icon = NULL;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	GtkLabel* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	GtkLabel* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	GtkLabel* _tmp35_;
	gchar* escaped_url = NULL;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	gchar* _tmp38_;
	GtkLabel* _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	GtkWidget* previous_widget = NULL;
	const gchar* _tmp71_;
	const gchar* _tmp72_;
	const gchar* _tmp79_;
	const gchar* _tmp80_;
	GtkWidget* _tmp81_;
	GtkWidget* _tmp82_;
	const gchar* _tmp83_;
	const gchar* _tmp84_;
	const gchar* _tmp89_;
	const gchar* _tmp90_;
	GDateTime* _tmp95_;
	GDateTime* _tmp96_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (snap_pkg != NULL);
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	_data11_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (snap_pkg);
	_g_object_unref0 (_data11_->snap_pkg);
	_data11_->snap_pkg = _tmp0_;
	pamac_manager_window_on_packages_leaflet_folded_changed (self);
	pamac_manager_window_clear_screenshots_carousel (self);
	pamac_manager_window_set_screenshots (self, (PamacPackage*) _data11_->snap_pkg);
	_tmp1_ = self->priv->name_label;
	_tmp2_ = pamac_package_get_app_name ((PamacPackage*) _data11_->snap_pkg);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_markup_escape_text (_tmp3_, (gssize) -1);
	_tmp5_ = _tmp4_;
	_tmp6_ = pamac_package_get_version ((PamacPackage*) _data11_->snap_pkg);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf ("<big><b>%s  %s</b></big>", _tmp5_, _tmp7_);
	_tmp9_ = _tmp8_;
	gtk_label_set_markup (_tmp1_, _tmp9_);
	_g_free0 (_tmp9_);
	_g_free0 (_tmp5_);
	_tmp10_ = pamac_package_get_icon ((PamacPackage*) _data11_->snap_pkg);
	_tmp11_ = _tmp10_;
	icon = _tmp11_;
	_tmp12_ = icon;
	if (_tmp12_ != NULL) {
		const gchar* _tmp13_;
		_tmp13_ = icon;
		if (g_str_has_prefix (_tmp13_, "http")) {
			GtkImage* _tmp14_;
			GdkPixbuf* _tmp15_;
			PamacTransactionGtk* _tmp16_;
			const gchar* _tmp17_;
			_tmp14_ = self->priv->app_image;
			_tmp15_ = self->priv->package_icon;
			g_object_set (_tmp14_, "pixbuf", _tmp15_, NULL);
			_tmp16_ = self->transaction;
			_tmp17_ = icon;
			pamac_transaction_gtk_get_icon_pixbuf (_tmp16_, _tmp17_, _____lambda52__gasync_ready_callback, g_object_ref (self));
		} else {
			{
				GdkPixbuf* pixbuf = NULL;
				const gchar* _tmp18_;
				GdkPixbuf* _tmp19_;
				GtkImage* _tmp20_;
				GdkPixbuf* _tmp21_;
				_tmp18_ = icon;
				_tmp19_ = gdk_pixbuf_new_from_file (_tmp18_, &_inner_error0_);
				pixbuf = _tmp19_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				_tmp20_ = self->priv->app_image;
				_tmp21_ = pixbuf;
				g_object_set (_tmp20_, "pixbuf", _tmp21_, NULL);
				_g_object_unref0 (pixbuf);
			}
			goto __finally0;
			__catch0_g_error:
			{
				GtkImage* _tmp22_;
				GdkPixbuf* _tmp23_;
				PamacDatabaseGtk* _tmp24_;
				const gchar* _tmp25_;
				const gchar* _tmp26_;
				g_clear_error (&_inner_error0_);
				_tmp22_ = self->priv->app_image;
				_tmp23_ = self->priv->package_icon;
				g_object_set (_tmp22_, "pixbuf", _tmp23_, NULL);
				_tmp24_ = self->priv->_database;
				_tmp25_ = pamac_package_get_name ((PamacPackage*) _data11_->snap_pkg);
				_tmp26_ = _tmp25_;
				pamac_database_get_installed_snap_icon_async ((PamacDatabase*) _tmp24_, _tmp26_, ______lambda53__gasync_ready_callback, block11_data_ref (_data11_));
			}
			__finally0:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				block11_data_unref (_data11_);
				_data11_ = 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 {
		GtkImage* _tmp27_;
		GdkPixbuf* _tmp28_;
		_tmp27_ = self->priv->app_image;
		_tmp28_ = self->priv->package_icon;
		g_object_set (_tmp27_, "pixbuf", _tmp28_, NULL);
	}
	_tmp29_ = self->priv->desc_label;
	_tmp30_ = pamac_package_get_desc ((PamacPackage*) _data11_->snap_pkg);
	_tmp31_ = _tmp30_;
	gtk_label_set_text (_tmp29_, _tmp31_);
	_tmp32_ = self->priv->long_desc_label;
	_tmp33_ = pamac_package_get_long_desc ((PamacPackage*) _data11_->snap_pkg);
	_tmp34_ = _tmp33_;
	gtk_label_set_text (_tmp32_, _tmp34_);
	_tmp35_ = self->priv->long_desc_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp35_, TRUE);
	_tmp36_ = pamac_package_get_url ((PamacPackage*) _data11_->snap_pkg);
	_tmp37_ = _tmp36_;
	_tmp38_ = g_markup_escape_text (_tmp37_, (gssize) -1);
	escaped_url = _tmp38_;
	_tmp39_ = self->priv->link_label;
	_tmp40_ = escaped_url;
	_tmp41_ = escaped_url;
	_tmp42_ = g_strdup_printf ("<a href=\"%s\">%s</a>", _tmp40_, _tmp41_);
	_tmp43_ = _tmp42_;
	gtk_label_set_markup (_tmp39_, _tmp43_);
	_g_free0 (_tmp43_);
	_tmp44_ = pamac_package_get_installed_version ((PamacPackage*) _data11_->snap_pkg);
	_tmp45_ = _tmp44_;
	if (_tmp45_ != NULL) {
		const gchar* launchable = NULL;
		const gchar* _tmp46_;
		const gchar* _tmp47_;
		const gchar* _tmp48_;
		GtkToggleButton* _tmp53_;
		GtkToggleButton* _tmp54_;
		GtkToggleButton* _tmp55_;
		GtkToggleButton* _tmp56_;
		GtkToggleButton* _tmp57_;
		GtkToggleButton* _tmp58_;
		GHashTable* _tmp59_;
		const gchar* _tmp60_;
		const gchar* _tmp61_;
		_tmp46_ = pamac_package_get_launchable ((PamacPackage*) _data11_->snap_pkg);
		_tmp47_ = _tmp46_;
		launchable = _tmp47_;
		_tmp48_ = launchable;
		if (_tmp48_ != NULL) {
			GtkButton* _tmp49_;
			const gchar* _tmp50_;
			gchar* _tmp51_;
			_tmp49_ = self->priv->launch_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp49_, TRUE);
			_tmp50_ = launchable;
			_tmp51_ = g_strdup (_tmp50_);
			_g_free0 (self->priv->current_launchable);
			self->priv->current_launchable = _tmp51_;
		} else {
			GtkButton* _tmp52_;
			_tmp52_ = self->priv->launch_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp52_, FALSE);
		}
		_tmp53_ = self->priv->install_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp53_, FALSE);
		_tmp54_ = self->priv->build_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp54_, FALSE);
		_tmp55_ = self->priv->reinstall_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp55_, FALSE);
		_tmp56_ = self->priv->remove_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp56_, TRUE);
		_tmp57_ = self->priv->remove_togglebutton;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp57_, TRUE);
		_tmp58_ = self->priv->remove_togglebutton;
		_tmp59_ = pamac_snap_to_remove;
		_tmp60_ = pamac_package_get_name ((PamacPackage*) _data11_->snap_pkg);
		_tmp61_ = _tmp60_;
		gtk_toggle_button_set_active (_tmp58_, g_hash_table_contains (_tmp59_, _tmp61_));
	} else {
		GtkButton* _tmp62_;
		GtkToggleButton* _tmp63_;
		GtkToggleButton* _tmp64_;
		GtkToggleButton* _tmp65_;
		GtkToggleButton* _tmp66_;
		GtkToggleButton* _tmp67_;
		GHashTable* _tmp68_;
		const gchar* _tmp69_;
		const gchar* _tmp70_;
		_tmp62_ = self->priv->launch_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp62_, FALSE);
		_tmp63_ = self->priv->remove_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp63_, FALSE);
		_tmp64_ = self->priv->reinstall_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp64_, FALSE);
		_tmp65_ = self->priv->build_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp65_, FALSE);
		_tmp66_ = self->priv->install_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp66_, TRUE);
		_tmp67_ = self->priv->install_togglebutton;
		_tmp68_ = pamac_snap_to_install;
		_tmp69_ = pamac_package_get_name ((PamacPackage*) _data11_->snap_pkg);
		_tmp70_ = _tmp69_;
		gtk_toggle_button_set_active (_tmp67_, g_hash_table_contains (_tmp68_, _tmp70_));
	}
	pamac_manager_window_clear_details_grid (self);
	previous_widget = NULL;
	_tmp71_ = pamac_package_get_license ((PamacPackage*) _data11_->snap_pkg);
	_tmp72_ = _tmp71_;
	if (_tmp72_ != NULL) {
		const gchar* _tmp73_;
		const gchar* _tmp74_;
		GtkWidget* _tmp75_;
		GtkWidget* _tmp76_;
		_tmp73_ = pamac_package_get_license ((PamacPackage*) _data11_->snap_pkg);
		_tmp74_ = _tmp73_;
		_tmp75_ = previous_widget;
		_tmp76_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Licenses"), _tmp74_, _tmp75_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp76_;
	} else {
		GtkWidget* _tmp77_;
		GtkWidget* _tmp78_;
		_tmp77_ = previous_widget;
		_tmp78_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Licenses"), g_dgettext (NULL, "Unknown"), _tmp77_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp78_;
	}
	_tmp79_ = pamac_package_get_repo ((PamacPackage*) _data11_->snap_pkg);
	_tmp80_ = _tmp79_;
	_tmp81_ = previous_widget;
	_tmp82_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Repository"), _tmp80_, _tmp81_);
	_g_object_unref0 (previous_widget);
	previous_widget = _tmp82_;
	_tmp83_ = pamac_snap_package_get_publisher (_data11_->snap_pkg);
	_tmp84_ = _tmp83_;
	if (_tmp84_ != NULL) {
		const gchar* _tmp85_;
		const gchar* _tmp86_;
		GtkWidget* _tmp87_;
		GtkWidget* _tmp88_;
		_tmp85_ = pamac_snap_package_get_publisher (_data11_->snap_pkg);
		_tmp86_ = _tmp85_;
		_tmp87_ = previous_widget;
		_tmp88_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Publisher"), _tmp86_, _tmp87_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp88_;
	}
	_tmp89_ = pamac_snap_package_get_confined (_data11_->snap_pkg);
	_tmp90_ = _tmp89_;
	if (_tmp90_ != NULL) {
		const gchar* _tmp91_;
		const gchar* _tmp92_;
		GtkWidget* _tmp93_;
		GtkWidget* _tmp94_;
		_tmp91_ = pamac_snap_package_get_confined (_data11_->snap_pkg);
		_tmp92_ = _tmp91_;
		_tmp93_ = previous_widget;
		_tmp94_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Confined in a Sandbox"), _tmp92_, _tmp93_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp94_;
	}
	_tmp95_ = pamac_package_get_install_date ((PamacPackage*) _data11_->snap_pkg);
	_tmp96_ = _tmp95_;
	if (_tmp96_ != NULL) {
		GDateTime* _tmp97_;
		GDateTime* _tmp98_;
		gchar* _tmp99_;
		gchar* _tmp100_;
		GtkWidget* _tmp101_;
		GtkWidget* _tmp102_;
		GPtrArray* _tmp103_;
		GPtrArray* _tmp104_;
		gint _tmp105_;
		gint _tmp106_;
		_tmp97_ = pamac_package_get_install_date ((PamacPackage*) _data11_->snap_pkg);
		_tmp98_ = _tmp97_;
		_tmp99_ = g_date_time_format (_tmp98_, "%c");
		_tmp100_ = _tmp99_;
		_tmp101_ = previous_widget;
		_tmp102_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Install Date"), _tmp100_, _tmp101_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp102_;
		_g_free0 (_tmp100_);
		_tmp103_ = pamac_snap_package_get_channels (_data11_->snap_pkg);
		_tmp104_ = _tmp103_;
		_tmp105_ = vala_g_ptr_array_get_length (_tmp104_);
		_tmp106_ = _tmp105_;
		if (_tmp106_ != 0) {
			GtkLabel* label = NULL;
			gchar* _tmp107_;
			gchar* _tmp108_;
			gchar* _tmp109_;
			gchar* _tmp110_;
			GtkLabel* _tmp111_;
			GtkLabel* _tmp112_;
			GtkLabel* _tmp113_;
			GtkLabel* _tmp114_;
			GtkLabel* _tmp115_;
			GtkLabel* _tmp116_;
			GtkGrid* _tmp117_;
			GtkLabel* _tmp118_;
			GtkWidget* _tmp119_;
			GtkBox* box = NULL;
			GtkBox* _tmp120_;
			GtkBox* _tmp121_;
			GPtrArray* _tmp122_;
			GPtrArray* _tmp123_;
			GtkGrid* _tmp161_;
			GtkBox* _tmp162_;
			GtkLabel* _tmp163_;
			_tmp107_ = g_strconcat (g_dgettext (NULL, "Channels"), ":", NULL);
			_tmp108_ = _tmp107_;
			_tmp109_ = g_strdup_printf ("<b>%s</b>", _tmp108_);
			_tmp110_ = _tmp109_;
			_tmp111_ = (GtkLabel*) gtk_label_new (_tmp110_);
			g_object_ref_sink (_tmp111_);
			_tmp112_ = _tmp111_;
			_g_free0 (_tmp110_);
			_g_free0 (_tmp108_);
			label = _tmp112_;
			_tmp113_ = label;
			gtk_widget_set_visible ((GtkWidget*) _tmp113_, TRUE);
			_tmp114_ = label;
			gtk_label_set_use_markup (_tmp114_, TRUE);
			_tmp115_ = label;
			gtk_widget_set_halign ((GtkWidget*) _tmp115_, GTK_ALIGN_START);
			_tmp116_ = label;
			gtk_widget_set_valign ((GtkWidget*) _tmp116_, GTK_ALIGN_START);
			_tmp117_ = self->priv->details_grid;
			_tmp118_ = label;
			_tmp119_ = previous_widget;
			gtk_grid_attach_next_to (_tmp117_, (GtkWidget*) _tmp118_, _tmp119_, GTK_POS_BOTTOM, 1, 1);
			_tmp120_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
			g_object_ref_sink (_tmp120_);
			box = _tmp120_;
			_tmp121_ = box;
			gtk_widget_set_visible ((GtkWidget*) _tmp121_, TRUE);
			_tmp122_ = pamac_snap_package_get_channels (_data11_->snap_pkg);
			_tmp123_ = _tmp122_;
			{
				GPtrArray* channel_collection = NULL;
				guint channel_index = 0U;
				channel_collection = _tmp123_;
				for (channel_index = 0; channel_index < channel_collection->len; channel_index = channel_index + 1) {
					const gchar* channel = NULL;
					channel = (const gchar*) g_ptr_array_index (channel_collection, channel_index);
					{
						Block12Data* _data12_;
						gchar** split = NULL;
						const gchar* _tmp124_;
						gchar** _tmp125_;
						gchar** _tmp126_;
						gint split_length1;
						gint _split_size_;
						gchar** _tmp127_;
						gint _tmp127__length1;
						const gchar* _tmp128_;
						gchar* _tmp129_;
						const gchar* _tmp130_;
						const gchar* _tmp131_;
						const gchar* _tmp132_;
						_data12_ = g_slice_new0 (Block12Data);
						_data12_->_ref_count_ = 1;
						_data12_->_data11_ = block11_data_ref (_data11_);
						_tmp124_ = channel;
						_tmp126_ = _tmp125_ = g_strsplit (_tmp124_, " : ", 2);
						split = _tmp126_;
						split_length1 = _vala_array_length (_tmp125_);
						_split_size_ = split_length1;
						_tmp127_ = split;
						_tmp127__length1 = split_length1;
						_tmp128_ = _tmp127_[0];
						_tmp129_ = g_strdup (_tmp128_);
						_data12_->channel_name = _tmp129_;
						_tmp130_ = pamac_snap_package_get_channel (_data11_->snap_pkg);
						_tmp131_ = _tmp130_;
						_tmp132_ = _data12_->channel_name;
						if (g_strcmp0 (_tmp131_, _tmp132_) != 0) {
							GtkBox* box2 = NULL;
							GtkBox* _tmp133_;
							GtkBox* _tmp134_;
							GtkBox* _tmp135_;
							GtkLabel* label2 = NULL;
							const gchar* _tmp136_;
							GtkLabel* _tmp137_;
							GtkLabel* _tmp138_;
							GtkLabel* _tmp139_;
							GtkBox* _tmp140_;
							GtkLabel* _tmp141_;
							GtkButton* install_button = NULL;
							GtkButton* _tmp142_;
							GtkButton* _tmp143_;
							GtkButton* _tmp144_;
							GtkButton* _tmp145_;
							GtkButton* _tmp146_;
							GtkButton* _tmp147_;
							gboolean _tmp148_ = FALSE;
							GtkBox* _tmp151_;
							GtkButton* _tmp152_;
							GtkBox* _tmp153_;
							GtkBox* _tmp154_;
							_tmp133_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
							g_object_ref_sink (_tmp133_);
							box2 = _tmp133_;
							_tmp134_ = box2;
							gtk_widget_set_visible ((GtkWidget*) _tmp134_, TRUE);
							_tmp135_ = box2;
							gtk_box_set_homogeneous (_tmp135_, FALSE);
							_tmp136_ = channel;
							_tmp137_ = (GtkLabel*) gtk_label_new (_tmp136_);
							g_object_ref_sink (_tmp137_);
							label2 = _tmp137_;
							_tmp138_ = label2;
							gtk_widget_set_visible ((GtkWidget*) _tmp138_, TRUE);
							_tmp139_ = label2;
							gtk_widget_set_halign ((GtkWidget*) _tmp139_, GTK_ALIGN_START);
							_tmp140_ = box2;
							_tmp141_ = label2;
							gtk_container_add ((GtkContainer*) _tmp140_, (GtkWidget*) _tmp141_);
							_tmp142_ = (GtkButton*) gtk_button_new_with_label (g_dgettext (NULL, "Install"));
							g_object_ref_sink (_tmp142_);
							install_button = _tmp142_;
							_tmp143_ = install_button;
							gtk_widget_set_visible ((GtkWidget*) _tmp143_, TRUE);
							_tmp144_ = install_button;
							gtk_widget_set_margin_top ((GtkWidget*) _tmp144_, 3);
							_tmp145_ = install_button;
							gtk_widget_set_margin_bottom ((GtkWidget*) _tmp145_, 3);
							_tmp146_ = install_button;
							gtk_widget_set_margin_start ((GtkWidget*) _tmp146_, 3);
							_tmp147_ = install_button;
							gtk_widget_set_margin_end ((GtkWidget*) _tmp147_, 3);
							if (self->transaction_running) {
								_tmp148_ = TRUE;
							} else {
								_tmp148_ = self->generate_mirrors_list;
							}
							if (_tmp148_) {
								GtkButton* _tmp149_;
								_tmp149_ = install_button;
								gtk_widget_set_sensitive ((GtkWidget*) _tmp149_, FALSE);
							} else {
								GtkButton* _tmp150_;
								_tmp150_ = install_button;
								g_signal_connect_data (_tmp150_, "clicked", (GCallback) _________lambda54__gtk_button_clicked, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
							}
							_tmp151_ = box2;
							_tmp152_ = install_button;
							gtk_container_add ((GtkContainer*) _tmp151_, (GtkWidget*) _tmp152_);
							_tmp153_ = box;
							_tmp154_ = box2;
							gtk_container_add ((GtkContainer*) _tmp153_, (GtkWidget*) _tmp154_);
							_g_object_unref0 (install_button);
							_g_object_unref0 (label2);
							_g_object_unref0 (box2);
						} else {
							GtkLabel* label2 = NULL;
							const gchar* _tmp155_;
							GtkLabel* _tmp156_;
							GtkLabel* _tmp157_;
							GtkLabel* _tmp158_;
							GtkBox* _tmp159_;
							GtkLabel* _tmp160_;
							_tmp155_ = channel;
							_tmp156_ = (GtkLabel*) gtk_label_new (_tmp155_);
							g_object_ref_sink (_tmp156_);
							label2 = _tmp156_;
							_tmp157_ = label2;
							gtk_widget_set_visible ((GtkWidget*) _tmp157_, TRUE);
							_tmp158_ = label2;
							gtk_widget_set_halign ((GtkWidget*) _tmp158_, GTK_ALIGN_START);
							_tmp159_ = box;
							_tmp160_ = label2;
							gtk_container_add ((GtkContainer*) _tmp159_, (GtkWidget*) _tmp160_);
							_g_object_unref0 (label2);
						}
						split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL);
						block12_data_unref (_data12_);
						_data12_ = NULL;
					}
				}
			}
			_tmp161_ = self->priv->details_grid;
			_tmp162_ = box;
			_tmp163_ = label;
			gtk_grid_attach_next_to (_tmp161_, (GtkWidget*) _tmp162_, (GtkWidget*) _tmp163_, GTK_POS_RIGHT, 1, 1);
			_g_object_unref0 (box);
			_g_object_unref0 (label);
		}
	}
	pamac_manager_window_clear_deps_box (self);
	_g_object_unref0 (previous_widget);
	_g_free0 (escaped_url);
	block11_data_unref (_data11_);
	_data11_ = NULL;
}

static void
pamac_manager_window_set_flatpak_details (PamacManagerWindow* self,
                                          PamacFlatpakPackage* flatpak_pkg)
{
	const gchar* app_name = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* icon = NULL;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	GtkLabel* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	const gchar* long_desc = NULL;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	const gchar* url = NULL;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp50_;
	const gchar* _tmp51_;
	GtkWidget* previous_widget = NULL;
	const gchar* _tmp77_;
	const gchar* _tmp78_;
	const gchar* _tmp85_;
	const gchar* _tmp86_;
	GtkWidget* _tmp87_;
	GtkWidget* _tmp88_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (flatpak_pkg != NULL);
	pamac_manager_window_on_packages_leaflet_folded_changed (self);
	pamac_manager_window_clear_screenshots_carousel (self);
	pamac_manager_window_set_screenshots (self, (PamacPackage*) flatpak_pkg);
	_tmp0_ = pamac_package_get_app_name ((PamacPackage*) flatpak_pkg);
	_tmp1_ = _tmp0_;
	app_name = _tmp1_;
	_tmp2_ = app_name;
	if (_tmp2_ == NULL) {
		GtkLabel* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp3_ = self->priv->name_label;
		_tmp4_ = pamac_package_get_name ((PamacPackage*) flatpak_pkg);
		_tmp5_ = _tmp4_;
		_tmp6_ = pamac_package_get_version ((PamacPackage*) flatpak_pkg);
		_tmp7_ = _tmp6_;
		_tmp8_ = g_strdup_printf ("<big><b>%s  %s</b></big>", _tmp5_, _tmp7_);
		_tmp9_ = _tmp8_;
		gtk_label_set_markup (_tmp3_, _tmp9_);
		_g_free0 (_tmp9_);
	} else {
		GtkLabel* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		_tmp10_ = self->priv->name_label;
		_tmp11_ = app_name;
		_tmp12_ = g_markup_escape_text (_tmp11_, (gssize) -1);
		_tmp13_ = _tmp12_;
		_tmp14_ = pamac_package_get_version ((PamacPackage*) flatpak_pkg);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_strdup_printf ("<big><b>%s  %s</b></big>", _tmp13_, _tmp15_);
		_tmp17_ = _tmp16_;
		gtk_label_set_markup (_tmp10_, _tmp17_);
		_g_free0 (_tmp17_);
		_g_free0 (_tmp13_);
	}
	_tmp18_ = pamac_package_get_icon ((PamacPackage*) flatpak_pkg);
	_tmp19_ = _tmp18_;
	icon = _tmp19_;
	_tmp20_ = icon;
	if (_tmp20_ != NULL) {
		{
			GdkPixbuf* pixbuf = NULL;
			const gchar* _tmp21_;
			GdkPixbuf* _tmp22_;
			GtkImage* _tmp23_;
			GdkPixbuf* _tmp24_;
			_tmp21_ = icon;
			_tmp22_ = gdk_pixbuf_new_from_file (_tmp21_, &_inner_error0_);
			pixbuf = _tmp22_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_tmp23_ = self->priv->app_image;
			_tmp24_ = pixbuf;
			g_object_set (_tmp23_, "pixbuf", _tmp24_, NULL);
			_g_object_unref0 (pixbuf);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GtkImage* _tmp25_;
			GdkPixbuf* _tmp26_;
			g_clear_error (&_inner_error0_);
			_tmp25_ = self->priv->app_image;
			_tmp26_ = self->priv->package_icon;
			g_object_set (_tmp25_, "pixbuf", _tmp26_, NULL);
		}
		__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;
		}
	} else {
		GtkImage* _tmp27_;
		GdkPixbuf* _tmp28_;
		_tmp27_ = self->priv->app_image;
		_tmp28_ = self->priv->package_icon;
		g_object_set (_tmp27_, "pixbuf", _tmp28_, NULL);
	}
	_tmp29_ = self->priv->desc_label;
	_tmp30_ = pamac_package_get_desc ((PamacPackage*) flatpak_pkg);
	_tmp31_ = _tmp30_;
	gtk_label_set_text (_tmp29_, _tmp31_);
	_tmp32_ = pamac_package_get_long_desc ((PamacPackage*) flatpak_pkg);
	_tmp33_ = _tmp32_;
	long_desc = _tmp33_;
	_tmp34_ = long_desc;
	if (_tmp34_ == NULL) {
		GtkLabel* _tmp35_;
		_tmp35_ = self->priv->long_desc_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp35_, FALSE);
	} else {
		GtkLabel* _tmp36_;
		const gchar* _tmp37_;
		GtkLabel* _tmp38_;
		_tmp36_ = self->priv->long_desc_label;
		_tmp37_ = long_desc;
		gtk_label_set_text (_tmp36_, _tmp37_);
		_tmp38_ = self->priv->long_desc_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp38_, TRUE);
	}
	_tmp39_ = pamac_package_get_url ((PamacPackage*) flatpak_pkg);
	_tmp40_ = _tmp39_;
	url = _tmp40_;
	_tmp41_ = url;
	if (_tmp41_ != NULL) {
		gchar* escaped_url = NULL;
		const gchar* _tmp42_;
		const gchar* _tmp43_;
		gchar* _tmp44_;
		GtkLabel* _tmp45_;
		const gchar* _tmp46_;
		const gchar* _tmp47_;
		gchar* _tmp48_;
		gchar* _tmp49_;
		_tmp42_ = pamac_package_get_url ((PamacPackage*) flatpak_pkg);
		_tmp43_ = _tmp42_;
		_tmp44_ = g_markup_escape_text (_tmp43_, (gssize) -1);
		escaped_url = _tmp44_;
		_tmp45_ = self->priv->link_label;
		_tmp46_ = escaped_url;
		_tmp47_ = escaped_url;
		_tmp48_ = g_strdup_printf ("<a href=\"%s\">%s</a>", _tmp46_, _tmp47_);
		_tmp49_ = _tmp48_;
		gtk_label_set_markup (_tmp45_, _tmp49_);
		_g_free0 (_tmp49_);
		_g_free0 (escaped_url);
	}
	_tmp50_ = pamac_package_get_installed_version ((PamacPackage*) flatpak_pkg);
	_tmp51_ = _tmp50_;
	if (_tmp51_ != NULL) {
		const gchar* launchable = NULL;
		const gchar* _tmp52_;
		const gchar* _tmp53_;
		const gchar* _tmp54_;
		GtkToggleButton* _tmp59_;
		GtkToggleButton* _tmp60_;
		GtkToggleButton* _tmp61_;
		GtkToggleButton* _tmp62_;
		GtkToggleButton* _tmp63_;
		GtkToggleButton* _tmp64_;
		GHashTable* _tmp65_;
		const gchar* _tmp66_;
		const gchar* _tmp67_;
		_tmp52_ = pamac_package_get_launchable ((PamacPackage*) flatpak_pkg);
		_tmp53_ = _tmp52_;
		launchable = _tmp53_;
		_tmp54_ = launchable;
		if (_tmp54_ != NULL) {
			GtkButton* _tmp55_;
			const gchar* _tmp56_;
			gchar* _tmp57_;
			_tmp55_ = self->priv->launch_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp55_, TRUE);
			_tmp56_ = launchable;
			_tmp57_ = g_strdup (_tmp56_);
			_g_free0 (self->priv->current_launchable);
			self->priv->current_launchable = _tmp57_;
		} else {
			GtkButton* _tmp58_;
			_tmp58_ = self->priv->launch_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp58_, FALSE);
		}
		_tmp59_ = self->priv->install_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp59_, FALSE);
		_tmp60_ = self->priv->build_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp60_, FALSE);
		_tmp61_ = self->priv->reinstall_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp61_, FALSE);
		_tmp62_ = self->priv->remove_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp62_, TRUE);
		_tmp63_ = self->priv->remove_togglebutton;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp63_, TRUE);
		_tmp64_ = self->priv->remove_togglebutton;
		_tmp65_ = pamac_flatpak_to_remove;
		_tmp66_ = pamac_package_get_id ((PamacPackage*) flatpak_pkg);
		_tmp67_ = _tmp66_;
		gtk_toggle_button_set_active (_tmp64_, g_hash_table_contains (_tmp65_, _tmp67_));
	} else {
		GtkButton* _tmp68_;
		GtkToggleButton* _tmp69_;
		GtkToggleButton* _tmp70_;
		GtkToggleButton* _tmp71_;
		GtkToggleButton* _tmp72_;
		GtkToggleButton* _tmp73_;
		GHashTable* _tmp74_;
		const gchar* _tmp75_;
		const gchar* _tmp76_;
		_tmp68_ = self->priv->launch_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp68_, FALSE);
		_tmp69_ = self->priv->remove_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp69_, FALSE);
		_tmp70_ = self->priv->reinstall_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp70_, FALSE);
		_tmp71_ = self->priv->build_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp71_, FALSE);
		_tmp72_ = self->priv->install_togglebutton;
		gtk_widget_set_visible ((GtkWidget*) _tmp72_, TRUE);
		_tmp73_ = self->priv->install_togglebutton;
		_tmp74_ = pamac_flatpak_to_install;
		_tmp75_ = pamac_package_get_id ((PamacPackage*) flatpak_pkg);
		_tmp76_ = _tmp75_;
		gtk_toggle_button_set_active (_tmp73_, g_hash_table_contains (_tmp74_, _tmp76_));
	}
	pamac_manager_window_clear_details_grid (self);
	previous_widget = NULL;
	_tmp77_ = pamac_package_get_license ((PamacPackage*) flatpak_pkg);
	_tmp78_ = _tmp77_;
	if (_tmp78_ != NULL) {
		const gchar* _tmp79_;
		const gchar* _tmp80_;
		GtkWidget* _tmp81_;
		GtkWidget* _tmp82_;
		_tmp79_ = pamac_package_get_license ((PamacPackage*) flatpak_pkg);
		_tmp80_ = _tmp79_;
		_tmp81_ = previous_widget;
		_tmp82_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Licenses"), _tmp80_, _tmp81_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp82_;
	} else {
		GtkWidget* _tmp83_;
		GtkWidget* _tmp84_;
		_tmp83_ = previous_widget;
		_tmp84_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Licenses"), g_dgettext (NULL, "Unknown"), _tmp83_);
		_g_object_unref0 (previous_widget);
		previous_widget = _tmp84_;
	}
	_tmp85_ = pamac_package_get_repo ((PamacPackage*) flatpak_pkg);
	_tmp86_ = _tmp85_;
	_tmp87_ = previous_widget;
	_tmp88_ = pamac_manager_window_populate_details_grid (self, g_dgettext (NULL, "Repository"), _tmp86_, _tmp87_);
	_g_object_unref0 (previous_widget);
	previous_widget = _tmp88_;
	pamac_manager_window_clear_deps_box (self);
	_g_object_unref0 (previous_widget);
}

static Block13Data*
block13_data_ref (Block13Data* _data13_)
{
	g_atomic_int_inc (&_data13_->_ref_count_);
	return _data13_;
}

static void
block13_data_unref (void * _userdata_)
{
	Block13Data* _data13_;
	_data13_ = (Block13Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data13_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data13_->self;
		_g_object_unref0 (_data13_->alpm_pkg);
		_g_object_unref0 (self);
		g_slice_free (Block13Data, _data13_);
	}
}

static void
____lambda76_ (Block13Data* _data13_,
               GObject* obj,
               GAsyncResult* res)
{
	PamacManagerWindow* self;
	GPtrArray* files = NULL;
	PamacAlpmPackage* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	GString* text = NULL;
	GString* _tmp3_;
	GPtrArray* _tmp4_;
	GtkTextView* _tmp9_;
	GtkTextBuffer* _tmp10_;
	GtkTextBuffer* _tmp11_;
	GString* _tmp12_;
	const gchar* _tmp13_;
	GString* _tmp14_;
	GdkWindow* _tmp15_;
	PamacPackage* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	self = _data13_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = _data13_->alpm_pkg;
	_tmp1_ = pamac_alpm_package_get_files_finish (_tmp0_, res);
	_tmp2_ = _g_ptr_array_ref0 (_tmp1_);
	files = _tmp2_;
	_tmp3_ = g_string_new ("");
	text = _tmp3_;
	_tmp4_ = files;
	{
		GPtrArray* file_collection = NULL;
		guint file_index = 0U;
		file_collection = _tmp4_;
		for (file_index = 0; file_index < file_collection->len; file_index = file_index + 1) {
			const gchar* file = NULL;
			file = (const gchar*) g_ptr_array_index (file_collection, file_index);
			{
				GString* _tmp5_;
				GString* _tmp7_;
				const gchar* _tmp8_;
				_tmp5_ = text;
				if (_tmp5_->len > ((gssize) 0)) {
					GString* _tmp6_;
					_tmp6_ = text;
					g_string_append (_tmp6_, "\n");
				}
				_tmp7_ = text;
				_tmp8_ = file;
				g_string_append (_tmp7_, _tmp8_);
			}
		}
	}
	_tmp9_ = self->priv->files_textview;
	_tmp10_ = gtk_text_view_get_buffer (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = text;
	_tmp13_ = _tmp12_->str;
	_tmp14_ = text;
	gtk_text_buffer_set_text (_tmp11_, _tmp13_, (gint) _tmp14_->len);
	_tmp15_ = gtk_widget_get_window ((GtkWidget*) self);
	gdk_window_set_cursor (_tmp15_, NULL);
	_tmp16_ = self->priv->current_package_displayed;
	_tmp17_ = pamac_package_get_name (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = g_strdup (_tmp18_);
	_g_free0 (self->priv->current_files);
	self->priv->current_files = _tmp19_;
	_g_string_free0 (text);
	_g_ptr_array_unref0 (files);
}

static void
_____lambda76__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda76_ (self, source_object, res);
	block13_data_unref (self);
}

static void
___lambda78_ (PamacManagerWindow* self)
{
	GdkWindow* _tmp0_;
	_tmp0_ = gtk_widget_get_window ((GtkWidget*) self);
	gdk_window_set_cursor (_tmp0_, NULL);
}

static void
____lambda78__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda78_ ((PamacManagerWindow*) self);
	g_object_unref (self);
}

static void
____lambda77_ (PamacManagerWindow* self,
               GObject* obj,
               GAsyncResult* res)
{
	PamacAURPackage* pkg = NULL;
	PamacDatabaseGtk* _tmp0_;
	PamacAURPackage* _tmp1_;
	PamacAURPackage* _tmp2_;
	PamacAURPackage* _tmp3_;
	PamacPackage* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_aur_pkg_finish ((PamacDatabase*) _tmp0_, res);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	pkg = _tmp2_;
	_tmp3_ = pkg;
	if (_tmp3_ != NULL) {
		PamacTransactionGtk* _tmp4_;
		PamacAURPackage* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp4_ = self->transaction;
		_tmp5_ = pkg;
		_tmp6_ = pamac_aur_package_get_packagebase (_tmp5_);
		_tmp7_ = _tmp6_;
		pamac_transaction_gtk_populate_build_files_async (_tmp4_, _tmp7_, TRUE, FALSE, ____lambda78__gasync_ready_callback, g_object_ref (self));
	} else {
		GdkWindow* _tmp8_;
		_tmp8_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp8_, NULL);
	}
	_tmp9_ = self->priv->current_package_displayed;
	_tmp10_ = pamac_package_get_name (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strdup (_tmp11_);
	_g_free0 (self->priv->current_build_files);
	self->priv->current_build_files = _tmp12_;
	_g_object_unref0 (pkg);
}

static void
_____lambda77__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda77_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
pamac_manager_window_on_properties_stack_visible_child_changed (PamacManagerWindow* self)
{
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GQuark _tmp5_ = 0U;
	static GQuark _tmp4_label0 = 0;
	static GQuark _tmp4_label1 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->properties_stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_);
	if (_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("files")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp6_;
				PamacPackage* _tmp7_;
				const gchar* _tmp8_;
				const gchar* _tmp9_;
				_tmp6_ = self->priv->current_files;
				_tmp7_ = self->priv->current_package_displayed;
				_tmp8_ = pamac_package_get_name (_tmp7_);
				_tmp9_ = _tmp8_;
				if (g_strcmp0 (_tmp6_, _tmp9_) != 0) {
					Block13Data* _data13_;
					GdkWindow* _tmp10_;
					GdkDisplay* _tmp11_;
					GdkCursor* _tmp12_;
					GdkCursor* _tmp13_;
					PamacPackage* _tmp14_;
					PamacAlpmPackage* _tmp15_;
					PamacAlpmPackage* _tmp16_;
					GtkTextView* _tmp17_;
					GtkTextBuffer* _tmp18_;
					GtkTextBuffer* _tmp19_;
					GtkScrolledWindow* _tmp20_;
					GtkAdjustment* _tmp21_;
					GtkAdjustment* _tmp22_;
					_data13_ = g_slice_new0 (Block13Data);
					_data13_->_ref_count_ = 1;
					_data13_->self = g_object_ref (self);
					_tmp10_ = gtk_widget_get_window ((GtkWidget*) self);
					_tmp11_ = gdk_display_get_default ();
					_tmp12_ = gdk_cursor_new_for_display (_tmp11_, GDK_WATCH);
					_tmp13_ = _tmp12_;
					gdk_window_set_cursor (_tmp10_, _tmp13_);
					_g_object_unref0 (_tmp13_);
					_tmp14_ = self->priv->current_package_displayed;
					_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) _tmp14_) : NULL);
					_data13_->alpm_pkg = _tmp15_;
					_tmp16_ = _data13_->alpm_pkg;
					pamac_alpm_package_get_files_async (_tmp16_, _____lambda76__gasync_ready_callback, block13_data_ref (_data13_));
					_tmp17_ = self->priv->files_textview;
					_tmp18_ = gtk_text_view_get_buffer (_tmp17_);
					_tmp19_ = _tmp18_;
					gtk_text_buffer_set_text (_tmp19_, "", 0);
					_tmp20_ = self->priv->packages_scrolledwindow;
					_tmp21_ = gtk_scrolled_window_get_vadjustment (_tmp20_);
					_tmp22_ = _tmp21_;
					gtk_adjustment_set_value (_tmp22_, (gdouble) 0);
					block13_data_unref (_data13_);
					_data13_ = NULL;
				}
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("build_files")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp23_;
				PamacPackage* _tmp24_;
				const gchar* _tmp25_;
				const gchar* _tmp26_;
				_tmp23_ = self->priv->current_build_files;
				_tmp24_ = self->priv->current_package_displayed;
				_tmp25_ = pamac_package_get_name (_tmp24_);
				_tmp26_ = _tmp25_;
				if (g_strcmp0 (_tmp23_, _tmp26_) != 0) {
					GdkWindow* _tmp27_;
					GdkDisplay* _tmp28_;
					GdkCursor* _tmp29_;
					GdkCursor* _tmp30_;
					PamacDatabaseGtk* _tmp31_;
					PamacPackage* _tmp32_;
					const gchar* _tmp33_;
					const gchar* _tmp34_;
					_tmp27_ = gtk_widget_get_window ((GtkWidget*) self);
					_tmp28_ = gdk_display_get_default ();
					_tmp29_ = gdk_cursor_new_for_display (_tmp28_, GDK_WATCH);
					_tmp30_ = _tmp29_;
					gdk_window_set_cursor (_tmp27_, _tmp30_);
					_g_object_unref0 (_tmp30_);
					_tmp31_ = self->priv->_database;
					_tmp32_ = self->priv->current_package_displayed;
					_tmp33_ = pamac_package_get_name (_tmp32_);
					_tmp34_ = _tmp33_;
					pamac_database_get_aur_pkg_async ((PamacDatabase*) _tmp31_, _tmp34_, _____lambda77__gasync_ready_callback, g_object_ref (self));
				}
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				break;
			}
		}
	}
}

static void
pamac_manager_window_on_launch_button_clicked (PamacManagerWindow* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		gchar* _tmp0_;
		const gchar* _tmp1_;
		gchar* _tmp2_;
		gchar** _tmp3_;
		gchar** _tmp4_;
		gint _tmp4__length1;
		GSubprocess* _tmp5_;
		GSubprocess* _tmp6_;
		_tmp0_ = g_strdup ("gtk-launch");
		_tmp1_ = self->priv->current_launchable;
		_tmp2_ = g_strdup (_tmp1_);
		_tmp3_ = g_new0 (gchar*, 2 + 1);
		_tmp3_[0] = _tmp0_;
		_tmp3_[1] = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp4__length1 = 2;
		_tmp5_ = g_subprocess_newv (_tmp4_, G_SUBPROCESS_FLAGS_NONE, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp6_);
		_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	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 ("manager_window.vala:2146: %s", _tmp8_);
		_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
_pamac_manager_window_on_launch_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self)
{
	pamac_manager_window_on_launch_button_clicked ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_install_togglebutton_toggled (PamacManagerWindow* self)
{
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->install_togglebutton;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		PamacPackage* _tmp3_;
		_tmp3_ = self->priv->current_package_displayed;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, PAMAC_TYPE_SNAP_PACKAGE)) {
			GHashTable* _tmp4_;
			PamacPackage* _tmp5_;
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			gchar* _tmp8_;
			PamacPackage* _tmp9_;
			PamacSnapPackage* _tmp10_;
			_tmp4_ = pamac_snap_to_install;
			_tmp5_ = self->priv->current_package_displayed;
			_tmp6_ = pamac_package_get_name (_tmp5_);
			_tmp7_ = _tmp6_;
			_tmp8_ = g_strdup (_tmp7_);
			_tmp9_ = self->priv->current_package_displayed;
			_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, PAMAC_TYPE_SNAP_PACKAGE) ? ((PamacSnapPackage*) _tmp9_) : NULL);
			g_hash_table_insert (_tmp4_, _tmp8_, _tmp10_);
		} else {
			PamacPackage* _tmp11_;
			_tmp11_ = self->priv->current_package_displayed;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, PAMAC_TYPE_FLATPAK_PACKAGE)) {
				GHashTable* _tmp12_;
				PamacPackage* _tmp13_;
				const gchar* _tmp14_;
				const gchar* _tmp15_;
				gchar* _tmp16_;
				PamacPackage* _tmp17_;
				PamacFlatpakPackage* _tmp18_;
				_tmp12_ = pamac_flatpak_to_install;
				_tmp13_ = self->priv->current_package_displayed;
				_tmp14_ = pamac_package_get_id (_tmp13_);
				_tmp15_ = _tmp14_;
				_tmp16_ = g_strdup (_tmp15_);
				_tmp17_ = self->priv->current_package_displayed;
				_tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, PAMAC_TYPE_FLATPAK_PACKAGE) ? ((PamacFlatpakPackage*) _tmp17_) : NULL);
				g_hash_table_insert (_tmp12_, _tmp16_, _tmp18_);
			} else {
				GHashTable* _tmp19_;
				PamacPackage* _tmp20_;
				const gchar* _tmp21_;
				const gchar* _tmp22_;
				gchar* _tmp23_;
				_tmp19_ = pamac_to_install;
				_tmp20_ = self->priv->current_package_displayed;
				_tmp21_ = pamac_package_get_name (_tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = g_strdup (_tmp22_);
				g_hash_table_add (_tmp19_, _tmp23_);
			}
		}
	} else {
		PamacPackage* _tmp24_;
		_tmp24_ = self->priv->current_package_displayed;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, PAMAC_TYPE_SNAP_PACKAGE)) {
			GHashTable* _tmp25_;
			PamacPackage* _tmp26_;
			const gchar* _tmp27_;
			const gchar* _tmp28_;
			_tmp25_ = pamac_snap_to_install;
			_tmp26_ = self->priv->current_package_displayed;
			_tmp27_ = pamac_package_get_name (_tmp26_);
			_tmp28_ = _tmp27_;
			g_hash_table_remove (_tmp25_, _tmp28_);
		} else {
			PamacPackage* _tmp29_;
			_tmp29_ = self->priv->current_package_displayed;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp29_, PAMAC_TYPE_FLATPAK_PACKAGE)) {
				GHashTable* _tmp30_;
				PamacPackage* _tmp31_;
				const gchar* _tmp32_;
				const gchar* _tmp33_;
				_tmp30_ = pamac_flatpak_to_install;
				_tmp31_ = self->priv->current_package_displayed;
				_tmp32_ = pamac_package_get_id (_tmp31_);
				_tmp33_ = _tmp32_;
				g_hash_table_remove (_tmp30_, _tmp33_);
			} else {
				GHashTable* _tmp34_;
				PamacPackage* _tmp35_;
				const gchar* _tmp36_;
				const gchar* _tmp37_;
				_tmp34_ = pamac_to_install;
				_tmp35_ = self->priv->current_package_displayed;
				_tmp36_ = pamac_package_get_name (_tmp35_);
				_tmp37_ = _tmp36_;
				g_hash_table_remove (_tmp34_, _tmp37_);
			}
		}
	}
	pamac_manager_window_set_pending_operations (self);
	pamac_manager_window_refresh_listbox_buttons (self);
}

static void
_pamac_manager_window_on_install_togglebutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                 gpointer self)
{
	pamac_manager_window_on_install_togglebutton_toggled ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_build_togglebutton_toggled (PamacManagerWindow* self)
{
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->build_togglebutton;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GHashTable* _tmp3_;
		PamacPackage* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		GtkStack* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp3_ = pamac_to_build;
		_tmp4_ = self->priv->current_package_displayed;
		_tmp5_ = pamac_package_get_name (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup (_tmp6_);
		g_hash_table_add (_tmp3_, _tmp7_);
		_tmp8_ = self->priv->properties_stack;
		_tmp9_ = gtk_stack_get_visible_child_name (_tmp8_);
		_tmp10_ = _tmp9_;
		if (g_strcmp0 (_tmp10_, "build_files") == 0) {
			PamacTransactionGtk* _tmp11_;
			PamacPackage* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			_tmp11_ = self->transaction;
			_tmp12_ = self->priv->current_package_displayed;
			_tmp13_ = pamac_package_get_name (_tmp12_);
			_tmp14_ = _tmp13_;
			pamac_transaction_gtk_save_build_files_async (_tmp11_, _tmp14_, NULL, NULL);
		}
	} else {
		GHashTable* _tmp15_;
		PamacPackage* _tmp16_;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		_tmp15_ = pamac_to_build;
		_tmp16_ = self->priv->current_package_displayed;
		_tmp17_ = pamac_package_get_name (_tmp16_);
		_tmp18_ = _tmp17_;
		g_hash_table_remove (_tmp15_, _tmp18_);
	}
	pamac_manager_window_set_pending_operations (self);
	pamac_manager_window_refresh_listbox_buttons (self);
}

static void
_pamac_manager_window_on_build_togglebutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                               gpointer self)
{
	pamac_manager_window_on_build_togglebutton_toggled ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_reset_files_button_clicked (PamacManagerWindow* self)
{
	PamacAURPackage* aur_pkg = NULL;
	PamacPackage* _tmp0_;
	PamacAURPackage* _tmp1_;
	PamacTransactionGtk* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_package_displayed;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, PAMAC_TYPE_AUR_PACKAGE) ? ((PamacAURPackage*) _tmp0_) : NULL);
	aur_pkg = _tmp1_;
	_tmp2_ = self->transaction;
	_tmp3_ = pamac_aur_package_get_packagebase (aur_pkg);
	_tmp4_ = _tmp3_;
	pamac_transaction_gtk_populate_build_files_async (_tmp2_, _tmp4_, TRUE, TRUE, NULL, NULL);
	_g_object_unref0 (aur_pkg);
}

static void
_pamac_manager_window_on_reset_files_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self)
{
	pamac_manager_window_on_reset_files_button_clicked ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_remove_togglebutton_toggled (PamacManagerWindow* self)
{
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->remove_togglebutton;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkToggleButton* _tmp3_;
		PamacPackage* _tmp4_;
		_tmp3_ = self->priv->reinstall_togglebutton;
		gtk_toggle_button_set_active (_tmp3_, FALSE);
		_tmp4_ = self->priv->current_package_displayed;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, PAMAC_TYPE_SNAP_PACKAGE)) {
			GHashTable* _tmp5_;
			PamacPackage* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_;
			GHashTable* _tmp9_;
			PamacPackage* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			gchar* _tmp13_;
			PamacPackage* _tmp14_;
			PamacSnapPackage* _tmp15_;
			_tmp5_ = pamac_snap_to_install;
			_tmp6_ = self->priv->current_package_displayed;
			_tmp7_ = pamac_package_get_name (_tmp6_);
			_tmp8_ = _tmp7_;
			g_hash_table_remove (_tmp5_, _tmp8_);
			_tmp9_ = pamac_snap_to_remove;
			_tmp10_ = self->priv->current_package_displayed;
			_tmp11_ = pamac_package_get_name (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = g_strdup (_tmp12_);
			_tmp14_ = self->priv->current_package_displayed;
			_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, PAMAC_TYPE_SNAP_PACKAGE) ? ((PamacSnapPackage*) _tmp14_) : NULL);
			g_hash_table_insert (_tmp9_, _tmp13_, _tmp15_);
		} else {
			PamacPackage* _tmp16_;
			_tmp16_ = self->priv->current_package_displayed;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, PAMAC_TYPE_FLATPAK_PACKAGE)) {
				GHashTable* _tmp17_;
				PamacPackage* _tmp18_;
				const gchar* _tmp19_;
				const gchar* _tmp20_;
				GHashTable* _tmp21_;
				PamacPackage* _tmp22_;
				const gchar* _tmp23_;
				const gchar* _tmp24_;
				GHashTable* _tmp34_;
				PamacPackage* _tmp35_;
				const gchar* _tmp36_;
				const gchar* _tmp37_;
				gchar* _tmp38_;
				PamacPackage* _tmp39_;
				PamacFlatpakPackage* _tmp40_;
				_tmp17_ = pamac_flatpak_to_install;
				_tmp18_ = self->priv->current_package_displayed;
				_tmp19_ = pamac_package_get_id (_tmp18_);
				_tmp20_ = _tmp19_;
				g_hash_table_remove (_tmp17_, _tmp20_);
				_tmp21_ = pamac_to_update;
				_tmp22_ = self->priv->current_package_displayed;
				_tmp23_ = pamac_package_get_name (_tmp22_);
				_tmp24_ = _tmp23_;
				if (g_hash_table_contains (_tmp21_, _tmp24_)) {
					GHashTable* _tmp25_;
					PamacPackage* _tmp26_;
					const gchar* _tmp27_;
					const gchar* _tmp28_;
					GHashTable* _tmp29_;
					PamacPackage* _tmp30_;
					const gchar* _tmp31_;
					const gchar* _tmp32_;
					gchar* _tmp33_;
					_tmp25_ = pamac_to_update;
					_tmp26_ = self->priv->current_package_displayed;
					_tmp27_ = pamac_package_get_name (_tmp26_);
					_tmp28_ = _tmp27_;
					g_hash_table_remove (_tmp25_, _tmp28_);
					_tmp29_ = pamac_temporary_ignorepkgs;
					_tmp30_ = self->priv->current_package_displayed;
					_tmp31_ = pamac_package_get_name (_tmp30_);
					_tmp32_ = _tmp31_;
					_tmp33_ = g_strdup (_tmp32_);
					g_hash_table_add (_tmp29_, _tmp33_);
				}
				_tmp34_ = pamac_flatpak_to_remove;
				_tmp35_ = self->priv->current_package_displayed;
				_tmp36_ = pamac_package_get_id (_tmp35_);
				_tmp37_ = _tmp36_;
				_tmp38_ = g_strdup (_tmp37_);
				_tmp39_ = self->priv->current_package_displayed;
				_tmp40_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp39_, PAMAC_TYPE_FLATPAK_PACKAGE) ? ((PamacFlatpakPackage*) _tmp39_) : NULL);
				g_hash_table_insert (_tmp34_, _tmp38_, _tmp40_);
			} else {
				GHashTable* _tmp41_;
				PamacPackage* _tmp42_;
				const gchar* _tmp43_;
				const gchar* _tmp44_;
				GHashTable* _tmp45_;
				PamacPackage* _tmp46_;
				const gchar* _tmp47_;
				const gchar* _tmp48_;
				GHashTable* _tmp58_;
				PamacPackage* _tmp59_;
				const gchar* _tmp60_;
				const gchar* _tmp61_;
				gchar* _tmp62_;
				_tmp41_ = pamac_to_install;
				_tmp42_ = self->priv->current_package_displayed;
				_tmp43_ = pamac_package_get_name (_tmp42_);
				_tmp44_ = _tmp43_;
				g_hash_table_remove (_tmp41_, _tmp44_);
				_tmp45_ = pamac_to_update;
				_tmp46_ = self->priv->current_package_displayed;
				_tmp47_ = pamac_package_get_name (_tmp46_);
				_tmp48_ = _tmp47_;
				if (g_hash_table_contains (_tmp45_, _tmp48_)) {
					GHashTable* _tmp49_;
					PamacPackage* _tmp50_;
					const gchar* _tmp51_;
					const gchar* _tmp52_;
					GHashTable* _tmp53_;
					PamacPackage* _tmp54_;
					const gchar* _tmp55_;
					const gchar* _tmp56_;
					gchar* _tmp57_;
					_tmp49_ = pamac_to_update;
					_tmp50_ = self->priv->current_package_displayed;
					_tmp51_ = pamac_package_get_name (_tmp50_);
					_tmp52_ = _tmp51_;
					g_hash_table_remove (_tmp49_, _tmp52_);
					_tmp53_ = pamac_temporary_ignorepkgs;
					_tmp54_ = self->priv->current_package_displayed;
					_tmp55_ = pamac_package_get_name (_tmp54_);
					_tmp56_ = _tmp55_;
					_tmp57_ = g_strdup (_tmp56_);
					g_hash_table_add (_tmp53_, _tmp57_);
				}
				_tmp58_ = pamac_to_remove;
				_tmp59_ = self->priv->current_package_displayed;
				_tmp60_ = pamac_package_get_name (_tmp59_);
				_tmp61_ = _tmp60_;
				_tmp62_ = g_strdup (_tmp61_);
				g_hash_table_add (_tmp58_, _tmp62_);
			}
		}
	} else {
		PamacPackage* _tmp63_;
		_tmp63_ = self->priv->current_package_displayed;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp63_, PAMAC_TYPE_SNAP_PACKAGE)) {
			GHashTable* _tmp64_;
			PamacPackage* _tmp65_;
			const gchar* _tmp66_;
			const gchar* _tmp67_;
			_tmp64_ = pamac_snap_to_remove;
			_tmp65_ = self->priv->current_package_displayed;
			_tmp66_ = pamac_package_get_name (_tmp65_);
			_tmp67_ = _tmp66_;
			g_hash_table_remove (_tmp64_, _tmp67_);
		} else {
			PamacPackage* _tmp68_;
			_tmp68_ = self->priv->current_package_displayed;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp68_, PAMAC_TYPE_FLATPAK_PACKAGE)) {
				GHashTable* _tmp69_;
				PamacPackage* _tmp70_;
				const gchar* _tmp71_;
				const gchar* _tmp72_;
				GHashTable* _tmp82_;
				PamacPackage* _tmp83_;
				const gchar* _tmp84_;
				const gchar* _tmp85_;
				_tmp69_ = pamac_temporary_ignorepkgs;
				_tmp70_ = self->priv->current_package_displayed;
				_tmp71_ = pamac_package_get_name (_tmp70_);
				_tmp72_ = _tmp71_;
				if (g_hash_table_contains (_tmp69_, _tmp72_)) {
					GHashTable* _tmp73_;
					PamacPackage* _tmp74_;
					const gchar* _tmp75_;
					const gchar* _tmp76_;
					gchar* _tmp77_;
					GHashTable* _tmp78_;
					PamacPackage* _tmp79_;
					const gchar* _tmp80_;
					const gchar* _tmp81_;
					_tmp73_ = pamac_to_update;
					_tmp74_ = self->priv->current_package_displayed;
					_tmp75_ = pamac_package_get_name (_tmp74_);
					_tmp76_ = _tmp75_;
					_tmp77_ = g_strdup (_tmp76_);
					g_hash_table_add (_tmp73_, _tmp77_);
					_tmp78_ = pamac_temporary_ignorepkgs;
					_tmp79_ = self->priv->current_package_displayed;
					_tmp80_ = pamac_package_get_name (_tmp79_);
					_tmp81_ = _tmp80_;
					g_hash_table_remove (_tmp78_, _tmp81_);
				}
				_tmp82_ = pamac_flatpak_to_remove;
				_tmp83_ = self->priv->current_package_displayed;
				_tmp84_ = pamac_package_get_id (_tmp83_);
				_tmp85_ = _tmp84_;
				g_hash_table_remove (_tmp82_, _tmp85_);
			} else {
				GHashTable* _tmp86_;
				PamacPackage* _tmp87_;
				const gchar* _tmp88_;
				const gchar* _tmp89_;
				GHashTable* _tmp99_;
				PamacPackage* _tmp100_;
				const gchar* _tmp101_;
				const gchar* _tmp102_;
				_tmp86_ = pamac_temporary_ignorepkgs;
				_tmp87_ = self->priv->current_package_displayed;
				_tmp88_ = pamac_package_get_name (_tmp87_);
				_tmp89_ = _tmp88_;
				if (g_hash_table_contains (_tmp86_, _tmp89_)) {
					GHashTable* _tmp90_;
					PamacPackage* _tmp91_;
					const gchar* _tmp92_;
					const gchar* _tmp93_;
					gchar* _tmp94_;
					GHashTable* _tmp95_;
					PamacPackage* _tmp96_;
					const gchar* _tmp97_;
					const gchar* _tmp98_;
					_tmp90_ = pamac_to_update;
					_tmp91_ = self->priv->current_package_displayed;
					_tmp92_ = pamac_package_get_name (_tmp91_);
					_tmp93_ = _tmp92_;
					_tmp94_ = g_strdup (_tmp93_);
					g_hash_table_add (_tmp90_, _tmp94_);
					_tmp95_ = pamac_temporary_ignorepkgs;
					_tmp96_ = self->priv->current_package_displayed;
					_tmp97_ = pamac_package_get_name (_tmp96_);
					_tmp98_ = _tmp97_;
					g_hash_table_remove (_tmp95_, _tmp98_);
				}
				_tmp99_ = pamac_to_remove;
				_tmp100_ = self->priv->current_package_displayed;
				_tmp101_ = pamac_package_get_name (_tmp100_);
				_tmp102_ = _tmp101_;
				g_hash_table_remove (_tmp99_, _tmp102_);
			}
		}
	}
	pamac_manager_window_set_pending_operations (self);
	pamac_manager_window_refresh_listbox_buttons (self);
}

static void
_pamac_manager_window_on_remove_togglebutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                gpointer self)
{
	pamac_manager_window_on_remove_togglebutton_toggled ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_reinstall_togglebutton_toggled (PamacManagerWindow* self)
{
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->reinstall_togglebutton;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkToggleButton* _tmp3_;
		GHashTable* _tmp4_;
		PamacPackage* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		PamacPackage* _tmp8_;
		_tmp3_ = self->priv->remove_togglebutton;
		gtk_toggle_button_set_active (_tmp3_, FALSE);
		_tmp4_ = pamac_to_remove;
		_tmp5_ = self->priv->current_package_displayed;
		_tmp6_ = pamac_package_get_name (_tmp5_);
		_tmp7_ = _tmp6_;
		g_hash_table_remove (_tmp4_, _tmp7_);
		_tmp8_ = self->priv->current_package_displayed;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, PAMAC_TYPE_AUR_PACKAGE)) {
			GHashTable* _tmp9_;
			PamacPackage* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			gchar* _tmp13_;
			_tmp9_ = pamac_to_build;
			_tmp10_ = self->priv->current_package_displayed;
			_tmp11_ = pamac_package_get_name (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = g_strdup (_tmp12_);
			g_hash_table_add (_tmp9_, _tmp13_);
		} else {
			GHashTable* _tmp14_;
			PamacPackage* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			gchar* _tmp18_;
			_tmp14_ = pamac_to_install;
			_tmp15_ = self->priv->current_package_displayed;
			_tmp16_ = pamac_package_get_name (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = g_strdup (_tmp17_);
			g_hash_table_add (_tmp14_, _tmp18_);
		}
	} else {
		GHashTable* _tmp19_;
		PamacPackage* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		GHashTable* _tmp23_;
		PamacPackage* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		_tmp19_ = pamac_to_install;
		_tmp20_ = self->priv->current_package_displayed;
		_tmp21_ = pamac_package_get_name (_tmp20_);
		_tmp22_ = _tmp21_;
		g_hash_table_remove (_tmp19_, _tmp22_);
		_tmp23_ = pamac_to_build;
		_tmp24_ = self->priv->current_package_displayed;
		_tmp25_ = pamac_package_get_name (_tmp24_);
		_tmp26_ = _tmp25_;
		g_hash_table_remove (_tmp23_, _tmp26_);
	}
	pamac_manager_window_set_pending_operations (self);
	pamac_manager_window_refresh_listbox_buttons (self);
}

static void
_pamac_manager_window_on_reinstall_togglebutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                   gpointer self)
{
	pamac_manager_window_on_reinstall_togglebutton_toggled ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_populate_listbox (PamacManagerWindow* self)
{
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GdkWindow* _tmp20_;
	g_return_if_fail (self != NULL);
	if (self->priv->current_packages_list_length == ((guint) 0)) {
		GtkStack* _tmp0_;
		GdkWindow* _tmp1_;
		_tmp0_ = self->priv->packages_stack;
		gtk_stack_set_visible_child_name (_tmp0_, "no_item");
		_tmp1_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp1_, NULL);
		return;
	} else {
		GtkStack* _tmp2_;
		pamac_manager_window_clear_packages_listbox (self);
		_tmp2_ = self->priv->packages_stack;
		gtk_stack_set_visible_child_name (_tmp2_, "packages");
	}
	_tmp3_ = self->view_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "updates") == 0) {
		gboolean software_mode = FALSE;
		guint64 download_size = 0ULL;
		PamacLocalConfig* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		software_mode = FALSE;
		download_size = (guint64) 0;
		_tmp6_ = self->local_config;
		_tmp7_ = pamac_local_config_get_software_mode (_tmp6_);
		_tmp8_ = _tmp7_;
		if (_tmp8_) {
			GPtrArray* _tmp9_;
			_tmp9_ = self->priv->current_packages_list;
			{
				GPtrArray* pkg_collection = NULL;
				guint pkg_index = 0U;
				pkg_collection = _tmp9_;
				for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
					PamacPackage* pkg = NULL;
					pkg = (PamacPackage*) g_ptr_array_index (pkg_collection, pkg_index);
					{
						PamacPackage* _tmp10_;
						const gchar* _tmp11_;
						const gchar* _tmp12_;
						_tmp10_ = pkg;
						_tmp11_ = pamac_package_get_app_name (_tmp10_);
						_tmp12_ = _tmp11_;
						if (_tmp12_ == NULL) {
							PamacPackage* _tmp13_;
							guint64 _tmp14_;
							guint64 _tmp15_;
							_tmp13_ = pkg;
							_tmp14_ = pamac_package_get_download_size (_tmp13_);
							_tmp15_ = _tmp14_;
							download_size += _tmp15_;
							software_mode = TRUE;
						}
					}
				}
			}
		}
		if (software_mode) {
			pamac_manager_window_create_os_updates_row (self, download_size);
		}
	}
	{
		gboolean _tmp16_ = FALSE;
		_tmp16_ = TRUE;
		while (TRUE) {
			if (!_tmp16_) {
				if (!pamac_manager_window_need_more_packages (self)) {
					break;
				}
			}
			_tmp16_ = FALSE;
			pamac_manager_window_complete_packages_list (self);
		}
	}
	if (self->priv->scroll_to_top) {
		GtkScrolledWindow* _tmp17_;
		GtkAdjustment* _tmp18_;
		GtkAdjustment* _tmp19_;
		_tmp17_ = self->priv->packages_scrolledwindow;
		_tmp18_ = gtk_scrolled_window_get_vadjustment (_tmp17_);
		_tmp19_ = _tmp18_;
		gtk_adjustment_set_value (_tmp19_, (gdouble) 0);
	} else {
		self->priv->scroll_to_top = TRUE;
	}
	_tmp20_ = gtk_widget_get_window ((GtkWidget*) self);
	gdk_window_set_cursor (_tmp20_, NULL);
}

static Block14Data*
block14_data_ref (Block14Data* _data14_)
{
	g_atomic_int_inc (&_data14_->_ref_count_);
	return _data14_;
}

static void
block14_data_unref (void * _userdata_)
{
	Block14Data* _data14_;
	_data14_ = (Block14Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data14_->_ref_count_)) {
		GPtrArray* self;
		self = _data14_->self;
		_g_ptr_array_unref0 (self);
		g_slice_free (Block14Data, _data14_);
	}
}

static gint
__lambda1_ (Block14Data* _data14_,
            gconstpointer** a,
            gconstpointer** b)
{
	GPtrArray* self;
	gint result;
	self = _data14_->self;
	result = _data14_->compare_func ((gconstpointer**) (*a), (gconstpointer**) (*b));
	return result;
}

static gint
___lambda1__gcompare_data_func (gconstpointer a,
                                gconstpointer b,
                                gpointer self)
{
	gint result;
	result = __lambda1_ (self, a, b);
	return result;
}

static void
vala_g_ptr_array_sort (GPtrArray* self,
                       GCompareFunc compare_func)
{
	Block14Data* _data14_;
	g_return_if_fail (self != NULL);
	_data14_ = g_slice_new0 (Block14Data);
	_data14_->_ref_count_ = 1;
	_data14_->self = g_ptr_array_ref (self);
	_data14_->compare_func = compare_func;
	g_ptr_array_sort_with_data (self, ___lambda1__gcompare_data_func, _data14_);
	block14_data_unref (_data14_);
	_data14_ = NULL;
}

static gint
_pamac_sort_aur_by_relevance_gcompare_func (gconstpointer a,
                                            gconstpointer b)
{
	gint result;
	result = pamac_sort_aur_by_relevance ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static gint
_pamac_sort_pkgs_by_name_gcompare_func (gconstpointer a,
                                        gconstpointer b)
{
	gint result;
	result = pamac_sort_pkgs_by_name ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static gint
_pamac_sort_pkgs_by_repo_gcompare_func (gconstpointer a,
                                        gconstpointer b)
{
	gint result;
	result = pamac_sort_pkgs_by_repo ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static gint
_pamac_sort_pkgs_by_installed_size_gcompare_func (gconstpointer a,
                                                  gconstpointer b)
{
	gint result;
	result = pamac_sort_pkgs_by_installed_size ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static gint
_pamac_sort_aur_by_date_gcompare_func (gconstpointer a,
                                       gconstpointer b)
{
	gint result;
	result = pamac_sort_aur_by_date ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static void
pamac_manager_window_sort_aur_list (PamacManagerWindow* self,
                                    GPtrArray** pkgs)
{
	gint index = 0;
	GtkComboBoxText* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*pkgs != NULL);
	_tmp0_ = self->priv->sortby_combobox;
	_tmp1_ = gtk_combo_box_get_active ((GtkComboBox*) _tmp0_);
	_tmp2_ = _tmp1_;
	index = _tmp2_;
	switch (index) {
		case 0:
		{
			vala_g_ptr_array_sort (*pkgs, _pamac_sort_aur_by_relevance_gcompare_func);
			break;
		}
		case 1:
		{
			vala_g_ptr_array_sort (*pkgs, _pamac_sort_pkgs_by_name_gcompare_func);
			break;
		}
		case 2:
		{
			vala_g_ptr_array_sort (*pkgs, _pamac_sort_pkgs_by_repo_gcompare_func);
			break;
		}
		case 3:
		{
			vala_g_ptr_array_sort (*pkgs, _pamac_sort_pkgs_by_installed_size_gcompare_func);
			break;
		}
		case 4:
		{
			vala_g_ptr_array_sort (*pkgs, _pamac_sort_aur_by_date_gcompare_func);
			break;
		}
		default:
		{
			break;
		}
	}
}

static void
pamac_manager_window_populate_aur_list (PamacManagerWindow* self,
                                        GPtrArray* pkgs)
{
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pkgs != NULL);
	_tmp0_ = _g_ptr_array_ref0 (pkgs);
	_g_ptr_array_unref0 (self->priv->current_packages_list);
	self->priv->current_packages_list = _tmp0_;
	self->priv->current_packages_list_index = (guint) 0;
	_tmp1_ = self->priv->current_packages_list;
	_tmp2_ = vala_g_ptr_array_get_length (_tmp1_);
	_tmp3_ = _tmp2_;
	self->priv->current_packages_list_length = (guint) _tmp3_;
	pamac_manager_window_sort_aur_list (self, &self->priv->current_packages_list);
	pamac_manager_window_populate_listbox (self);
}

static gint
_pamac_sort_search_pkgs_by_relevance_gcompare_func (gconstpointer a,
                                                    gconstpointer b)
{
	gint result;
	result = pamac_sort_search_pkgs_by_relevance ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static gint
_pamac_sort_pkgs_by_relevance_gcompare_func (gconstpointer a,
                                             gconstpointer b)
{
	gint result;
	result = pamac_sort_pkgs_by_relevance ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static gint
_pamac_sort_pkgs_by_download_size_gcompare_func (gconstpointer a,
                                                 gconstpointer b)
{
	gint result;
	result = pamac_sort_pkgs_by_download_size ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static gint
_pamac_sort_pkgs_by_date_gcompare_func (gconstpointer a,
                                        gconstpointer b)
{
	gint result;
	result = pamac_sort_pkgs_by_date ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static void
pamac_manager_window_sort_packages_list (PamacManagerWindow* self,
                                         GPtrArray** pkgs)
{
	gint index = 0;
	GtkComboBoxText* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*pkgs != NULL);
	_tmp0_ = self->priv->sortby_combobox;
	_tmp1_ = gtk_combo_box_get_active ((GtkComboBox*) _tmp0_);
	_tmp2_ = _tmp1_;
	index = _tmp2_;
	switch (index) {
		case 0:
		{
			GtkStack* _tmp3_;
			const gchar* _tmp4_;
			const gchar* _tmp5_;
			_tmp3_ = self->view_stack;
			_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
			_tmp5_ = _tmp4_;
			if (g_strcmp0 (_tmp5_, "search") == 0) {
				vala_g_ptr_array_sort (*pkgs, _pamac_sort_search_pkgs_by_relevance_gcompare_func);
			} else {
				vala_g_ptr_array_sort (*pkgs, _pamac_sort_pkgs_by_relevance_gcompare_func);
			}
			break;
		}
		case 1:
		{
			vala_g_ptr_array_sort (*pkgs, _pamac_sort_pkgs_by_name_gcompare_func);
			break;
		}
		case 2:
		{
			vala_g_ptr_array_sort (*pkgs, _pamac_sort_pkgs_by_repo_gcompare_func);
			break;
		}
		case 3:
		{
			GtkStack* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_;
			_tmp6_ = self->view_stack;
			_tmp7_ = gtk_stack_get_visible_child_name (_tmp6_);
			_tmp8_ = _tmp7_;
			if (g_strcmp0 (_tmp8_, "updates") == 0) {
				vala_g_ptr_array_sort (*pkgs, _pamac_sort_pkgs_by_download_size_gcompare_func);
			} else {
				vala_g_ptr_array_sort (*pkgs, _pamac_sort_pkgs_by_installed_size_gcompare_func);
			}
			break;
		}
		case 4:
		{
			vala_g_ptr_array_sort (*pkgs, _pamac_sort_pkgs_by_date_gcompare_func);
			break;
		}
		default:
		{
			break;
		}
	}
}

static void
pamac_manager_window_populate_packages_list (PamacManagerWindow* self,
                                             GPtrArray* pkgs)
{
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pkgs != NULL);
	_tmp0_ = _g_ptr_array_ref0 (pkgs);
	_g_ptr_array_unref0 (self->priv->current_packages_list);
	self->priv->current_packages_list = _tmp0_;
	self->priv->current_packages_list_index = (guint) 0;
	_tmp1_ = self->priv->current_packages_list;
	_tmp2_ = vala_g_ptr_array_get_length (_tmp1_);
	_tmp3_ = _tmp2_;
	self->priv->current_packages_list_length = (guint) _tmp3_;
	pamac_manager_window_sort_packages_list (self, &self->priv->current_packages_list);
	pamac_manager_window_populate_listbox (self);
}

static gboolean
pamac_manager_window_need_more_packages (PamacManagerWindow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (self->priv->current_packages_list_index < self->priv->current_packages_list_length) {
		GtkRequisition natural_size = {0};
		GtkFlowBox* _tmp0_;
		GtkRequisition _tmp1_ = {0};
		GtkScrolledWindow* _tmp2_;
		GtkAdjustment* _tmp3_;
		GtkAdjustment* _tmp4_;
		gdouble _tmp5_;
		gdouble _tmp6_;
		GtkRequisition _tmp7_;
		_tmp0_ = self->priv->packages_listbox;
		gtk_widget_get_preferred_size ((GtkWidget*) _tmp0_, NULL, &_tmp1_);
		natural_size = _tmp1_;
		_tmp2_ = self->priv->packages_scrolledwindow;
		_tmp3_ = gtk_scrolled_window_get_vadjustment (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = gtk_adjustment_get_page_size (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = natural_size;
		if (_tmp6_ > ((gdouble) _tmp7_.height)) {
			result = TRUE;
			return result;
		}
	}
	result = FALSE;
	return result;
}

static gboolean
pamac_manager_window_complete_packages_list (PamacManagerWindow* self)
{
	gboolean populated = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	populated = FALSE;
	if (self->priv->current_packages_list_index < self->priv->current_packages_list_length) {
		guint i = 0U;
		i = (guint) 0;
		while (TRUE) {
			PamacPackage* pkg = NULL;
			GPtrArray* _tmp0_;
			gconstpointer _tmp1_;
			gboolean _tmp2_ = FALSE;
			PamacLocalConfig* _tmp3_;
			gboolean _tmp4_;
			gboolean _tmp5_;
			guint _tmp14_;
			if (!(i < ((guint) 20))) {
				break;
			}
			_tmp0_ = self->priv->current_packages_list;
			_tmp1_ = g_ptr_array_index (_tmp0_, self->priv->current_packages_list_index);
			pkg = (PamacPackage*) _tmp1_;
			_tmp3_ = self->local_config;
			_tmp4_ = pamac_local_config_get_software_mode (_tmp3_);
			_tmp5_ = _tmp4_;
			if (!_tmp5_) {
				_tmp2_ = TRUE;
			} else {
				PamacPackage* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				_tmp6_ = pkg;
				_tmp7_ = pamac_package_get_app_name (_tmp6_);
				_tmp8_ = _tmp7_;
				_tmp2_ = _tmp8_ != NULL;
			}
			if (_tmp2_) {
				PamacPackageRow* row = NULL;
				PamacPackage* _tmp9_;
				PamacPackageRow* _tmp10_;
				GtkFlowBox* _tmp11_;
				PamacPackageRow* _tmp12_;
				guint _tmp13_;
				_tmp9_ = pkg;
				_tmp10_ = pamac_manager_window_create_packagelist_row (self, _tmp9_);
				row = _tmp10_;
				_tmp11_ = self->priv->packages_listbox;
				_tmp12_ = row;
				gtk_container_add ((GtkContainer*) _tmp11_, (GtkWidget*) _tmp12_);
				populated = TRUE;
				_tmp13_ = i;
				i = _tmp13_ + 1;
				_g_object_unref0 (row);
			}
			_tmp14_ = self->priv->current_packages_list_index;
			self->priv->current_packages_list_index = _tmp14_ + 1;
			if (self->priv->current_packages_list_index == self->priv->current_packages_list_length) {
				break;
			}
		}
	}
	result = populated;
	return result;
}

static Block15Data*
block15_data_ref (Block15Data* _data15_)
{
	g_atomic_int_inc (&_data15_->_ref_count_);
	return _data15_;
}

static void
block15_data_unref (void * _userdata_)
{
	Block15Data* _data15_;
	_data15_ = (Block15Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data15_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data15_->self;
		_g_object_unref0 (_data15_->pixbuf);
		_g_object_unref0 (_data15_->row);
		_g_object_unref0 (_data15_->pkg);
		_g_object_unref0 (self);
		g_slice_free (Block15Data, _data15_);
	}
}

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

static void
_____lambda16__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda16_ (self, source_object, res);
	block15_data_unref (self);
}

static void
______lambda17_ (Block15Data* _data15_,
                 GObject* obj,
                 GAsyncResult* res)
{
	PamacManagerWindow* self;
	gchar* downloaded_pixbuf_path = NULL;
	PamacDatabaseGtk* _tmp0_;
	gchar* _tmp1_;
	GError* _inner_error0_ = NULL;
	self = _data15_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_installed_snap_icon_finish ((PamacDatabase*) _tmp0_, res);
	downloaded_pixbuf_path = _tmp1_;
	{
		GdkPixbuf* _tmp2_ = NULL;
		GdkPixbuf* _tmp3_;
		GdkPixbuf* _tmp4_;
		_tmp3_ = gdk_pixbuf_new_from_file_at_scale (downloaded_pixbuf_path, 64, 64, TRUE, &_inner_error0_);
		_tmp2_ = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp4_ = _tmp2_;
		_tmp2_ = NULL;
		_g_object_unref0 (_data15_->pixbuf);
		_data15_->pixbuf = _tmp4_;
		_g_object_unref0 (_tmp2_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		GError* _tmp7_;
		const gchar* _tmp8_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = pamac_package_get_name (_data15_->pkg);
		_tmp6_ = _tmp5_;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		g_warning ("manager_window.vala:2421: %s: %s", _tmp6_, _tmp8_);
		_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
_______lambda17__gasync_ready_callback (GObject* source_object,
                                        GAsyncResult* res,
                                        gpointer self)
{
	______lambda17_ (self, source_object, res);
	block15_data_unref (self);
}

static void
pamac_manager_window_set_row_app_icon (PamacManagerWindow* self,
                                       PamacPackageRow* row,
                                       PamacPackage* pkg)
{
	Block15Data* _data15_;
	PamacPackageRow* _tmp0_;
	PamacPackage* _tmp1_;
	const gchar* icon = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GtkImage* _tmp41_;
	GdkPixbuf* _tmp42_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	g_return_if_fail (pkg != NULL);
	_data15_ = g_slice_new0 (Block15Data);
	_data15_->_ref_count_ = 1;
	_data15_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (row);
	_g_object_unref0 (_data15_->row);
	_data15_->row = _tmp0_;
	_tmp1_ = _g_object_ref0 (pkg);
	_g_object_unref0 (_data15_->pkg);
	_data15_->pkg = _tmp1_;
	_tmp2_ = pamac_package_get_icon (_data15_->pkg);
	_tmp3_ = _tmp2_;
	icon = _tmp3_;
	_tmp4_ = icon;
	if (_tmp4_ != NULL) {
		const gchar* _tmp5_;
		_tmp5_ = icon;
		if (g_str_has_prefix (_tmp5_, "http")) {
			GdkPixbuf* _tmp6_;
			GdkPixbuf* _tmp7_;
			PamacTransactionGtk* _tmp8_;
			const gchar* _tmp9_;
			_tmp6_ = self->priv->package_icon;
			_tmp7_ = _g_object_ref0 (_tmp6_);
			_g_object_unref0 (_data15_->pixbuf);
			_data15_->pixbuf = _tmp7_;
			_tmp8_ = self->transaction;
			_tmp9_ = icon;
			pamac_transaction_gtk_get_icon_pixbuf (_tmp8_, _tmp9_, _____lambda16__gasync_ready_callback, block15_data_ref (_data15_));
		} else {
			{
				GdkPixbuf* _tmp10_ = NULL;
				const gchar* _tmp11_;
				GdkPixbuf* _tmp12_;
				GdkPixbuf* _tmp13_;
				_tmp11_ = icon;
				_tmp12_ = gdk_pixbuf_new_from_file_at_scale (_tmp11_, 64, 64, TRUE, &_inner_error0_);
				_tmp10_ = _tmp12_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				_tmp13_ = _tmp10_;
				_tmp10_ = NULL;
				_g_object_unref0 (_data15_->pixbuf);
				_data15_->pixbuf = _tmp13_;
				_g_object_unref0 (_tmp10_);
			}
			goto __finally0;
			__catch0_g_error:
			{
				gboolean _tmp14_ = FALSE;
				g_clear_error (&_inner_error0_);
				if (G_TYPE_CHECK_INSTANCE_TYPE (_data15_->pkg, PAMAC_TYPE_SNAP_PACKAGE)) {
					const gchar* _tmp15_;
					const gchar* _tmp16_;
					_tmp15_ = pamac_package_get_installed_version (_data15_->pkg);
					_tmp16_ = _tmp15_;
					_tmp14_ = _tmp16_ != NULL;
				} else {
					_tmp14_ = FALSE;
				}
				if (_tmp14_) {
					GdkPixbuf* _tmp17_;
					GdkPixbuf* _tmp18_;
					PamacDatabaseGtk* _tmp19_;
					const gchar* _tmp20_;
					const gchar* _tmp21_;
					_tmp17_ = self->priv->package_icon;
					_tmp18_ = _g_object_ref0 (_tmp17_);
					_g_object_unref0 (_data15_->pixbuf);
					_data15_->pixbuf = _tmp18_;
					_tmp19_ = self->priv->_database;
					_tmp20_ = pamac_package_get_name (_data15_->pkg);
					_tmp21_ = _tmp20_;
					pamac_database_get_installed_snap_icon_async ((PamacDatabase*) _tmp19_, _tmp21_, _______lambda17__gasync_ready_callback, block15_data_ref (_data15_));
				} else {
					gchar* new_icon = NULL;
					const gchar* _tmp22_;
					gchar* _tmp23_;
					const gchar* _tmp24_;
					_tmp22_ = icon;
					_tmp23_ = g_strdup (_tmp22_);
					new_icon = _tmp23_;
					_tmp24_ = icon;
					if (string_contains (_tmp24_, "extra")) {
						const gchar* _tmp25_;
						gchar* _tmp26_;
						_tmp25_ = icon;
						_tmp26_ = string_replace (_tmp25_, "extra", "community");
						_g_free0 (new_icon);
						new_icon = _tmp26_;
					} else {
						const gchar* _tmp27_;
						_tmp27_ = icon;
						if (string_contains (_tmp27_, "community")) {
							const gchar* _tmp28_;
							gchar* _tmp29_;
							_tmp28_ = icon;
							_tmp29_ = string_replace (_tmp28_, "community", "extra");
							_g_free0 (new_icon);
							new_icon = _tmp29_;
						}
					}
					{
						GdkPixbuf* _tmp30_ = NULL;
						const gchar* _tmp31_;
						GdkPixbuf* _tmp32_;
						GdkPixbuf* _tmp33_;
						_tmp31_ = new_icon;
						_tmp32_ = gdk_pixbuf_new_from_file_at_scale (_tmp31_, 64, 64, TRUE, &_inner_error0_);
						_tmp30_ = _tmp32_;
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							goto __catch1_g_error;
						}
						_tmp33_ = _tmp30_;
						_tmp30_ = NULL;
						_g_object_unref0 (_data15_->pixbuf);
						_data15_->pixbuf = _tmp33_;
						_g_object_unref0 (_tmp30_);
					}
					goto __finally1;
					__catch1_g_error:
					{
						GError* e = NULL;
						GdkPixbuf* _tmp34_;
						GdkPixbuf* _tmp35_;
						const gchar* _tmp36_;
						GError* _tmp37_;
						const gchar* _tmp38_;
						e = _inner_error0_;
						_inner_error0_ = NULL;
						_tmp34_ = self->priv->package_icon;
						_tmp35_ = _g_object_ref0 (_tmp34_);
						_g_object_unref0 (_data15_->pixbuf);
						_data15_->pixbuf = _tmp35_;
						_tmp36_ = icon;
						_tmp37_ = e;
						_tmp38_ = _tmp37_->message;
						g_warning ("manager_window.vala:2436: %s: %s", _tmp36_, _tmp38_);
						_g_error_free0 (e);
					}
					__finally1:
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						_g_free0 (new_icon);
						block15_data_unref (_data15_);
						_data15_ = 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);
				}
			}
			__finally0:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				block15_data_unref (_data15_);
				_data15_ = 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* _tmp39_;
		GdkPixbuf* _tmp40_;
		_tmp39_ = self->priv->package_icon;
		_tmp40_ = _g_object_ref0 (_tmp39_);
		_g_object_unref0 (_data15_->pixbuf);
		_data15_->pixbuf = _tmp40_;
	}
	_tmp41_ = _data15_->row->app_icon;
	_tmp42_ = _data15_->pixbuf;
	g_object_set (_tmp41_, "pixbuf", _tmp42_, NULL);
	block15_data_unref (_data15_);
	_data15_ = NULL;
}

static Block16Data*
block16_data_ref (Block16Data* _data16_)
{
	g_atomic_int_inc (&_data16_->_ref_count_);
	return _data16_;
}

static void
block16_data_unref (void * _userdata_)
{
	Block16Data* _data16_;
	_data16_ = (Block16Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data16_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data16_->self;
		_g_object_unref0 (_data16_->pkg);
		_g_object_unref0 (self);
		g_slice_free (Block16Data, _data16_);
	}
}

static void
___lambda18_ (Block16Data* _data16_,
              GtkToggleButton* button)
{
	PamacManagerWindow* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	PamacSimpleRow* _tmp23_;
	GHashTable* _tmp24_;
	guint _tmp25_;
	guint _tmp26_;
	self = _data16_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = gtk_toggle_button_get_active (button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GHashTable* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		GHashTable* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		PamacDatabaseGtk* _tmp9_;
		PamacConfig* _tmp10_;
		PamacConfig* _tmp11_;
		GHashTable* _tmp12_;
		GHashTable* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		_tmp2_ = pamac_to_update;
		_tmp3_ = pamac_package_get_id (_data16_->pkg);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		g_hash_table_add (_tmp2_, _tmp5_);
		_tmp6_ = pamac_temporary_ignorepkgs;
		_tmp7_ = pamac_package_get_id (_data16_->pkg);
		_tmp8_ = _tmp7_;
		g_hash_table_remove (_tmp6_, _tmp8_);
		_tmp9_ = self->priv->_database;
		_tmp10_ = pamac_database_get_config ((PamacDatabase*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = pamac_config_get_ignorepkgs (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = pamac_package_get_id (_data16_->pkg);
		_tmp15_ = _tmp14_;
		g_hash_table_remove (_tmp13_, _tmp15_);
	} else {
		GHashTable* _tmp16_;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		GHashTable* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		gchar* _tmp22_;
		_tmp16_ = pamac_to_update;
		_tmp17_ = pamac_package_get_id (_data16_->pkg);
		_tmp18_ = _tmp17_;
		g_hash_table_remove (_tmp16_, _tmp18_);
		_tmp19_ = pamac_temporary_ignorepkgs;
		_tmp20_ = pamac_package_get_id (_data16_->pkg);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_strdup (_tmp21_);
		g_hash_table_add (_tmp19_, _tmp22_);
	}
	_tmp23_ = self->priv->updates_ignored_row;
	_tmp24_ = pamac_temporary_ignorepkgs;
	_tmp25_ = g_hash_table_size (_tmp24_);
	_tmp26_ = _tmp25_;
	gtk_widget_set_visible ((GtkWidget*) _tmp23_, _tmp26_ > ((guint) 0));
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
____lambda18__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                         gpointer self)
{
	___lambda18_ (self, _sender);
}

static void
_____lambda20_ (Block16Data* _data16_,
                GtkToggleButton* button)
{
	PamacManagerWindow* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data16_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = gtk_toggle_button_get_active (button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GHashTable* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp2_ = pamac_to_build;
		_tmp3_ = pamac_package_get_name (_data16_->pkg);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		g_hash_table_add (_tmp2_, _tmp5_);
	} else {
		GHashTable* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp6_ = pamac_to_build;
		_tmp7_ = pamac_package_get_name (_data16_->pkg);
		_tmp8_ = _tmp7_;
		g_hash_table_remove (_tmp6_, _tmp8_);
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
______lambda20__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                           gpointer self)
{
	_____lambda20_ (self, _sender);
}

static void
______lambda21_ (Block16Data* _data16_,
                 GtkToggleButton* button)
{
	PamacManagerWindow* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data16_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = gtk_toggle_button_get_active (button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GHashTable* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		PamacSnapPackage* _tmp6_;
		_tmp2_ = pamac_snap_to_install;
		_tmp3_ = pamac_package_get_name (_data16_->pkg);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_SNAP_PACKAGE) ? ((PamacSnapPackage*) _data16_->pkg) : NULL);
		g_hash_table_insert (_tmp2_, _tmp5_, _tmp6_);
	} else {
		GHashTable* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp7_ = pamac_snap_to_install;
		_tmp8_ = pamac_package_get_name (_data16_->pkg);
		_tmp9_ = _tmp8_;
		g_hash_table_remove (_tmp7_, _tmp9_);
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
_______lambda21__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                            gpointer self)
{
	______lambda21_ (self, _sender);
}

static void
_______lambda22_ (Block16Data* _data16_,
                  GtkToggleButton* button)
{
	PamacManagerWindow* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data16_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = gtk_toggle_button_get_active (button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GHashTable* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		PamacFlatpakPackage* _tmp6_;
		_tmp2_ = pamac_flatpak_to_install;
		_tmp3_ = pamac_package_get_id (_data16_->pkg);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_FLATPAK_PACKAGE) ? ((PamacFlatpakPackage*) _data16_->pkg) : NULL);
		g_hash_table_insert (_tmp2_, _tmp5_, _tmp6_);
	} else {
		GHashTable* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp7_ = pamac_flatpak_to_install;
		_tmp8_ = pamac_package_get_id (_data16_->pkg);
		_tmp9_ = _tmp8_;
		g_hash_table_remove (_tmp7_, _tmp9_);
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
________lambda22__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self)
{
	_______lambda22_ (self, _sender);
}

static void
_______lambda23_ (Block16Data* _data16_,
                  GtkToggleButton* button)
{
	PamacManagerWindow* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data16_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = gtk_toggle_button_get_active (button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GHashTable* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp2_ = pamac_to_install;
		_tmp3_ = pamac_package_get_name (_data16_->pkg);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		g_hash_table_add (_tmp2_, _tmp5_);
	} else {
		GHashTable* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp6_ = pamac_to_install;
		_tmp7_ = pamac_package_get_name (_data16_->pkg);
		_tmp8_ = _tmp7_;
		g_hash_table_remove (_tmp6_, _tmp8_);
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
________lambda23__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self)
{
	_______lambda23_ (self, _sender);
}

static void
_____lambda24_ (Block16Data* _data16_,
                GtkToggleButton* button)
{
	PamacManagerWindow* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data16_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = gtk_toggle_button_get_active (button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GHashTable* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		PamacSnapPackage* _tmp6_;
		_tmp2_ = pamac_snap_to_remove;
		_tmp3_ = pamac_package_get_name (_data16_->pkg);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_SNAP_PACKAGE) ? ((PamacSnapPackage*) _data16_->pkg) : NULL);
		g_hash_table_insert (_tmp2_, _tmp5_, _tmp6_);
	} else {
		GHashTable* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp7_ = pamac_snap_to_remove;
		_tmp8_ = pamac_package_get_name (_data16_->pkg);
		_tmp9_ = _tmp8_;
		g_hash_table_remove (_tmp7_, _tmp9_);
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
______lambda24__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                           gpointer self)
{
	_____lambda24_ (self, _sender);
}

static void
______lambda25_ (Block16Data* _data16_,
                 GtkToggleButton* button)
{
	PamacManagerWindow* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data16_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = gtk_toggle_button_get_active (button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GHashTable* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		PamacFlatpakPackage* _tmp6_;
		_tmp2_ = pamac_flatpak_to_remove;
		_tmp3_ = pamac_package_get_id (_data16_->pkg);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_FLATPAK_PACKAGE) ? ((PamacFlatpakPackage*) _data16_->pkg) : NULL);
		g_hash_table_insert (_tmp2_, _tmp5_, _tmp6_);
	} else {
		GHashTable* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp7_ = pamac_flatpak_to_remove;
		_tmp8_ = pamac_package_get_id (_data16_->pkg);
		_tmp9_ = _tmp8_;
		g_hash_table_remove (_tmp7_, _tmp9_);
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
_______lambda25__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                            gpointer self)
{
	______lambda25_ (self, _sender);
}

static void
______lambda26_ (Block16Data* _data16_,
                 GtkToggleButton* button)
{
	PamacManagerWindow* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data16_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = gtk_toggle_button_get_active (button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GHashTable* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		GHashTable* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		GHashTable* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp2_ = pamac_to_install;
		_tmp3_ = pamac_package_get_name (_data16_->pkg);
		_tmp4_ = _tmp3_;
		g_hash_table_remove (_tmp2_, _tmp4_);
		_tmp5_ = pamac_to_update;
		_tmp6_ = pamac_package_get_name (_data16_->pkg);
		_tmp7_ = _tmp6_;
		if (g_hash_table_contains (_tmp5_, _tmp7_)) {
			GHashTable* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			GHashTable* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			gchar* _tmp14_;
			_tmp8_ = pamac_to_update;
			_tmp9_ = pamac_package_get_name (_data16_->pkg);
			_tmp10_ = _tmp9_;
			g_hash_table_remove (_tmp8_, _tmp10_);
			_tmp11_ = pamac_temporary_ignorepkgs;
			_tmp12_ = pamac_package_get_name (_data16_->pkg);
			_tmp13_ = _tmp12_;
			_tmp14_ = g_strdup (_tmp13_);
			g_hash_table_add (_tmp11_, _tmp14_);
		}
		_tmp15_ = pamac_to_remove;
		_tmp16_ = pamac_package_get_name (_data16_->pkg);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_strdup (_tmp17_);
		g_hash_table_add (_tmp15_, _tmp18_);
	} else {
		GHashTable* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		GHashTable* _tmp29_;
		const gchar* _tmp30_;
		const gchar* _tmp31_;
		_tmp19_ = pamac_temporary_ignorepkgs;
		_tmp20_ = pamac_package_get_name (_data16_->pkg);
		_tmp21_ = _tmp20_;
		if (g_hash_table_contains (_tmp19_, _tmp21_)) {
			GHashTable* _tmp22_;
			const gchar* _tmp23_;
			const gchar* _tmp24_;
			gchar* _tmp25_;
			GHashTable* _tmp26_;
			const gchar* _tmp27_;
			const gchar* _tmp28_;
			_tmp22_ = pamac_to_update;
			_tmp23_ = pamac_package_get_name (_data16_->pkg);
			_tmp24_ = _tmp23_;
			_tmp25_ = g_strdup (_tmp24_);
			g_hash_table_add (_tmp22_, _tmp25_);
			_tmp26_ = pamac_temporary_ignorepkgs;
			_tmp27_ = pamac_package_get_name (_data16_->pkg);
			_tmp28_ = _tmp27_;
			g_hash_table_remove (_tmp26_, _tmp28_);
		}
		_tmp29_ = pamac_to_remove;
		_tmp30_ = pamac_package_get_name (_data16_->pkg);
		_tmp31_ = _tmp30_;
		g_hash_table_remove (_tmp29_, _tmp31_);
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
_______lambda26__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                            gpointer self)
{
	______lambda26_ (self, _sender);
}

static PamacPackageRow*
pamac_manager_window_create_packagelist_row (PamacManagerWindow* self,
                                             PamacPackage* pkg)
{
	Block16Data* _data16_;
	PamacPackage* _tmp0_;
	gboolean is_update = FALSE;
	GtkStack* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	PamacPackageRow* row = NULL;
	gboolean _tmp4_;
	PamacPackageRow* _tmp5_;
	const gchar* app_name = NULL;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	PamacAlpmPackage* alpm_pkg = NULL;
	PamacAlpmPackage* _tmp8_;
	gboolean software_mode = FALSE;
	PamacLocalConfig* _tmp9_;
	gboolean _tmp10_;
	gboolean _tmp11_;
	const gchar* _tmp12_;
	const gchar* desc = NULL;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp89_;
	const gchar* _tmp90_;
	PamacPackageRow* _tmp133_;
	PamacTransactionGtk* _tmp134_;
	const gchar* _tmp135_;
	const gchar* _tmp136_;
	PamacPackageRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (pkg != NULL, NULL);
	_data16_ = g_slice_new0 (Block16Data);
	_data16_->_ref_count_ = 1;
	_data16_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (pkg);
	_g_object_unref0 (_data16_->pkg);
	_data16_->pkg = _tmp0_;
	_tmp1_ = self->view_stack;
	_tmp2_ = gtk_stack_get_visible_child_name (_tmp1_);
	_tmp3_ = _tmp2_;
	is_update = g_strcmp0 (_tmp3_, "updates") == 0;
	_tmp4_ = self->priv->_mobile;
	_tmp5_ = pamac_package_row_new (_data16_->pkg, _tmp4_);
	g_object_ref_sink (_tmp5_);
	row = _tmp5_;
	_tmp6_ = pamac_package_get_app_name (_data16_->pkg);
	_tmp7_ = _tmp6_;
	app_name = _tmp7_;
	_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) _data16_->pkg) : NULL);
	alpm_pkg = _tmp8_;
	_tmp9_ = self->local_config;
	_tmp10_ = pamac_local_config_get_software_mode (_tmp9_);
	_tmp11_ = _tmp10_;
	software_mode = _tmp11_;
	_tmp12_ = app_name;
	if (_tmp12_ == NULL) {
		PamacPackageRow* _tmp13_;
		GtkLabel* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		_tmp13_ = row;
		_tmp14_ = _tmp13_->name_label;
		_tmp15_ = pamac_package_get_name (_data16_->pkg);
		_tmp16_ = _tmp15_;
		gtk_label_set_label (_tmp14_, _tmp16_);
	} else {
		gboolean _tmp17_ = FALSE;
		PamacAlpmPackage* _tmp18_;
		_tmp18_ = alpm_pkg;
		if (_tmp18_ != NULL) {
			_tmp17_ = !software_mode;
		} else {
			_tmp17_ = FALSE;
		}
		if (_tmp17_) {
			PamacPackageRow* _tmp19_;
			GtkLabel* _tmp20_;
			const gchar* _tmp21_;
			const gchar* _tmp22_;
			const gchar* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			_tmp19_ = row;
			_tmp20_ = _tmp19_->name_label;
			_tmp21_ = app_name;
			_tmp22_ = pamac_package_get_name (_data16_->pkg);
			_tmp23_ = _tmp22_;
			_tmp24_ = g_strdup_printf ("%s (%s)", _tmp21_, _tmp23_);
			_tmp25_ = _tmp24_;
			gtk_label_set_label (_tmp20_, _tmp25_);
			_g_free0 (_tmp25_);
		} else {
			PamacPackageRow* _tmp26_;
			GtkLabel* _tmp27_;
			const gchar* _tmp28_;
			_tmp26_ = row;
			_tmp27_ = _tmp26_->name_label;
			_tmp28_ = app_name;
			gtk_label_set_label (_tmp27_, _tmp28_);
		}
	}
	_tmp29_ = pamac_package_get_desc (_data16_->pkg);
	_tmp30_ = _tmp29_;
	desc = _tmp30_;
	_tmp31_ = desc;
	if (_tmp31_ != NULL) {
		PamacPackageRow* _tmp32_;
		GtkLabel* _tmp33_;
		const gchar* _tmp34_;
		gchar* _tmp35_;
		gchar* _tmp36_;
		_tmp32_ = row;
		_tmp33_ = _tmp32_->desc_label;
		_tmp34_ = desc;
		_tmp35_ = g_markup_escape_text (_tmp34_, (gssize) -1);
		_tmp36_ = _tmp35_;
		gtk_label_set_label (_tmp33_, _tmp36_);
		_g_free0 (_tmp36_);
	}
	if (is_update) {
		guint64 _tmp57_;
		guint64 _tmp58_;
		if (software_mode) {
			PamacPackageRow* _tmp37_;
			GtkLabel* _tmp38_;
			_tmp37_ = row;
			_tmp38_ = _tmp37_->version_label;
			gtk_widget_set_visible ((GtkWidget*) _tmp38_, FALSE);
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_FLATPAK_PACKAGE)) {
				const gchar* version = NULL;
				const gchar* _tmp39_;
				const gchar* _tmp40_;
				const gchar* _tmp41_;
				_tmp39_ = pamac_package_get_version (_data16_->pkg);
				_tmp40_ = _tmp39_;
				version = _tmp40_;
				_tmp41_ = version;
				if (_tmp41_ != NULL) {
					PamacPackageRow* _tmp42_;
					GtkLabel* _tmp43_;
					const gchar* _tmp44_;
					_tmp42_ = row;
					_tmp43_ = _tmp42_->version_label;
					_tmp44_ = version;
					gtk_label_set_label (_tmp43_, _tmp44_);
				} else {
					PamacPackageRow* _tmp45_;
					GtkLabel* _tmp46_;
					_tmp45_ = row;
					_tmp46_ = _tmp45_->version_label;
					gtk_widget_set_visible ((GtkWidget*) _tmp46_, FALSE);
				}
			} else {
				PamacPackageRow* _tmp47_;
				GtkLabel* _tmp48_;
				const gchar* _tmp49_;
				const gchar* _tmp50_;
				PamacPackageRow* _tmp51_;
				GtkLabel* _tmp52_;
				const gchar* _tmp53_;
				const gchar* _tmp54_;
				PamacPackageRow* _tmp55_;
				GtkLabel* _tmp56_;
				_tmp47_ = row;
				_tmp48_ = _tmp47_->version_label;
				_tmp49_ = pamac_package_get_version (_data16_->pkg);
				_tmp50_ = _tmp49_;
				gtk_label_set_label (_tmp48_, _tmp50_);
				_tmp51_ = row;
				_tmp52_ = _tmp51_->old_version_label;
				_tmp53_ = pamac_package_get_installed_version (_data16_->pkg);
				_tmp54_ = _tmp53_;
				gtk_label_set_label (_tmp52_, _tmp54_);
				_tmp55_ = row;
				_tmp56_ = _tmp55_->old_version_label;
				gtk_widget_set_visible ((GtkWidget*) _tmp56_, TRUE);
			}
		}
		_tmp57_ = pamac_package_get_download_size (_data16_->pkg);
		_tmp58_ = _tmp57_;
		if (_tmp58_ > ((guint64) 0)) {
			PamacPackageRow* _tmp59_;
			GtkLabel* _tmp60_;
			guint64 _tmp61_;
			guint64 _tmp62_;
			gchar* _tmp63_;
			gchar* _tmp64_;
			_tmp59_ = row;
			_tmp60_ = _tmp59_->size_label;
			_tmp61_ = pamac_package_get_download_size (_data16_->pkg);
			_tmp62_ = _tmp61_;
			_tmp63_ = g_format_size_full (_tmp62_, G_FORMAT_SIZE_DEFAULT);
			_tmp64_ = _tmp63_;
			gtk_label_set_label (_tmp60_, _tmp64_);
			_g_free0 (_tmp64_);
		}
	} else {
		gboolean _tmp65_ = FALSE;
		guint64 _tmp81_;
		guint64 _tmp82_;
		if (software_mode) {
			_tmp65_ = TRUE;
		} else {
			const gchar* _tmp66_;
			const gchar* _tmp67_;
			_tmp66_ = pamac_package_get_version (_data16_->pkg);
			_tmp67_ = _tmp66_;
			_tmp65_ = _tmp67_ == NULL;
		}
		if (_tmp65_) {
			PamacPackageRow* _tmp68_;
			GtkLabel* _tmp69_;
			_tmp68_ = row;
			_tmp69_ = _tmp68_->version_label;
			gtk_widget_set_visible ((GtkWidget*) _tmp69_, FALSE);
		} else {
			const gchar* installed_version = NULL;
			const gchar* _tmp70_;
			const gchar* _tmp71_;
			const gchar* _tmp72_;
			_tmp70_ = pamac_package_get_installed_version (_data16_->pkg);
			_tmp71_ = _tmp70_;
			installed_version = _tmp71_;
			_tmp72_ = installed_version;
			if (_tmp72_ == NULL) {
				PamacPackageRow* _tmp73_;
				GtkLabel* _tmp74_;
				const gchar* _tmp75_;
				const gchar* _tmp76_;
				_tmp73_ = row;
				_tmp74_ = _tmp73_->version_label;
				_tmp75_ = pamac_package_get_version (_data16_->pkg);
				_tmp76_ = _tmp75_;
				gtk_label_set_label (_tmp74_, _tmp76_);
			} else {
				PamacPackageRow* _tmp77_;
				GtkLabel* _tmp78_;
				const gchar* _tmp79_;
				const gchar* _tmp80_;
				_tmp77_ = row;
				_tmp78_ = _tmp77_->version_label;
				_tmp79_ = pamac_package_get_installed_version (_data16_->pkg);
				_tmp80_ = _tmp79_;
				gtk_label_set_label (_tmp78_, _tmp80_);
			}
		}
		_tmp81_ = pamac_package_get_installed_size (_data16_->pkg);
		_tmp82_ = _tmp81_;
		if (_tmp82_ > ((guint64) 0)) {
			PamacPackageRow* _tmp83_;
			GtkLabel* _tmp84_;
			guint64 _tmp85_;
			guint64 _tmp86_;
			gchar* _tmp87_;
			gchar* _tmp88_;
			_tmp83_ = row;
			_tmp84_ = _tmp83_->size_label;
			_tmp85_ = pamac_package_get_installed_size (_data16_->pkg);
			_tmp86_ = _tmp85_;
			_tmp87_ = g_format_size_full (_tmp86_, G_FORMAT_SIZE_DEFAULT);
			_tmp88_ = _tmp87_;
			gtk_label_set_label (_tmp84_, _tmp88_);
			_g_free0 (_tmp88_);
		}
	}
	_tmp89_ = pamac_package_get_repo (_data16_->pkg);
	_tmp90_ = _tmp89_;
	if (_tmp90_ != NULL) {
		PamacAlpmPackage* _tmp91_;
		_tmp91_ = alpm_pkg;
		if (_tmp91_ != NULL) {
			gboolean _tmp92_ = FALSE;
			gboolean _tmp93_ = FALSE;
			gboolean _tmp94_ = FALSE;
			const gchar* _tmp95_;
			const gchar* _tmp96_;
			_tmp95_ = pamac_package_get_repo (_data16_->pkg);
			_tmp96_ = _tmp95_;
			if (g_strcmp0 (_tmp96_, "community") == 0) {
				_tmp94_ = TRUE;
			} else {
				const gchar* _tmp97_;
				const gchar* _tmp98_;
				_tmp97_ = pamac_package_get_repo (_data16_->pkg);
				_tmp98_ = _tmp97_;
				_tmp94_ = g_strcmp0 (_tmp98_, "extra") == 0;
			}
			if (_tmp94_) {
				_tmp93_ = TRUE;
			} else {
				const gchar* _tmp99_;
				const gchar* _tmp100_;
				_tmp99_ = pamac_package_get_repo (_data16_->pkg);
				_tmp100_ = _tmp99_;
				_tmp93_ = g_strcmp0 (_tmp100_, "core") == 0;
			}
			if (_tmp93_) {
				_tmp92_ = TRUE;
			} else {
				const gchar* _tmp101_;
				const gchar* _tmp102_;
				_tmp101_ = pamac_package_get_repo (_data16_->pkg);
				_tmp102_ = _tmp101_;
				_tmp92_ = g_strcmp0 (_tmp102_, "multilib") == 0;
			}
			if (_tmp92_) {
				if (software_mode) {
					PamacPackageRow* _tmp103_;
					GtkLabel* _tmp104_;
					_tmp103_ = row;
					_tmp104_ = _tmp103_->repo_label;
					gtk_label_set_label (_tmp104_, g_dgettext (NULL, "Official Repositories"));
				} else {
					PamacPackageRow* _tmp105_;
					GtkLabel* _tmp106_;
					const gchar* _tmp107_;
					const gchar* _tmp108_;
					gchar* _tmp109_;
					gchar* _tmp110_;
					_tmp105_ = row;
					_tmp106_ = _tmp105_->repo_label;
					_tmp107_ = pamac_package_get_repo (_data16_->pkg);
					_tmp108_ = _tmp107_;
					_tmp109_ = g_strdup_printf ("%s (%s)", g_dgettext (NULL, "Official Repositories"), _tmp108_);
					_tmp110_ = _tmp109_;
					gtk_label_set_label (_tmp106_, _tmp110_);
					_g_free0 (_tmp110_);
				}
			} else {
				const gchar* _tmp111_;
				const gchar* _tmp112_;
				_tmp111_ = pamac_package_get_repo (_data16_->pkg);
				_tmp112_ = _tmp111_;
				if (g_strcmp0 (_tmp112_, g_dgettext (NULL, "AUR")) == 0) {
					PamacPackageRow* _tmp113_;
					GtkLabel* _tmp114_;
					const gchar* _tmp115_;
					const gchar* _tmp116_;
					_tmp113_ = row;
					_tmp114_ = _tmp113_->repo_label;
					_tmp115_ = pamac_package_get_repo (_data16_->pkg);
					_tmp116_ = _tmp115_;
					gtk_label_set_label (_tmp114_, _tmp116_);
				} else {
					PamacPackageRow* _tmp117_;
					GtkLabel* _tmp118_;
					const gchar* _tmp119_;
					const gchar* _tmp120_;
					gchar* _tmp121_;
					gchar* _tmp122_;
					_tmp117_ = row;
					_tmp118_ = _tmp117_->repo_label;
					_tmp119_ = pamac_package_get_repo (_data16_->pkg);
					_tmp120_ = _tmp119_;
					_tmp121_ = g_strdup_printf ("%s (%s)", g_dgettext (NULL, "Repositories"), _tmp120_);
					_tmp122_ = _tmp121_;
					gtk_label_set_label (_tmp118_, _tmp122_);
					_g_free0 (_tmp122_);
				}
			}
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_FLATPAK_PACKAGE)) {
				PamacPackageRow* _tmp123_;
				GtkLabel* _tmp124_;
				const gchar* _tmp125_;
				const gchar* _tmp126_;
				gchar* _tmp127_;
				gchar* _tmp128_;
				_tmp123_ = row;
				_tmp124_ = _tmp123_->repo_label;
				_tmp125_ = pamac_package_get_repo (_data16_->pkg);
				_tmp126_ = _tmp125_;
				_tmp127_ = g_strdup_printf ("%s (%s)", g_dgettext (NULL, "Flatpak"), _tmp126_);
				_tmp128_ = _tmp127_;
				gtk_label_set_label (_tmp124_, _tmp128_);
				_g_free0 (_tmp128_);
			} else {
				PamacPackageRow* _tmp129_;
				GtkLabel* _tmp130_;
				const gchar* _tmp131_;
				const gchar* _tmp132_;
				_tmp129_ = row;
				_tmp130_ = _tmp129_->repo_label;
				_tmp131_ = pamac_package_get_repo (_data16_->pkg);
				_tmp132_ = _tmp131_;
				gtk_label_set_label (_tmp130_, _tmp132_);
			}
		}
	}
	_tmp133_ = row;
	pamac_manager_window_set_row_app_icon (self, _tmp133_, _data16_->pkg);
	_tmp134_ = self->transaction;
	_tmp135_ = pamac_package_get_id (_data16_->pkg);
	_tmp136_ = _tmp135_;
	if (pamac_transaction_gtk_transaction_summary_contains (_tmp134_, _tmp136_)) {
		PamacPackageRow* _tmp137_;
		GtkToggleButton* _tmp138_;
		_tmp137_ = row;
		_tmp138_ = _tmp137_->action_togglebutton;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp138_, FALSE);
	}
	if (is_update) {
		PamacPackageRow* _tmp139_;
		GtkImage* _tmp140_;
		PamacPackageRow* _tmp141_;
		GtkToggleButton* _tmp142_;
		GtkStyleContext* _tmp143_;
		GHashTable* _tmp144_;
		const gchar* _tmp145_;
		const gchar* _tmp146_;
		PamacPackageRow* _tmp151_;
		GtkToggleButton* _tmp152_;
		_tmp139_ = row;
		_tmp140_ = _tmp139_->action_icon;
		g_object_set (_tmp140_, "icon-name", "software-update-symbolic", NULL);
		_tmp141_ = row;
		_tmp142_ = _tmp141_->action_togglebutton;
		_tmp143_ = gtk_widget_get_style_context ((GtkWidget*) _tmp142_);
		gtk_style_context_add_class (_tmp143_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
		_tmp144_ = pamac_temporary_ignorepkgs;
		_tmp145_ = pamac_package_get_id (_data16_->pkg);
		_tmp146_ = _tmp145_;
		if (!g_hash_table_contains (_tmp144_, _tmp146_)) {
			PamacPackageRow* _tmp147_;
			GtkToggleButton* _tmp148_;
			PamacPackageRow* _tmp149_;
			GtkImage* _tmp150_;
			_tmp147_ = row;
			_tmp148_ = _tmp147_->action_togglebutton;
			gtk_toggle_button_set_active (_tmp148_, TRUE);
			_tmp149_ = row;
			_tmp150_ = _tmp149_->action_icon;
			g_object_set (_tmp150_, "icon-name", "software-select-symbolic", NULL);
		}
		_tmp151_ = row;
		_tmp152_ = _tmp151_->action_togglebutton;
		g_signal_connect_data (_tmp152_, "toggled", (GCallback) ____lambda18__gtk_toggle_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	} else {
		const gchar* _tmp153_;
		const gchar* _tmp154_;
		_tmp153_ = pamac_package_get_installed_version (_data16_->pkg);
		_tmp154_ = _tmp153_;
		if (_tmp154_ == NULL) {
			if (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_AUR_PACKAGE)) {
				PamacPackageRow* _tmp155_;
				GtkImage* _tmp156_;
				PamacPackageRow* _tmp157_;
				GtkToggleButton* _tmp158_;
				GtkStyleContext* _tmp159_;
				GHashTable* _tmp160_;
				const gchar* _tmp161_;
				const gchar* _tmp162_;
				PamacPackageRow* _tmp167_;
				GtkToggleButton* _tmp168_;
				_tmp155_ = row;
				_tmp156_ = _tmp155_->action_icon;
				g_object_set (_tmp156_, "icon-name", "software-install-symbolic", NULL);
				_tmp157_ = row;
				_tmp158_ = _tmp157_->action_togglebutton;
				_tmp159_ = gtk_widget_get_style_context ((GtkWidget*) _tmp158_);
				gtk_style_context_add_class (_tmp159_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
				_tmp160_ = pamac_to_build;
				_tmp161_ = pamac_package_get_name (_data16_->pkg);
				_tmp162_ = _tmp161_;
				if (g_hash_table_contains (_tmp160_, _tmp162_)) {
					PamacPackageRow* _tmp163_;
					GtkToggleButton* _tmp164_;
					PamacPackageRow* _tmp165_;
					GtkImage* _tmp166_;
					_tmp163_ = row;
					_tmp164_ = _tmp163_->action_togglebutton;
					gtk_toggle_button_set_active (_tmp164_, TRUE);
					_tmp165_ = row;
					_tmp166_ = _tmp165_->action_icon;
					g_object_set (_tmp166_, "icon-name", "software-select-symbolic", NULL);
				}
				_tmp167_ = row;
				_tmp168_ = _tmp167_->action_togglebutton;
				g_signal_connect_data (_tmp168_, "toggled", (GCallback) ______lambda20__gtk_toggle_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_SNAP_PACKAGE)) {
					PamacPackageRow* _tmp169_;
					GtkImage* _tmp170_;
					PamacPackageRow* _tmp171_;
					GtkToggleButton* _tmp172_;
					GtkStyleContext* _tmp173_;
					GHashTable* _tmp174_;
					const gchar* _tmp175_;
					const gchar* _tmp176_;
					PamacPackageRow* _tmp181_;
					GtkToggleButton* _tmp182_;
					_tmp169_ = row;
					_tmp170_ = _tmp169_->action_icon;
					g_object_set (_tmp170_, "icon-name", "software-install-symbolic", NULL);
					_tmp171_ = row;
					_tmp172_ = _tmp171_->action_togglebutton;
					_tmp173_ = gtk_widget_get_style_context ((GtkWidget*) _tmp172_);
					gtk_style_context_add_class (_tmp173_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
					_tmp174_ = pamac_snap_to_install;
					_tmp175_ = pamac_package_get_name (_data16_->pkg);
					_tmp176_ = _tmp175_;
					if (g_hash_table_contains (_tmp174_, _tmp176_)) {
						PamacPackageRow* _tmp177_;
						GtkToggleButton* _tmp178_;
						PamacPackageRow* _tmp179_;
						GtkImage* _tmp180_;
						_tmp177_ = row;
						_tmp178_ = _tmp177_->action_togglebutton;
						gtk_toggle_button_set_active (_tmp178_, TRUE);
						_tmp179_ = row;
						_tmp180_ = _tmp179_->action_icon;
						g_object_set (_tmp180_, "icon-name", "software-select-symbolic", NULL);
					}
					_tmp181_ = row;
					_tmp182_ = _tmp181_->action_togglebutton;
					g_signal_connect_data (_tmp182_, "toggled", (GCallback) _______lambda21__gtk_toggle_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_FLATPAK_PACKAGE)) {
						PamacPackageRow* _tmp183_;
						GtkImage* _tmp184_;
						PamacPackageRow* _tmp185_;
						GtkToggleButton* _tmp186_;
						GtkStyleContext* _tmp187_;
						GHashTable* _tmp188_;
						const gchar* _tmp189_;
						const gchar* _tmp190_;
						PamacPackageRow* _tmp195_;
						GtkToggleButton* _tmp196_;
						_tmp183_ = row;
						_tmp184_ = _tmp183_->action_icon;
						g_object_set (_tmp184_, "icon-name", "software-install-symbolic", NULL);
						_tmp185_ = row;
						_tmp186_ = _tmp185_->action_togglebutton;
						_tmp187_ = gtk_widget_get_style_context ((GtkWidget*) _tmp186_);
						gtk_style_context_add_class (_tmp187_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
						_tmp188_ = pamac_flatpak_to_install;
						_tmp189_ = pamac_package_get_id (_data16_->pkg);
						_tmp190_ = _tmp189_;
						if (g_hash_table_contains (_tmp188_, _tmp190_)) {
							PamacPackageRow* _tmp191_;
							GtkToggleButton* _tmp192_;
							PamacPackageRow* _tmp193_;
							GtkImage* _tmp194_;
							_tmp191_ = row;
							_tmp192_ = _tmp191_->action_togglebutton;
							gtk_toggle_button_set_active (_tmp192_, TRUE);
							_tmp193_ = row;
							_tmp194_ = _tmp193_->action_icon;
							g_object_set (_tmp194_, "icon-name", "software-select-symbolic", NULL);
						}
						_tmp195_ = row;
						_tmp196_ = _tmp195_->action_togglebutton;
						g_signal_connect_data (_tmp196_, "toggled", (GCallback) ________lambda22__gtk_toggle_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
					} else {
						PamacPackageRow* _tmp197_;
						GtkImage* _tmp198_;
						PamacPackageRow* _tmp199_;
						GtkToggleButton* _tmp200_;
						GtkStyleContext* _tmp201_;
						GHashTable* _tmp202_;
						const gchar* _tmp203_;
						const gchar* _tmp204_;
						PamacPackageRow* _tmp209_;
						GtkToggleButton* _tmp210_;
						_tmp197_ = row;
						_tmp198_ = _tmp197_->action_icon;
						g_object_set (_tmp198_, "icon-name", "software-install-symbolic", NULL);
						_tmp199_ = row;
						_tmp200_ = _tmp199_->action_togglebutton;
						_tmp201_ = gtk_widget_get_style_context ((GtkWidget*) _tmp200_);
						gtk_style_context_add_class (_tmp201_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
						_tmp202_ = pamac_to_install;
						_tmp203_ = pamac_package_get_name (_data16_->pkg);
						_tmp204_ = _tmp203_;
						if (g_hash_table_contains (_tmp202_, _tmp204_)) {
							PamacPackageRow* _tmp205_;
							GtkToggleButton* _tmp206_;
							PamacPackageRow* _tmp207_;
							GtkImage* _tmp208_;
							_tmp205_ = row;
							_tmp206_ = _tmp205_->action_togglebutton;
							gtk_toggle_button_set_active (_tmp206_, TRUE);
							_tmp207_ = row;
							_tmp208_ = _tmp207_->action_icon;
							g_object_set (_tmp208_, "icon-name", "software-select-symbolic", NULL);
						}
						_tmp209_ = row;
						_tmp210_ = _tmp209_->action_togglebutton;
						g_signal_connect_data (_tmp210_, "toggled", (GCallback) ________lambda23__gtk_toggle_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
					}
				}
			}
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_SNAP_PACKAGE)) {
				PamacPackageRow* _tmp211_;
				GtkImage* _tmp212_;
				PamacPackageRow* _tmp213_;
				GtkToggleButton* _tmp214_;
				GtkStyleContext* _tmp215_;
				GHashTable* _tmp216_;
				const gchar* _tmp217_;
				const gchar* _tmp218_;
				PamacPackageRow* _tmp223_;
				GtkToggleButton* _tmp224_;
				_tmp211_ = row;
				_tmp212_ = _tmp211_->action_icon;
				g_object_set (_tmp212_, "icon-name", "software-remove-symbolic", NULL);
				_tmp213_ = row;
				_tmp214_ = _tmp213_->action_togglebutton;
				_tmp215_ = gtk_widget_get_style_context ((GtkWidget*) _tmp214_);
				gtk_style_context_add_class (_tmp215_, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
				_tmp216_ = pamac_snap_to_remove;
				_tmp217_ = pamac_package_get_name (_data16_->pkg);
				_tmp218_ = _tmp217_;
				if (g_hash_table_contains (_tmp216_, _tmp218_)) {
					PamacPackageRow* _tmp219_;
					GtkToggleButton* _tmp220_;
					PamacPackageRow* _tmp221_;
					GtkImage* _tmp222_;
					_tmp219_ = row;
					_tmp220_ = _tmp219_->action_togglebutton;
					gtk_toggle_button_set_active (_tmp220_, TRUE);
					_tmp221_ = row;
					_tmp222_ = _tmp221_->action_icon;
					g_object_set (_tmp222_, "icon-name", "software-select-symbolic", NULL);
				}
				_tmp223_ = row;
				_tmp224_ = _tmp223_->action_togglebutton;
				g_signal_connect_data (_tmp224_, "toggled", (GCallback) ______lambda24__gtk_toggle_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (_data16_->pkg, PAMAC_TYPE_FLATPAK_PACKAGE)) {
					PamacPackageRow* _tmp225_;
					GtkImage* _tmp226_;
					PamacPackageRow* _tmp227_;
					GtkToggleButton* _tmp228_;
					GtkStyleContext* _tmp229_;
					GHashTable* _tmp230_;
					const gchar* _tmp231_;
					const gchar* _tmp232_;
					PamacPackageRow* _tmp237_;
					GtkToggleButton* _tmp238_;
					_tmp225_ = row;
					_tmp226_ = _tmp225_->action_icon;
					g_object_set (_tmp226_, "icon-name", "software-remove-symbolic", NULL);
					_tmp227_ = row;
					_tmp228_ = _tmp227_->action_togglebutton;
					_tmp229_ = gtk_widget_get_style_context ((GtkWidget*) _tmp228_);
					gtk_style_context_add_class (_tmp229_, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
					_tmp230_ = pamac_flatpak_to_remove;
					_tmp231_ = pamac_package_get_id (_data16_->pkg);
					_tmp232_ = _tmp231_;
					if (g_hash_table_contains (_tmp230_, _tmp232_)) {
						PamacPackageRow* _tmp233_;
						GtkToggleButton* _tmp234_;
						PamacPackageRow* _tmp235_;
						GtkImage* _tmp236_;
						_tmp233_ = row;
						_tmp234_ = _tmp233_->action_togglebutton;
						gtk_toggle_button_set_active (_tmp234_, TRUE);
						_tmp235_ = row;
						_tmp236_ = _tmp235_->action_icon;
						g_object_set (_tmp236_, "icon-name", "software-select-symbolic", NULL);
					}
					_tmp237_ = row;
					_tmp238_ = _tmp237_->action_togglebutton;
					g_signal_connect_data (_tmp238_, "toggled", (GCallback) _______lambda25__gtk_toggle_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
				} else {
					PamacPackageRow* _tmp239_;
					GtkImage* _tmp240_;
					PamacPackageRow* _tmp241_;
					GtkToggleButton* _tmp242_;
					GtkStyleContext* _tmp243_;
					PamacDatabaseGtk* _tmp244_;
					const gchar* _tmp245_;
					const gchar* _tmp246_;
					PamacPackageRow* _tmp256_;
					GtkToggleButton* _tmp257_;
					_tmp239_ = row;
					_tmp240_ = _tmp239_->action_icon;
					g_object_set (_tmp240_, "icon-name", "software-remove-symbolic", NULL);
					_tmp241_ = row;
					_tmp242_ = _tmp241_->action_togglebutton;
					_tmp243_ = gtk_widget_get_style_context ((GtkWidget*) _tmp242_);
					gtk_style_context_add_class (_tmp243_, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
					_tmp244_ = self->priv->_database;
					_tmp245_ = pamac_package_get_name (_data16_->pkg);
					_tmp246_ = _tmp245_;
					if (pamac_database_should_hold ((PamacDatabase*) _tmp244_, _tmp246_)) {
						PamacPackageRow* _tmp247_;
						GtkToggleButton* _tmp248_;
						_tmp247_ = row;
						_tmp248_ = _tmp247_->action_togglebutton;
						gtk_widget_set_sensitive ((GtkWidget*) _tmp248_, FALSE);
					} else {
						GHashTable* _tmp249_;
						const gchar* _tmp250_;
						const gchar* _tmp251_;
						_tmp249_ = pamac_to_remove;
						_tmp250_ = pamac_package_get_name (_data16_->pkg);
						_tmp251_ = _tmp250_;
						if (g_hash_table_contains (_tmp249_, _tmp251_)) {
							PamacPackageRow* _tmp252_;
							GtkToggleButton* _tmp253_;
							PamacPackageRow* _tmp254_;
							GtkImage* _tmp255_;
							_tmp252_ = row;
							_tmp253_ = _tmp252_->action_togglebutton;
							gtk_toggle_button_set_active (_tmp253_, TRUE);
							_tmp254_ = row;
							_tmp255_ = _tmp254_->action_icon;
							g_object_set (_tmp255_, "icon-name", "software-select-symbolic", NULL);
						}
					}
					_tmp256_ = row;
					_tmp257_ = _tmp256_->action_togglebutton;
					g_signal_connect_data (_tmp257_, "toggled", (GCallback) _______lambda26__gtk_toggle_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
				}
			}
		}
	}
	result = row;
	_g_object_unref0 (alpm_pkg);
	block16_data_unref (_data16_);
	_data16_ = NULL;
	return result;
}

static void
pamac_manager_window_create_os_updates_row (PamacManagerWindow* self,
                                            guint64 download_size)
{
	PamacPackageRow* row = NULL;
	gboolean _tmp0_;
	PamacPackageRow* _tmp1_;
	PamacPackageRow* _tmp2_;
	GtkLabel* _tmp3_;
	PamacPackageRow* _tmp4_;
	GtkLabel* _tmp5_;
	PamacPackageRow* _tmp6_;
	GtkLabel* _tmp7_;
	PamacPackageRow* _tmp12_;
	GtkLabel* _tmp13_;
	PamacPackageRow* _tmp14_;
	GtkImage* _tmp15_;
	GdkPixbuf* _tmp16_;
	PamacPackageRow* _tmp17_;
	GtkToggleButton* _tmp18_;
	PamacPackageRow* _tmp19_;
	GtkImage* _tmp20_;
	PamacPackageRow* _tmp21_;
	GtkToggleButton* _tmp22_;
	GtkFlowBox* _tmp23_;
	PamacPackageRow* _tmp24_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_mobile;
	_tmp1_ = pamac_package_row_new (NULL, _tmp0_);
	g_object_ref_sink (_tmp1_);
	row = _tmp1_;
	_tmp2_ = row;
	_tmp3_ = _tmp2_->name_label;
	gtk_label_set_label (_tmp3_, g_dgettext (NULL, "OS Updates"));
	_tmp4_ = row;
	_tmp5_ = _tmp4_->desc_label;
	gtk_label_set_label (_tmp5_, g_dgettext (NULL, "Includes performance, stability and security improvements"));
	_tmp6_ = row;
	_tmp7_ = _tmp6_->version_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp7_, FALSE);
	if (download_size > ((guint64) 0)) {
		PamacPackageRow* _tmp8_;
		GtkLabel* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp8_ = row;
		_tmp9_ = _tmp8_->size_label;
		_tmp10_ = g_format_size_full (download_size, G_FORMAT_SIZE_DEFAULT);
		_tmp11_ = _tmp10_;
		gtk_label_set_label (_tmp9_, _tmp11_);
		_g_free0 (_tmp11_);
	}
	_tmp12_ = row;
	_tmp13_ = _tmp12_->repo_label;
	gtk_label_set_label (_tmp13_, g_dgettext (NULL, "Official Repositories"));
	_tmp14_ = row;
	_tmp15_ = _tmp14_->app_icon;
	_tmp16_ = self->priv->package_icon;
	g_object_set (_tmp15_, "pixbuf", _tmp16_, NULL);
	_tmp17_ = row;
	_tmp18_ = _tmp17_->action_togglebutton;
	gtk_toggle_button_set_active (_tmp18_, TRUE);
	_tmp19_ = row;
	_tmp20_ = _tmp19_->action_icon;
	g_object_set (_tmp20_, "icon-name", "software-select-symbolic", NULL);
	_tmp21_ = row;
	_tmp22_ = _tmp21_->action_togglebutton;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp22_, FALSE);
	_tmp23_ = self->priv->packages_listbox;
	_tmp24_ = row;
	gtk_container_add ((GtkContainer*) _tmp23_, (GtkWidget*) _tmp24_);
	_g_object_unref0 (row);
}

static Block17Data*
block17_data_ref (Block17Data* _data17_)
{
	g_atomic_int_inc (&_data17_->_ref_count_);
	return _data17_;
}

static void
block17_data_unref (void * _userdata_)
{
	Block17Data* _data17_;
	_data17_ = (Block17Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data17_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data17_->self;
		_g_object_unref0 (_data17_->row);
		_g_object_unref0 (_data17_->pkg);
		_g_object_unref0 (self);
		g_slice_free (Block17Data, _data17_);
	}
}

static void
__lambda80_ (Block17Data* _data17_,
             GtkToggleButton* button)
{
	PamacManagerWindow* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data17_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = gtk_toggle_button_get_active (button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		PamacPackageRow* _tmp2_;
		GtkToggleButton* _tmp3_;
		PamacPackageRow* _tmp4_;
		GtkImage* _tmp5_;
		GHashTable* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		GHashTable* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		PamacDatabaseGtk* _tmp13_;
		PamacConfig* _tmp14_;
		PamacConfig* _tmp15_;
		GHashTable* _tmp16_;
		GHashTable* _tmp17_;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		_tmp2_ = _data17_->row;
		_tmp3_ = _tmp2_->action_togglebutton;
		gtk_toggle_button_set_active (_tmp3_, TRUE);
		_tmp4_ = _data17_->row;
		_tmp5_ = _tmp4_->action_icon;
		g_object_set (_tmp5_, "icon-name", "software-select-symbolic", NULL);
		_tmp6_ = pamac_to_update;
		_tmp7_ = pamac_package_get_name (_data17_->pkg);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strdup (_tmp8_);
		g_hash_table_add (_tmp6_, _tmp9_);
		_tmp10_ = pamac_temporary_ignorepkgs;
		_tmp11_ = pamac_package_get_name (_data17_->pkg);
		_tmp12_ = _tmp11_;
		g_hash_table_remove (_tmp10_, _tmp12_);
		_tmp13_ = self->priv->_database;
		_tmp14_ = pamac_database_get_config ((PamacDatabase*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = pamac_config_get_ignorepkgs (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = pamac_package_get_name (_data17_->pkg);
		_tmp19_ = _tmp18_;
		g_hash_table_remove (_tmp17_, _tmp19_);
	} else {
		PamacPackageRow* _tmp20_;
		GtkToggleButton* _tmp21_;
		PamacPackageRow* _tmp22_;
		GtkImage* _tmp23_;
		GHashTable* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		GHashTable* _tmp27_;
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		gchar* _tmp30_;
		_tmp20_ = _data17_->row;
		_tmp21_ = _tmp20_->action_togglebutton;
		gtk_toggle_button_set_active (_tmp21_, FALSE);
		_tmp22_ = _data17_->row;
		_tmp23_ = _tmp22_->action_icon;
		g_object_set (_tmp23_, "icon-name", "software-update-symbolic", NULL);
		_tmp24_ = pamac_to_update;
		_tmp25_ = pamac_package_get_name (_data17_->pkg);
		_tmp26_ = _tmp25_;
		g_hash_table_remove (_tmp24_, _tmp26_);
		_tmp27_ = pamac_temporary_ignorepkgs;
		_tmp28_ = pamac_package_get_name (_data17_->pkg);
		_tmp29_ = _tmp28_;
		_tmp30_ = g_strdup (_tmp29_);
		g_hash_table_add (_tmp27_, _tmp30_);
	}
	pamac_manager_window_set_pending_operations (self);
}

static void
___lambda80__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda80_ (self, _sender);
}

static PamacPackageRow*
pamac_manager_window_create_update_row (PamacManagerWindow* self,
                                        PamacPackage* pkg)
{
	Block17Data* _data17_;
	PamacPackage* _tmp0_;
	gboolean _tmp1_;
	PamacPackageRow* _tmp2_;
	const gchar* app_name = NULL;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	PamacAlpmPackage* alpm_pkg = NULL;
	PamacAlpmPackage* _tmp5_;
	gboolean software_mode = FALSE;
	PamacLocalConfig* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	const gchar* _tmp9_;
	const gchar* desc = NULL;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	guint64 _tmp58_;
	guint64 _tmp59_;
	gboolean _tmp70_ = FALSE;
	PamacAlpmPackage* _tmp71_;
	PamacPackageRow* _tmp123_;
	PamacTransactionGtk* _tmp124_;
	const gchar* _tmp125_;
	const gchar* _tmp126_;
	GHashTable* _tmp129_;
	const gchar* _tmp130_;
	const gchar* _tmp131_;
	PamacPackageRow* _tmp138_;
	GtkToggleButton* _tmp139_;
	PamacPackageRow* _tmp140_;
	PamacPackageRow* _tmp141_;
	PamacPackageRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (pkg != NULL, NULL);
	_data17_ = g_slice_new0 (Block17Data);
	_data17_->_ref_count_ = 1;
	_data17_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (pkg);
	_g_object_unref0 (_data17_->pkg);
	_data17_->pkg = _tmp0_;
	_tmp1_ = self->priv->_mobile;
	_tmp2_ = pamac_package_row_new (_data17_->pkg, _tmp1_);
	g_object_ref_sink (_tmp2_);
	_data17_->row = _tmp2_;
	_tmp3_ = pamac_package_get_app_name (_data17_->pkg);
	_tmp4_ = _tmp3_;
	app_name = _tmp4_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data17_->pkg, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) _data17_->pkg) : NULL);
	alpm_pkg = _tmp5_;
	_tmp6_ = self->local_config;
	_tmp7_ = pamac_local_config_get_software_mode (_tmp6_);
	_tmp8_ = _tmp7_;
	software_mode = _tmp8_;
	_tmp9_ = app_name;
	if (_tmp9_ == NULL) {
		PamacPackageRow* _tmp10_;
		GtkLabel* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		_tmp10_ = _data17_->row;
		_tmp11_ = _tmp10_->name_label;
		_tmp12_ = pamac_package_get_name (_data17_->pkg);
		_tmp13_ = _tmp12_;
		_tmp14_ = g_strdup_printf ("<b>%s</b>", _tmp13_);
		_tmp15_ = _tmp14_;
		gtk_label_set_markup (_tmp11_, _tmp15_);
		_g_free0 (_tmp15_);
	} else {
		gboolean _tmp16_ = FALSE;
		PamacAlpmPackage* _tmp17_;
		_tmp17_ = alpm_pkg;
		if (_tmp17_ != NULL) {
			_tmp16_ = !software_mode;
		} else {
			_tmp16_ = FALSE;
		}
		if (_tmp16_) {
			PamacPackageRow* _tmp18_;
			GtkLabel* _tmp19_;
			const gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			const gchar* _tmp23_;
			const gchar* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			_tmp18_ = _data17_->row;
			_tmp19_ = _tmp18_->name_label;
			_tmp20_ = app_name;
			_tmp21_ = g_markup_escape_text (_tmp20_, (gssize) -1);
			_tmp22_ = _tmp21_;
			_tmp23_ = pamac_package_get_name (_data17_->pkg);
			_tmp24_ = _tmp23_;
			_tmp25_ = g_strdup_printf ("<b>%s (%s)</b>", _tmp22_, _tmp24_);
			_tmp26_ = _tmp25_;
			gtk_label_set_markup (_tmp19_, _tmp26_);
			_g_free0 (_tmp26_);
			_g_free0 (_tmp22_);
		} else {
			PamacPackageRow* _tmp27_;
			GtkLabel* _tmp28_;
			const gchar* _tmp29_;
			gchar* _tmp30_;
			gchar* _tmp31_;
			gchar* _tmp32_;
			gchar* _tmp33_;
			_tmp27_ = _data17_->row;
			_tmp28_ = _tmp27_->name_label;
			_tmp29_ = app_name;
			_tmp30_ = g_markup_escape_text (_tmp29_, (gssize) -1);
			_tmp31_ = _tmp30_;
			_tmp32_ = g_strdup_printf ("<b>%s</b>", _tmp31_);
			_tmp33_ = _tmp32_;
			gtk_label_set_markup (_tmp28_, _tmp33_);
			_g_free0 (_tmp33_);
			_g_free0 (_tmp31_);
		}
	}
	_tmp34_ = pamac_package_get_desc (_data17_->pkg);
	_tmp35_ = _tmp34_;
	desc = _tmp35_;
	_tmp36_ = desc;
	if (_tmp36_ != NULL) {
		PamacPackageRow* _tmp37_;
		GtkLabel* _tmp38_;
		const gchar* _tmp39_;
		gchar* _tmp40_;
		gchar* _tmp41_;
		_tmp37_ = _data17_->row;
		_tmp38_ = _tmp37_->desc_label;
		_tmp39_ = desc;
		_tmp40_ = g_markup_escape_text (_tmp39_, (gssize) -1);
		_tmp41_ = _tmp40_;
		gtk_label_set_label (_tmp38_, _tmp41_);
		_g_free0 (_tmp41_);
	} else {
		PamacPackageRow* _tmp42_;
		GtkLabel* _tmp43_;
		_tmp42_ = _data17_->row;
		_tmp43_ = _tmp42_->desc_label;
		gtk_label_set_label (_tmp43_, "");
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (_data17_->pkg, PAMAC_TYPE_FLATPAK_PACKAGE)) {
		PamacPackageRow* _tmp44_;
		GtkLabel* _tmp45_;
		const gchar* _tmp46_;
		const gchar* _tmp47_;
		gchar* _tmp48_;
		gchar* _tmp49_;
		_tmp44_ = _data17_->row;
		_tmp45_ = _tmp44_->version_label;
		_tmp46_ = pamac_package_get_version (_data17_->pkg);
		_tmp47_ = _tmp46_;
		_tmp48_ = g_strdup_printf ("<b>%s</b>", _tmp47_);
		_tmp49_ = _tmp48_;
		gtk_label_set_markup (_tmp45_, _tmp49_);
		_g_free0 (_tmp49_);
	} else {
		PamacPackageRow* _tmp50_;
		GtkLabel* _tmp51_;
		const gchar* _tmp52_;
		const gchar* _tmp53_;
		const gchar* _tmp54_;
		const gchar* _tmp55_;
		gchar* _tmp56_;
		gchar* _tmp57_;
		_tmp50_ = _data17_->row;
		_tmp51_ = _tmp50_->version_label;
		_tmp52_ = pamac_package_get_version (_data17_->pkg);
		_tmp53_ = _tmp52_;
		_tmp54_ = pamac_package_get_installed_version (_data17_->pkg);
		_tmp55_ = _tmp54_;
		_tmp56_ = g_strdup_printf ("<b>%s  (%s)</b>", _tmp53_, _tmp55_);
		_tmp57_ = _tmp56_;
		gtk_label_set_markup (_tmp51_, _tmp57_);
		_g_free0 (_tmp57_);
	}
	_tmp58_ = pamac_package_get_download_size (_data17_->pkg);
	_tmp59_ = _tmp58_;
	if (_tmp59_ == ((guint64) 0)) {
		PamacPackageRow* _tmp60_;
		GtkLabel* _tmp61_;
		_tmp60_ = _data17_->row;
		_tmp61_ = _tmp60_->size_label;
		gtk_label_set_label (_tmp61_, "");
	} else {
		PamacPackageRow* _tmp62_;
		GtkLabel* _tmp63_;
		guint64 _tmp64_;
		guint64 _tmp65_;
		gchar* _tmp66_;
		gchar* _tmp67_;
		gchar* _tmp68_;
		gchar* _tmp69_;
		_tmp62_ = _data17_->row;
		_tmp63_ = _tmp62_->size_label;
		_tmp64_ = pamac_package_get_download_size (_data17_->pkg);
		_tmp65_ = _tmp64_;
		_tmp66_ = g_format_size_full (_tmp65_, G_FORMAT_SIZE_DEFAULT);
		_tmp67_ = _tmp66_;
		_tmp68_ = g_strdup_printf ("<span foreground='grey'>%s</span>", _tmp67_);
		_tmp69_ = _tmp68_;
		gtk_label_set_markup (_tmp63_, _tmp69_);
		_g_free0 (_tmp69_);
		_g_free0 (_tmp67_);
	}
	_tmp71_ = alpm_pkg;
	if (_tmp71_ != NULL) {
		const gchar* _tmp72_;
		const gchar* _tmp73_;
		_tmp72_ = pamac_package_get_repo (_data17_->pkg);
		_tmp73_ = _tmp72_;
		_tmp70_ = _tmp73_ != NULL;
	} else {
		_tmp70_ = FALSE;
	}
	if (_tmp70_) {
		gboolean _tmp74_ = FALSE;
		gboolean _tmp75_ = FALSE;
		gboolean _tmp76_ = FALSE;
		const gchar* _tmp77_;
		const gchar* _tmp78_;
		_tmp77_ = pamac_package_get_repo (_data17_->pkg);
		_tmp78_ = _tmp77_;
		if (g_strcmp0 (_tmp78_, "community") == 0) {
			_tmp76_ = TRUE;
		} else {
			const gchar* _tmp79_;
			const gchar* _tmp80_;
			_tmp79_ = pamac_package_get_repo (_data17_->pkg);
			_tmp80_ = _tmp79_;
			_tmp76_ = g_strcmp0 (_tmp80_, "extra") == 0;
		}
		if (_tmp76_) {
			_tmp75_ = TRUE;
		} else {
			const gchar* _tmp81_;
			const gchar* _tmp82_;
			_tmp81_ = pamac_package_get_repo (_data17_->pkg);
			_tmp82_ = _tmp81_;
			_tmp75_ = g_strcmp0 (_tmp82_, "core") == 0;
		}
		if (_tmp75_) {
			_tmp74_ = TRUE;
		} else {
			const gchar* _tmp83_;
			const gchar* _tmp84_;
			_tmp83_ = pamac_package_get_repo (_data17_->pkg);
			_tmp84_ = _tmp83_;
			_tmp74_ = g_strcmp0 (_tmp84_, "multilib") == 0;
		}
		if (_tmp74_) {
			if (software_mode) {
				PamacPackageRow* _tmp85_;
				GtkLabel* _tmp86_;
				gchar* _tmp87_;
				gchar* _tmp88_;
				_tmp85_ = _data17_->row;
				_tmp86_ = _tmp85_->repo_label;
				_tmp87_ = g_strdup_printf ("<span foreground='grey'>%s</span>", g_dgettext (NULL, "Official Repositories"));
				_tmp88_ = _tmp87_;
				gtk_label_set_markup (_tmp86_, _tmp88_);
				_g_free0 (_tmp88_);
			} else {
				PamacPackageRow* _tmp89_;
				GtkLabel* _tmp90_;
				const gchar* _tmp91_;
				const gchar* _tmp92_;
				gchar* _tmp93_;
				gchar* _tmp94_;
				_tmp89_ = _data17_->row;
				_tmp90_ = _tmp89_->repo_label;
				_tmp91_ = pamac_package_get_repo (_data17_->pkg);
				_tmp92_ = _tmp91_;
				_tmp93_ = g_strdup_printf ("<span foreground='grey'>%s (%s)</span>", g_dgettext (NULL, "Official Repositories"), _tmp92_);
				_tmp94_ = _tmp93_;
				gtk_label_set_markup (_tmp90_, _tmp94_);
				_g_free0 (_tmp94_);
			}
		} else {
			const gchar* _tmp95_;
			const gchar* _tmp96_;
			_tmp95_ = pamac_package_get_repo (_data17_->pkg);
			_tmp96_ = _tmp95_;
			if (g_strcmp0 (_tmp96_, g_dgettext (NULL, "AUR")) == 0) {
				PamacPackageRow* _tmp97_;
				GtkLabel* _tmp98_;
				const gchar* _tmp99_;
				const gchar* _tmp100_;
				gchar* _tmp101_;
				gchar* _tmp102_;
				_tmp97_ = _data17_->row;
				_tmp98_ = _tmp97_->repo_label;
				_tmp99_ = pamac_package_get_repo (_data17_->pkg);
				_tmp100_ = _tmp99_;
				_tmp101_ = g_strdup_printf ("<span foreground='grey'>%s</span>", _tmp100_);
				_tmp102_ = _tmp101_;
				gtk_label_set_markup (_tmp98_, _tmp102_);
				_g_free0 (_tmp102_);
			} else {
				const gchar* _tmp103_;
				const gchar* _tmp104_;
				_tmp103_ = pamac_package_get_repo (_data17_->pkg);
				_tmp104_ = _tmp103_;
				if (_tmp104_ != NULL) {
					PamacPackageRow* _tmp105_;
					GtkLabel* _tmp106_;
					const gchar* _tmp107_;
					const gchar* _tmp108_;
					gchar* _tmp109_;
					gchar* _tmp110_;
					_tmp105_ = _data17_->row;
					_tmp106_ = _tmp105_->repo_label;
					_tmp107_ = pamac_package_get_repo (_data17_->pkg);
					_tmp108_ = _tmp107_;
					_tmp109_ = g_strdup_printf ("<span foreground='grey'>%s (%s)</span>", g_dgettext (NULL, "Repositories"), _tmp108_);
					_tmp110_ = _tmp109_;
					gtk_label_set_markup (_tmp106_, _tmp110_);
					_g_free0 (_tmp110_);
				}
			}
		}
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (_data17_->pkg, PAMAC_TYPE_FLATPAK_PACKAGE)) {
			PamacPackageRow* _tmp111_;
			GtkLabel* _tmp112_;
			const gchar* _tmp113_;
			const gchar* _tmp114_;
			gchar* _tmp115_;
			gchar* _tmp116_;
			_tmp111_ = _data17_->row;
			_tmp112_ = _tmp111_->repo_label;
			_tmp113_ = pamac_package_get_repo (_data17_->pkg);
			_tmp114_ = _tmp113_;
			_tmp115_ = g_strdup_printf ("<span foreground='grey'>%s (%s)</span>", g_dgettext (NULL, "Flatpak"), _tmp114_);
			_tmp116_ = _tmp115_;
			gtk_label_set_markup (_tmp112_, _tmp116_);
			_g_free0 (_tmp116_);
		} else {
			PamacPackageRow* _tmp117_;
			GtkLabel* _tmp118_;
			const gchar* _tmp119_;
			const gchar* _tmp120_;
			gchar* _tmp121_;
			gchar* _tmp122_;
			_tmp117_ = _data17_->row;
			_tmp118_ = _tmp117_->repo_label;
			_tmp119_ = pamac_package_get_repo (_data17_->pkg);
			_tmp120_ = _tmp119_;
			_tmp121_ = g_strdup_printf ("<span foreground='grey'>%s</span>", _tmp120_);
			_tmp122_ = _tmp121_;
			gtk_label_set_markup (_tmp118_, _tmp122_);
			_g_free0 (_tmp122_);
		}
	}
	_tmp123_ = _data17_->row;
	pamac_manager_window_set_row_app_icon (self, _tmp123_, _data17_->pkg);
	_tmp124_ = self->transaction;
	_tmp125_ = pamac_package_get_id (_data17_->pkg);
	_tmp126_ = _tmp125_;
	if (pamac_transaction_gtk_transaction_summary_contains (_tmp124_, _tmp126_)) {
		PamacPackageRow* _tmp127_;
		GtkToggleButton* _tmp128_;
		_tmp127_ = _data17_->row;
		_tmp128_ = _tmp127_->action_togglebutton;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp128_, FALSE);
	}
	_tmp129_ = pamac_temporary_ignorepkgs;
	_tmp130_ = pamac_package_get_name (_data17_->pkg);
	_tmp131_ = _tmp130_;
	if (!g_hash_table_contains (_tmp129_, _tmp131_)) {
		PamacPackageRow* _tmp132_;
		GtkToggleButton* _tmp133_;
		PamacPackageRow* _tmp134_;
		GtkImage* _tmp135_;
		_tmp132_ = _data17_->row;
		_tmp133_ = _tmp132_->action_togglebutton;
		gtk_toggle_button_set_active (_tmp133_, TRUE);
		_tmp134_ = _data17_->row;
		_tmp135_ = _tmp134_->action_icon;
		g_object_set (_tmp135_, "icon-name", "software-select-symbolic", NULL);
	} else {
		PamacPackageRow* _tmp136_;
		GtkImage* _tmp137_;
		_tmp136_ = _data17_->row;
		_tmp137_ = _tmp136_->action_icon;
		g_object_set (_tmp137_, "icon-name", "software-update-symbolic", NULL);
	}
	_tmp138_ = _data17_->row;
	_tmp139_ = _tmp138_->action_togglebutton;
	g_signal_connect_data (_tmp139_, "toggled", (GCallback) ___lambda80__gtk_toggle_button_toggled, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	_tmp140_ = _data17_->row;
	_tmp141_ = _g_object_ref0 (_tmp140_);
	result = _tmp141_;
	_g_object_unref0 (alpm_pkg);
	block17_data_unref (_data17_);
	_data17_ = NULL;
	return result;
}

static void
__lambda19_ (PamacManagerWindow* self,
             GtkWidget* child)
{
	PamacPackageRow* pamac_row = NULL;
	PamacPackageRow* _tmp0_;
	PamacPackage* pkg = NULL;
	PamacPackageRow* _tmp1_;
	PamacPackage* _tmp2_;
	PamacPackage* _tmp3_;
	PamacPackage* _tmp4_;
	PamacTransactionGtk* _tmp5_;
	PamacPackage* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	PamacDatabaseGtk* _tmp13_;
	PamacPackage* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	PamacPackage* _tmp19_;
	g_return_if_fail (child != NULL);
	pamac_row = PAMAC_IS_PACKAGE_ROW (child) ? ((PamacPackageRow*) child) : NULL;
	_tmp0_ = pamac_row;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = pamac_row;
	_tmp2_ = _tmp1_->pkg;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	pkg = _tmp3_;
	_tmp4_ = pkg;
	if (_tmp4_ == NULL) {
		_g_object_unref0 (pkg);
		return;
	}
	_tmp5_ = self->transaction;
	_tmp6_ = pkg;
	_tmp7_ = pamac_package_get_id (_tmp6_);
	_tmp8_ = _tmp7_;
	if (pamac_transaction_gtk_transaction_summary_contains (_tmp5_, _tmp8_)) {
		PamacPackageRow* _tmp9_;
		GtkToggleButton* _tmp10_;
		PamacPackageRow* _tmp11_;
		GtkToggleButton* _tmp12_;
		_tmp9_ = pamac_row;
		_tmp10_ = _tmp9_->action_togglebutton;
		gtk_toggle_button_set_active (_tmp10_, FALSE);
		_tmp11_ = pamac_row;
		_tmp12_ = _tmp11_->action_togglebutton;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp12_, FALSE);
		_g_object_unref0 (pkg);
		return;
	}
	_tmp13_ = self->priv->_database;
	_tmp14_ = pkg;
	_tmp15_ = pamac_package_get_name (_tmp14_);
	_tmp16_ = _tmp15_;
	if (!pamac_database_should_hold ((PamacDatabase*) _tmp13_, _tmp16_)) {
		PamacPackageRow* _tmp17_;
		GtkToggleButton* _tmp18_;
		_tmp17_ = pamac_row;
		_tmp18_ = _tmp17_->action_togglebutton;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp18_, TRUE);
	}
	_tmp19_ = pkg;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, PAMAC_TYPE_AUR_PACKAGE)) {
		gboolean _tmp20_ = FALSE;
		gboolean _tmp21_ = FALSE;
		GHashTable* _tmp22_;
		PamacPackage* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		_tmp22_ = pamac_to_build;
		_tmp23_ = pkg;
		_tmp24_ = pamac_package_get_name (_tmp23_);
		_tmp25_ = _tmp24_;
		if (g_hash_table_contains (_tmp22_, _tmp25_)) {
			_tmp21_ = TRUE;
		} else {
			GHashTable* _tmp26_;
			PamacPackage* _tmp27_;
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			_tmp26_ = pamac_to_remove;
			_tmp27_ = pkg;
			_tmp28_ = pamac_package_get_name (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp21_ = g_hash_table_contains (_tmp26_, _tmp29_);
		}
		if (_tmp21_) {
			_tmp20_ = TRUE;
		} else {
			GHashTable* _tmp30_;
			PamacPackage* _tmp31_;
			const gchar* _tmp32_;
			const gchar* _tmp33_;
			_tmp30_ = pamac_to_update;
			_tmp31_ = pkg;
			_tmp32_ = pamac_package_get_name (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp20_ = g_hash_table_contains (_tmp30_, _tmp33_);
		}
		if (_tmp20_) {
			PamacPackageRow* _tmp34_;
			GtkToggleButton* _tmp35_;
			PamacPackageRow* _tmp36_;
			GtkImage* _tmp37_;
			_tmp34_ = pamac_row;
			_tmp35_ = _tmp34_->action_togglebutton;
			gtk_toggle_button_set_active (_tmp35_, TRUE);
			_tmp36_ = pamac_row;
			_tmp37_ = _tmp36_->action_icon;
			g_object_set (_tmp37_, "icon-name", "software-select-symbolic", NULL);
		} else {
			PamacPackage* _tmp38_;
			const gchar* _tmp39_;
			const gchar* _tmp40_;
			_tmp38_ = pkg;
			_tmp39_ = pamac_package_get_installed_version (_tmp38_);
			_tmp40_ = _tmp39_;
			if (_tmp40_ == NULL) {
				PamacPackageRow* _tmp41_;
				GtkToggleButton* _tmp42_;
				PamacPackageRow* _tmp43_;
				GtkImage* _tmp44_;
				_tmp41_ = pamac_row;
				_tmp42_ = _tmp41_->action_togglebutton;
				gtk_toggle_button_set_active (_tmp42_, FALSE);
				_tmp43_ = pamac_row;
				_tmp44_ = _tmp43_->action_icon;
				g_object_set (_tmp44_, "icon-name", "software-install-symbolic", NULL);
			} else {
				GtkStack* _tmp45_;
				const gchar* _tmp46_;
				const gchar* _tmp47_;
				_tmp45_ = self->view_stack;
				_tmp46_ = gtk_stack_get_visible_child_name (_tmp45_);
				_tmp47_ = _tmp46_;
				if (g_strcmp0 (_tmp47_, "updates") == 0) {
					PamacPackageRow* _tmp48_;
					GtkToggleButton* _tmp49_;
					PamacPackageRow* _tmp50_;
					GtkImage* _tmp51_;
					_tmp48_ = pamac_row;
					_tmp49_ = _tmp48_->action_togglebutton;
					gtk_toggle_button_set_active (_tmp49_, FALSE);
					_tmp50_ = pamac_row;
					_tmp51_ = _tmp50_->action_icon;
					g_object_set (_tmp51_, "icon-name", "software-update-symbolic", NULL);
				} else {
					PamacPackageRow* _tmp52_;
					GtkToggleButton* _tmp53_;
					PamacPackageRow* _tmp54_;
					GtkImage* _tmp55_;
					_tmp52_ = pamac_row;
					_tmp53_ = _tmp52_->action_togglebutton;
					gtk_toggle_button_set_active (_tmp53_, FALSE);
					_tmp54_ = pamac_row;
					_tmp55_ = _tmp54_->action_icon;
					g_object_set (_tmp55_, "icon-name", "software-remove-symbolic", NULL);
				}
			}
		}
	} else {
		PamacPackage* _tmp56_;
		_tmp56_ = pkg;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp56_, PAMAC_TYPE_SNAP_PACKAGE)) {
			gboolean _tmp57_ = FALSE;
			GHashTable* _tmp58_;
			PamacPackage* _tmp59_;
			const gchar* _tmp60_;
			const gchar* _tmp61_;
			_tmp58_ = pamac_snap_to_install;
			_tmp59_ = pkg;
			_tmp60_ = pamac_package_get_name (_tmp59_);
			_tmp61_ = _tmp60_;
			if (g_hash_table_contains (_tmp58_, _tmp61_)) {
				_tmp57_ = TRUE;
			} else {
				GHashTable* _tmp62_;
				PamacPackage* _tmp63_;
				const gchar* _tmp64_;
				const gchar* _tmp65_;
				_tmp62_ = pamac_snap_to_remove;
				_tmp63_ = pkg;
				_tmp64_ = pamac_package_get_name (_tmp63_);
				_tmp65_ = _tmp64_;
				_tmp57_ = g_hash_table_contains (_tmp62_, _tmp65_);
			}
			if (_tmp57_) {
				PamacPackageRow* _tmp66_;
				GtkToggleButton* _tmp67_;
				PamacPackageRow* _tmp68_;
				GtkImage* _tmp69_;
				_tmp66_ = pamac_row;
				_tmp67_ = _tmp66_->action_togglebutton;
				gtk_toggle_button_set_active (_tmp67_, TRUE);
				_tmp68_ = pamac_row;
				_tmp69_ = _tmp68_->action_icon;
				g_object_set (_tmp69_, "icon-name", "software-select-symbolic", NULL);
			} else {
				PamacPackage* _tmp70_;
				const gchar* _tmp71_;
				const gchar* _tmp72_;
				_tmp70_ = pkg;
				_tmp71_ = pamac_package_get_installed_version (_tmp70_);
				_tmp72_ = _tmp71_;
				if (_tmp72_ == NULL) {
					PamacPackageRow* _tmp73_;
					GtkToggleButton* _tmp74_;
					PamacPackageRow* _tmp75_;
					GtkImage* _tmp76_;
					_tmp73_ = pamac_row;
					_tmp74_ = _tmp73_->action_togglebutton;
					gtk_toggle_button_set_active (_tmp74_, FALSE);
					_tmp75_ = pamac_row;
					_tmp76_ = _tmp75_->action_icon;
					g_object_set (_tmp76_, "icon-name", "software-install-symbolic", NULL);
				} else {
					PamacPackageRow* _tmp77_;
					GtkToggleButton* _tmp78_;
					PamacPackageRow* _tmp79_;
					GtkImage* _tmp80_;
					_tmp77_ = pamac_row;
					_tmp78_ = _tmp77_->action_togglebutton;
					gtk_toggle_button_set_active (_tmp78_, FALSE);
					_tmp79_ = pamac_row;
					_tmp80_ = _tmp79_->action_icon;
					g_object_set (_tmp80_, "icon-name", "software-remove-symbolic", NULL);
				}
			}
		} else {
			PamacPackage* _tmp81_;
			_tmp81_ = pkg;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp81_, PAMAC_TYPE_FLATPAK_PACKAGE)) {
				gboolean _tmp82_ = FALSE;
				gboolean _tmp83_ = FALSE;
				GHashTable* _tmp84_;
				PamacPackage* _tmp85_;
				const gchar* _tmp86_;
				const gchar* _tmp87_;
				_tmp84_ = pamac_flatpak_to_install;
				_tmp85_ = pkg;
				_tmp86_ = pamac_package_get_id (_tmp85_);
				_tmp87_ = _tmp86_;
				if (g_hash_table_contains (_tmp84_, _tmp87_)) {
					_tmp83_ = TRUE;
				} else {
					GHashTable* _tmp88_;
					PamacPackage* _tmp89_;
					const gchar* _tmp90_;
					const gchar* _tmp91_;
					_tmp88_ = pamac_flatpak_to_remove;
					_tmp89_ = pkg;
					_tmp90_ = pamac_package_get_id (_tmp89_);
					_tmp91_ = _tmp90_;
					_tmp83_ = g_hash_table_contains (_tmp88_, _tmp91_);
				}
				if (_tmp83_) {
					_tmp82_ = TRUE;
				} else {
					GHashTable* _tmp92_;
					PamacPackage* _tmp93_;
					const gchar* _tmp94_;
					const gchar* _tmp95_;
					_tmp92_ = pamac_to_update;
					_tmp93_ = pkg;
					_tmp94_ = pamac_package_get_id (_tmp93_);
					_tmp95_ = _tmp94_;
					_tmp82_ = g_hash_table_contains (_tmp92_, _tmp95_);
				}
				if (_tmp82_) {
					PamacPackageRow* _tmp96_;
					GtkToggleButton* _tmp97_;
					PamacPackageRow* _tmp98_;
					GtkImage* _tmp99_;
					_tmp96_ = pamac_row;
					_tmp97_ = _tmp96_->action_togglebutton;
					gtk_toggle_button_set_active (_tmp97_, TRUE);
					_tmp98_ = pamac_row;
					_tmp99_ = _tmp98_->action_icon;
					g_object_set (_tmp99_, "icon-name", "software-select-symbolic", NULL);
				} else {
					PamacPackage* _tmp100_;
					const gchar* _tmp101_;
					const gchar* _tmp102_;
					_tmp100_ = pkg;
					_tmp101_ = pamac_package_get_installed_version (_tmp100_);
					_tmp102_ = _tmp101_;
					if (_tmp102_ == NULL) {
						PamacPackageRow* _tmp103_;
						GtkToggleButton* _tmp104_;
						PamacPackageRow* _tmp105_;
						GtkImage* _tmp106_;
						_tmp103_ = pamac_row;
						_tmp104_ = _tmp103_->action_togglebutton;
						gtk_toggle_button_set_active (_tmp104_, FALSE);
						_tmp105_ = pamac_row;
						_tmp106_ = _tmp105_->action_icon;
						g_object_set (_tmp106_, "icon-name", "software-install-symbolic", NULL);
					} else {
						PamacPackageRow* _tmp107_;
						GtkToggleButton* _tmp108_;
						PamacPackageRow* _tmp109_;
						GtkImage* _tmp110_;
						_tmp107_ = pamac_row;
						_tmp108_ = _tmp107_->action_togglebutton;
						gtk_toggle_button_set_active (_tmp108_, FALSE);
						_tmp109_ = pamac_row;
						_tmp110_ = _tmp109_->action_icon;
						g_object_set (_tmp110_, "icon-name", "software-remove-symbolic", NULL);
					}
				}
			} else {
				PamacPackage* _tmp111_;
				_tmp111_ = pkg;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp111_, PAMAC_TYPE_ALPM_PACKAGE)) {
					PamacPackage* _tmp112_;
					const gchar* _tmp113_;
					const gchar* _tmp114_;
					_tmp112_ = pkg;
					_tmp113_ = pamac_package_get_installed_version (_tmp112_);
					_tmp114_ = _tmp113_;
					if (_tmp114_ == NULL) {
						GHashTable* _tmp115_;
						PamacPackage* _tmp116_;
						const gchar* _tmp117_;
						const gchar* _tmp118_;
						_tmp115_ = pamac_to_install;
						_tmp116_ = pkg;
						_tmp117_ = pamac_package_get_name (_tmp116_);
						_tmp118_ = _tmp117_;
						if (g_hash_table_contains (_tmp115_, _tmp118_)) {
							PamacPackageRow* _tmp119_;
							GtkToggleButton* _tmp120_;
							PamacPackageRow* _tmp121_;
							GtkImage* _tmp122_;
							_tmp119_ = pamac_row;
							_tmp120_ = _tmp119_->action_togglebutton;
							gtk_toggle_button_set_active (_tmp120_, TRUE);
							_tmp121_ = pamac_row;
							_tmp122_ = _tmp121_->action_icon;
							g_object_set (_tmp122_, "icon-name", "software-select-symbolic", NULL);
						} else {
							PamacPackageRow* _tmp123_;
							GtkToggleButton* _tmp124_;
							PamacPackageRow* _tmp125_;
							GtkImage* _tmp126_;
							_tmp123_ = pamac_row;
							_tmp124_ = _tmp123_->action_togglebutton;
							gtk_toggle_button_set_active (_tmp124_, FALSE);
							_tmp125_ = pamac_row;
							_tmp126_ = _tmp125_->action_icon;
							g_object_set (_tmp126_, "icon-name", "software-install-symbolic", NULL);
						}
					} else {
						GtkStack* _tmp127_;
						const gchar* _tmp128_;
						const gchar* _tmp129_;
						_tmp127_ = self->view_stack;
						_tmp128_ = gtk_stack_get_visible_child_name (_tmp127_);
						_tmp129_ = _tmp128_;
						if (g_strcmp0 (_tmp129_, "updates") == 0) {
							GHashTable* _tmp130_;
							PamacPackage* _tmp131_;
							const gchar* _tmp132_;
							const gchar* _tmp133_;
							_tmp130_ = pamac_to_update;
							_tmp131_ = pkg;
							_tmp132_ = pamac_package_get_name (_tmp131_);
							_tmp133_ = _tmp132_;
							if (g_hash_table_contains (_tmp130_, _tmp133_)) {
								PamacPackageRow* _tmp134_;
								GtkToggleButton* _tmp135_;
								PamacPackageRow* _tmp136_;
								GtkImage* _tmp137_;
								_tmp134_ = pamac_row;
								_tmp135_ = _tmp134_->action_togglebutton;
								gtk_toggle_button_set_active (_tmp135_, TRUE);
								_tmp136_ = pamac_row;
								_tmp137_ = _tmp136_->action_icon;
								g_object_set (_tmp137_, "icon-name", "software-select-symbolic", NULL);
							} else {
								PamacPackageRow* _tmp138_;
								GtkToggleButton* _tmp139_;
								PamacPackageRow* _tmp140_;
								GtkImage* _tmp141_;
								_tmp138_ = pamac_row;
								_tmp139_ = _tmp138_->action_togglebutton;
								gtk_toggle_button_set_active (_tmp139_, FALSE);
								_tmp140_ = pamac_row;
								_tmp141_ = _tmp140_->action_icon;
								g_object_set (_tmp141_, "icon-name", "software-update-symbolic", NULL);
							}
						} else {
							GHashTable* _tmp142_;
							PamacPackage* _tmp143_;
							const gchar* _tmp144_;
							const gchar* _tmp145_;
							_tmp142_ = pamac_to_remove;
							_tmp143_ = pkg;
							_tmp144_ = pamac_package_get_name (_tmp143_);
							_tmp145_ = _tmp144_;
							if (g_hash_table_contains (_tmp142_, _tmp145_)) {
								PamacPackageRow* _tmp146_;
								GtkToggleButton* _tmp147_;
								PamacPackageRow* _tmp148_;
								GtkImage* _tmp149_;
								_tmp146_ = pamac_row;
								_tmp147_ = _tmp146_->action_togglebutton;
								gtk_toggle_button_set_active (_tmp147_, TRUE);
								_tmp148_ = pamac_row;
								_tmp149_ = _tmp148_->action_icon;
								g_object_set (_tmp149_, "icon-name", "software-select-symbolic", NULL);
							} else {
								PamacPackageRow* _tmp150_;
								GtkToggleButton* _tmp151_;
								PamacPackageRow* _tmp152_;
								GtkImage* _tmp153_;
								_tmp150_ = pamac_row;
								_tmp151_ = _tmp150_->action_togglebutton;
								gtk_toggle_button_set_active (_tmp151_, FALSE);
								_tmp152_ = pamac_row;
								_tmp153_ = _tmp152_->action_icon;
								g_object_set (_tmp153_, "icon-name", "software-remove-symbolic", NULL);
							}
						}
					}
				}
			}
		}
	}
	_g_object_unref0 (pkg);
}

static void
___lambda19__gtk_callback (GtkWidget* widget,
                           gpointer self)
{
	__lambda19_ ((PamacManagerWindow*) self, widget);
}

static void
pamac_manager_window_refresh_listbox_buttons (PamacManagerWindow* self)
{
	GtkFlowBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->packages_listbox;
	gtk_container_foreach ((GtkContainer*) _tmp0_, ___lambda19__gtk_callback, self);
}

void
pamac_manager_window_refresh_packages_list (PamacManagerWindow* self)
{
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GQuark _tmp5_ = 0U;
	static GQuark _tmp4_label0 = 0;
	static GQuark _tmp4_label1 = 0;
	static GQuark _tmp4_label2 = 0;
	static GQuark _tmp4_label3 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->view_stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_);
	if (_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("browse")))) {
		switch (0) {
			default:
			{
				GtkButton* _tmp6_;
				HdyFlap* _tmp7_;
				gboolean _tmp8_;
				gboolean _tmp9_;
				GtkStack* _tmp10_;
				const gchar* _tmp11_;
				const gchar* _tmp12_;
				const gchar* _tmp13_;
				GQuark _tmp15_ = 0U;
				static GQuark _tmp14_label0 = 0;
				static GQuark _tmp14_label1 = 0;
				static GQuark _tmp14_label2 = 0;
				static GQuark _tmp14_label3 = 0;
				pamac_manager_window_show_sidebar (self, TRUE);
				_tmp6_ = self->search_button;
				_tmp7_ = self->browse_flap;
				_tmp8_ = gtk_widget_get_visible ((GtkWidget*) _tmp7_);
				_tmp9_ = _tmp8_;
				gtk_widget_set_visible ((GtkWidget*) _tmp6_, _tmp9_);
				_tmp10_ = self->priv->browse_stack;
				_tmp11_ = gtk_stack_get_visible_child_name (_tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = _tmp12_;
				_tmp15_ = (NULL == _tmp13_) ? 0 : g_quark_from_string (_tmp13_);
				if (_tmp15_ == ((0 != _tmp14_label0) ? _tmp14_label0 : (_tmp14_label0 = g_quark_from_static_string ("filters")))) {
					switch (0) {
						default:
						{
							switch (self->priv->current_filters_index) {
								case 0:
								{
									GtkListBox* _tmp16_;
									GtkListBoxRow* _tmp17_;
									_tmp16_ = self->priv->categories_listbox;
									_tmp17_ = gtk_list_box_get_selected_row (_tmp16_);
									pamac_manager_window_on_categories_listbox_row_activated (self, _tmp17_);
									break;
								}
								case 1:
								{
									GtkListBox* _tmp18_;
									GtkListBoxRow* _tmp19_;
									_tmp18_ = self->priv->groups_listbox;
									_tmp19_ = gtk_list_box_get_selected_row (_tmp18_);
									pamac_manager_window_on_groups_listbox_row_activated (self, _tmp19_);
									break;
								}
								case 2:
								{
									GtkListBox* _tmp20_;
									GtkListBoxRow* _tmp21_;
									_tmp20_ = self->priv->repos_listbox;
									_tmp21_ = gtk_list_box_get_selected_row (_tmp20_);
									pamac_manager_window_on_repos_listbox_row_activated (self, _tmp21_);
									break;
								}
								default:
								{
									break;
								}
							}
							break;
						}
					}
				} else if (_tmp15_ == ((0 != _tmp14_label1) ? _tmp14_label1 : (_tmp14_label1 = g_quark_from_static_string ("categories")))) {
					switch (0) {
						default:
						{
							GtkListBox* _tmp22_;
							GtkListBoxRow* _tmp23_;
							_tmp22_ = self->priv->categories_listbox;
							_tmp23_ = gtk_list_box_get_selected_row (_tmp22_);
							pamac_manager_window_on_categories_listbox_row_activated (self, _tmp23_);
							break;
						}
					}
				} else if (_tmp15_ == ((0 != _tmp14_label2) ? _tmp14_label2 : (_tmp14_label2 = g_quark_from_static_string ("groups")))) {
					switch (0) {
						default:
						{
							GtkListBox* _tmp24_;
							GtkListBoxRow* _tmp25_;
							_tmp24_ = self->priv->groups_listbox;
							_tmp25_ = gtk_list_box_get_selected_row (_tmp24_);
							pamac_manager_window_on_groups_listbox_row_activated (self, _tmp25_);
							break;
						}
					}
				} else if (_tmp15_ == ((0 != _tmp14_label3) ? _tmp14_label3 : (_tmp14_label3 = g_quark_from_static_string ("repos")))) {
					switch (0) {
						default:
						{
							GtkListBox* _tmp26_;
							GtkListBoxRow* _tmp27_;
							_tmp26_ = self->priv->repos_listbox;
							_tmp27_ = gtk_list_box_get_selected_row (_tmp26_);
							pamac_manager_window_on_repos_listbox_row_activated (self, _tmp27_);
							break;
						}
					}
				} else {
					switch (0) {
						default:
						{
							break;
						}
					}
				}
				pamac_manager_window_set_pending_operations (self);
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("installed")))) {
		switch (0) {
			default:
			{
				PamacLocalConfig* _tmp28_;
				gboolean _tmp29_;
				gboolean _tmp30_;
				GtkButton* _tmp31_;
				HdyFlap* _tmp32_;
				gboolean _tmp33_;
				gboolean _tmp34_;
				GtkListBox* _tmp35_;
				GtkListBoxRow* _tmp36_;
				_tmp28_ = self->local_config;
				_tmp29_ = pamac_local_config_get_software_mode (_tmp28_);
				_tmp30_ = _tmp29_;
				pamac_manager_window_show_sidebar (self, !_tmp30_);
				_tmp31_ = self->search_button;
				_tmp32_ = self->browse_flap;
				_tmp33_ = gtk_widget_get_visible ((GtkWidget*) _tmp32_);
				_tmp34_ = _tmp33_;
				gtk_widget_set_visible ((GtkWidget*) _tmp31_, _tmp34_);
				_tmp35_ = self->priv->installed_listbox;
				_tmp36_ = gtk_list_box_get_selected_row (_tmp35_);
				pamac_manager_window_on_installed_listbox_row_activated (self, _tmp36_);
				pamac_manager_window_set_pending_operations (self);
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label2) ? _tmp4_label2 : (_tmp4_label2 = g_quark_from_static_string ("search")))) {
		switch (0) {
			default:
			{
				PamacLocalConfig* _tmp37_;
				gboolean _tmp38_;
				gboolean _tmp39_;
				GtkListBox* _tmp40_;
				GtkListBoxRow* _tmp41_;
				_tmp37_ = self->local_config;
				_tmp38_ = pamac_local_config_get_software_mode (_tmp37_);
				_tmp39_ = _tmp38_;
				pamac_manager_window_show_sidebar (self, !_tmp39_);
				_tmp40_ = self->priv->search_listbox;
				_tmp41_ = gtk_list_box_get_selected_row (_tmp40_);
				pamac_manager_window_on_search_listbox_row_activated (self, _tmp41_);
				pamac_manager_window_set_pending_operations (self);
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label3) ? _tmp4_label3 : (_tmp4_label3 = g_quark_from_static_string ("updates")))) {
		switch (0) {
			default:
			{
				PamacLocalConfig* _tmp42_;
				gboolean _tmp43_;
				gboolean _tmp44_;
				GtkButton* _tmp45_;
				GtkButton* _tmp46_;
				GtkButton* _tmp47_;
				_tmp42_ = self->local_config;
				_tmp43_ = pamac_local_config_get_software_mode (_tmp42_);
				_tmp44_ = _tmp43_;
				if (_tmp44_) {
					pamac_manager_window_show_sidebar (self, FALSE);
				}
				_tmp45_ = self->search_button;
				gtk_widget_set_visible ((GtkWidget*) _tmp45_, FALSE);
				_tmp46_ = self->apply_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp46_, FALSE);
				_tmp47_ = self->priv->cancel_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp47_, FALSE);
				if (self->priv->updates_checked) {
					pamac_manager_window_populate_updates (self);
				} else {
					pamac_manager_window_refresh_updates (self, FALSE);
				}
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				break;
			}
		}
	}
}

void
pamac_manager_window_display_details (PamacManagerWindow* self,
                                      PamacPackage* pkg)
{
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pkg != NULL);
	_tmp0_ = self->priv->details_scrolledwindow;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_adjustment_set_value (_tmp2_, (gdouble) 0);
	if (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_AUR_PACKAGE)) {
		pamac_manager_window_display_aur_details (self, G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_AUR_PACKAGE) ? ((PamacAURPackage*) pkg) : NULL);
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_ALPM_PACKAGE)) {
			pamac_manager_window_display_package_details (self, G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_ALPM_PACKAGE) ? ((PamacAlpmPackage*) pkg) : NULL);
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_SNAP_PACKAGE)) {
				pamac_manager_window_display_snap_details (self, G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_SNAP_PACKAGE) ? ((PamacSnapPackage*) pkg) : NULL);
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_FLATPAK_PACKAGE)) {
					pamac_manager_window_display_flatpak_details (self, G_TYPE_CHECK_INSTANCE_TYPE (pkg, PAMAC_TYPE_FLATPAK_PACKAGE) ? ((PamacFlatpakPackage*) pkg) : NULL);
				}
			}
		}
	}
}

static void
___lambda7_ (PamacManagerWindow* self,
             GObject* obj,
             GAsyncResult* res)
{
	PamacPackage* pkg = NULL;
	PamacDatabaseGtk* _tmp0_;
	PamacAURPackage* _tmp1_;
	PamacPackage* _tmp2_;
	PamacPackage* _tmp3_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_aur_pkg_finish ((PamacDatabase*) _tmp0_, res);
	_tmp2_ = _g_object_ref0 ((PamacPackage*) _tmp1_);
	pkg = _tmp2_;
	_tmp3_ = pkg;
	if (_tmp3_ != NULL) {
		PamacPackage* _tmp4_;
		_tmp4_ = pkg;
		pamac_manager_window_display_details (self, _tmp4_);
	} else {
		g_action_group_activate_action ((GActionGroup*) self, "back", NULL);
	}
	_g_object_unref0 (pkg);
}

static void
____lambda7__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	___lambda7_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
____lambda57_ (PamacManagerWindow* self,
               GObject* obj,
               GAsyncResult* res)
{
	PamacPackage* pkg = NULL;
	PamacDatabaseGtk* _tmp0_;
	PamacSnapPackage* _tmp1_;
	PamacPackage* _tmp2_;
	PamacPackage* _tmp3_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_snap_finish ((PamacDatabase*) _tmp0_, res);
	_tmp2_ = _g_object_ref0 ((PamacPackage*) _tmp1_);
	pkg = _tmp2_;
	_tmp3_ = pkg;
	if (_tmp3_ != NULL) {
		PamacPackage* _tmp4_;
		_tmp4_ = pkg;
		pamac_manager_window_display_details (self, _tmp4_);
	} else {
		g_action_group_activate_action ((GActionGroup*) self, "back", NULL);
	}
	_g_object_unref0 (pkg);
}

static void
_____lambda57__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda57_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
_____lambda58_ (PamacManagerWindow* self,
                GObject* obj,
                GAsyncResult* res)
{
	PamacPackage* pkg = NULL;
	PamacDatabaseGtk* _tmp0_;
	PamacFlatpakPackage* _tmp1_;
	PamacPackage* _tmp2_;
	PamacPackage* _tmp3_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_flatpak_finish ((PamacDatabase*) _tmp0_, res);
	_tmp2_ = _g_object_ref0 ((PamacPackage*) _tmp1_);
	pkg = _tmp2_;
	_tmp3_ = pkg;
	if (_tmp3_ != NULL) {
		PamacPackage* _tmp4_;
		_tmp4_ = pkg;
		pamac_manager_window_display_details (self, _tmp4_);
	} else {
		g_action_group_activate_action ((GActionGroup*) self, "back", NULL);
	}
	_g_object_unref0 (pkg);
}

static void
______lambda58__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	_____lambda58_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
pamac_manager_window_refresh_details (PamacManagerWindow* self)
{
	PamacPackage* _tmp0_;
	PamacPackage* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_package_displayed;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->current_package_displayed;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, PAMAC_TYPE_AUR_PACKAGE)) {
		PamacDatabaseGtk* _tmp2_;
		PamacPackage* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp2_ = self->priv->_database;
		_tmp3_ = self->priv->current_package_displayed;
		_tmp4_ = pamac_package_get_name (_tmp3_);
		_tmp5_ = _tmp4_;
		pamac_database_get_aur_pkg_async ((PamacDatabase*) _tmp2_, _tmp5_, ____lambda7__gasync_ready_callback, g_object_ref (self));
	} else {
		PamacPackage* _tmp6_;
		_tmp6_ = self->priv->current_package_displayed;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, PAMAC_TYPE_SNAP_PACKAGE)) {
			PamacDatabaseGtk* _tmp7_;
			PamacPackage* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			_tmp7_ = self->priv->_database;
			_tmp8_ = self->priv->current_package_displayed;
			_tmp9_ = pamac_package_get_name (_tmp8_);
			_tmp10_ = _tmp9_;
			pamac_database_get_snap_async ((PamacDatabase*) _tmp7_, _tmp10_, _____lambda57__gasync_ready_callback, g_object_ref (self));
		} else {
			PamacPackage* _tmp11_;
			_tmp11_ = self->priv->current_package_displayed;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, PAMAC_TYPE_FLATPAK_PACKAGE)) {
				PamacFlatpakPackage* current_flatpak = NULL;
				PamacPackage* _tmp12_;
				PamacFlatpakPackage* _tmp13_;
				PamacDatabaseGtk* _tmp14_;
				PamacFlatpakPackage* _tmp15_;
				const gchar* _tmp16_;
				const gchar* _tmp17_;
				_tmp12_ = self->priv->current_package_displayed;
				_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, PAMAC_TYPE_FLATPAK_PACKAGE) ? ((PamacFlatpakPackage*) _tmp12_) : NULL);
				current_flatpak = _tmp13_;
				_tmp14_ = self->priv->_database;
				_tmp15_ = current_flatpak;
				_tmp16_ = pamac_package_get_id ((PamacPackage*) _tmp15_);
				_tmp17_ = _tmp16_;
				pamac_database_get_flatpak_async ((PamacDatabase*) _tmp14_, _tmp17_, ______lambda58__gasync_ready_callback, g_object_ref (self));
				_g_object_unref0 (current_flatpak);
			} else {
				PamacPackage* pkg = NULL;
				PamacDatabaseGtk* _tmp18_;
				PamacPackage* _tmp19_;
				const gchar* _tmp20_;
				const gchar* _tmp21_;
				PamacAlpmPackage* _tmp22_;
				PamacPackage* _tmp23_;
				PamacPackage* _tmp24_;
				PamacPackage* _tmp31_;
				_tmp18_ = self->priv->_database;
				_tmp19_ = self->priv->current_package_displayed;
				_tmp20_ = pamac_package_get_name (_tmp19_);
				_tmp21_ = _tmp20_;
				_tmp22_ = pamac_database_get_installed_pkg ((PamacDatabase*) _tmp18_, _tmp21_);
				_tmp23_ = _g_object_ref0 ((PamacPackage*) _tmp22_);
				pkg = _tmp23_;
				_tmp24_ = pkg;
				if (_tmp24_ == NULL) {
					PamacDatabaseGtk* _tmp25_;
					PamacPackage* _tmp26_;
					const gchar* _tmp27_;
					const gchar* _tmp28_;
					PamacAlpmPackage* _tmp29_;
					PamacPackage* _tmp30_;
					_tmp25_ = self->priv->_database;
					_tmp26_ = self->priv->current_package_displayed;
					_tmp27_ = pamac_package_get_name (_tmp26_);
					_tmp28_ = _tmp27_;
					_tmp29_ = pamac_database_get_sync_pkg ((PamacDatabase*) _tmp25_, _tmp28_);
					_tmp30_ = _g_object_ref0 ((PamacPackage*) _tmp29_);
					_g_object_unref0 (pkg);
					pkg = _tmp30_;
				}
				_tmp31_ = pkg;
				if (_tmp31_ != NULL) {
					PamacPackage* _tmp32_;
					_tmp32_ = pkg;
					pamac_manager_window_display_details (self, _tmp32_);
				} else {
					g_action_group_activate_action ((GActionGroup*) self, "back", NULL);
				}
				_g_object_unref0 (pkg);
			}
		}
	}
}

void
pamac_manager_window_display_package_details (PamacManagerWindow* self,
                                              PamacAlpmPackage* pkg)
{
	PamacPackage* _tmp0_;
	gboolean _tmp1_ = FALSE;
	PamacLocalConfig* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	PamacAURPackage* aur_pkg = NULL;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	GtkScrolledWindow* _tmp16_;
	GtkBox* _tmp17_;
	PamacAURPackage* _tmp18_;
	GtkStackSwitcher* _tmp19_;
	PamacLocalConfig* _tmp20_;
	gboolean _tmp21_;
	gboolean _tmp22_;
	PamacAURPackage* _tmp23_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pkg != NULL);
	_tmp0_ = _g_object_ref0 ((PamacPackage*) pkg);
	_g_object_unref0 (self->priv->current_package_displayed);
	self->priv->current_package_displayed = _tmp0_;
	_tmp2_ = self->local_config;
	_tmp3_ = pamac_local_config_get_software_mode (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		_tmp1_ = TRUE;
	} else {
		GtkStack* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = self->priv->properties_stack;
		_tmp6_ = gtk_stack_get_visible_child_name (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = g_strcmp0 (_tmp7_, "build_files") == 0;
	}
	if (_tmp1_) {
		GtkStack* _tmp8_;
		_tmp8_ = self->priv->properties_stack;
		gtk_stack_set_visible_child_name (_tmp8_, "details");
	}
	aur_pkg = NULL;
	_tmp9_ = pamac_package_get_repo ((PamacPackage*) pkg);
	_tmp10_ = _tmp9_;
	if (g_strcmp0 (_tmp10_, g_dgettext (NULL, "AUR")) == 0) {
		PamacDatabaseGtk* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		PamacAURPackage* _tmp14_;
		PamacAURPackage* _tmp15_;
		_tmp11_ = self->priv->_database;
		_tmp12_ = pamac_package_get_name ((PamacPackage*) pkg);
		_tmp13_ = _tmp12_;
		_tmp14_ = pamac_database_get_aur_pkg ((PamacDatabase*) _tmp11_, _tmp13_);
		_tmp15_ = _g_object_ref0 (_tmp14_);
		_g_object_unref0 (aur_pkg);
		aur_pkg = _tmp15_;
	}
	_tmp16_ = self->priv->files_scrolledwindow;
	gtk_widget_set_visible ((GtkWidget*) _tmp16_, TRUE);
	_tmp17_ = self->priv->build_files_box;
	_tmp18_ = aur_pkg;
	gtk_widget_set_visible ((GtkWidget*) _tmp17_, _tmp18_ != NULL);
	_tmp19_ = self->priv->properties_stack_switcher;
	_tmp20_ = self->local_config;
	_tmp21_ = pamac_local_config_get_software_mode (_tmp20_);
	_tmp22_ = _tmp21_;
	gtk_widget_set_visible ((GtkWidget*) _tmp19_, !_tmp22_);
	_tmp23_ = aur_pkg;
	pamac_manager_window_set_package_details (self, pkg, _tmp23_);
	_g_object_unref0 (aur_pkg);
}

static void
pamac_manager_window_display_aur_details (PamacManagerWindow* self,
                                          PamacAURPackage* aur_pkg)
{
	PamacPackage* _tmp0_;
	const gchar* installed_version = NULL;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GtkScrolledWindow* _tmp8_;
	const gchar* _tmp9_;
	GtkBox* _tmp10_;
	GtkStackSwitcher* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (aur_pkg != NULL);
	_tmp0_ = _g_object_ref0 ((PamacPackage*) aur_pkg);
	_g_object_unref0 (self->priv->current_package_displayed);
	self->priv->current_package_displayed = _tmp0_;
	_tmp1_ = pamac_package_get_installed_version ((PamacPackage*) aur_pkg);
	_tmp2_ = _tmp1_;
	installed_version = _tmp2_;
	_tmp3_ = installed_version;
	if (_tmp3_ == NULL) {
		GtkStack* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp4_ = self->priv->properties_stack;
		_tmp5_ = gtk_stack_get_visible_child_name (_tmp4_);
		_tmp6_ = _tmp5_;
		if (g_strcmp0 (_tmp6_, "files") == 0) {
			GtkStack* _tmp7_;
			_tmp7_ = self->priv->properties_stack;
			gtk_stack_set_visible_child_name (_tmp7_, "details");
		}
	}
	_tmp8_ = self->priv->files_scrolledwindow;
	_tmp9_ = installed_version;
	gtk_widget_set_visible ((GtkWidget*) _tmp8_, _tmp9_ != NULL);
	_tmp10_ = self->priv->build_files_box;
	gtk_widget_set_visible ((GtkWidget*) _tmp10_, TRUE);
	_tmp11_ = self->priv->properties_stack_switcher;
	gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE);
	pamac_manager_window_set_aur_details (self, aur_pkg);
}

void
pamac_manager_window_display_snap_details (PamacManagerWindow* self,
                                           PamacSnapPackage* snap_pkg)
{
	PamacPackage* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkStack* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GtkStackSwitcher* _tmp9_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (snap_pkg != NULL);
	_tmp0_ = _g_object_ref0 ((PamacPackage*) snap_pkg);
	_g_object_unref0 (self->priv->current_package_displayed);
	self->priv->current_package_displayed = _tmp0_;
	_tmp2_ = self->priv->properties_stack;
	_tmp3_ = gtk_stack_get_visible_child_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "files") == 0) {
		_tmp1_ = TRUE;
	} else {
		GtkStack* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = self->priv->properties_stack;
		_tmp6_ = gtk_stack_get_visible_child_name (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = g_strcmp0 (_tmp7_, "build_files") == 0;
	}
	if (_tmp1_) {
		GtkStack* _tmp8_;
		_tmp8_ = self->priv->properties_stack;
		gtk_stack_set_visible_child_name (_tmp8_, "details");
	}
	_tmp9_ = self->priv->properties_stack_switcher;
	gtk_widget_set_visible ((GtkWidget*) _tmp9_, FALSE);
	pamac_manager_window_set_snap_details (self, snap_pkg);
}

void
pamac_manager_window_display_flatpak_details (PamacManagerWindow* self,
                                              PamacFlatpakPackage* flatpak_pkg)
{
	PamacPackage* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkStack* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GtkStackSwitcher* _tmp9_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (flatpak_pkg != NULL);
	_tmp0_ = _g_object_ref0 ((PamacPackage*) flatpak_pkg);
	_g_object_unref0 (self->priv->current_package_displayed);
	self->priv->current_package_displayed = _tmp0_;
	_tmp2_ = self->priv->properties_stack;
	_tmp3_ = gtk_stack_get_visible_child_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "files") == 0) {
		_tmp1_ = TRUE;
	} else {
		GtkStack* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = self->priv->properties_stack;
		_tmp6_ = gtk_stack_get_visible_child_name (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = g_strcmp0 (_tmp7_, "build_files") == 0;
	}
	if (_tmp1_) {
		GtkStack* _tmp8_;
		_tmp8_ = self->priv->properties_stack;
		gtk_stack_set_visible_child_name (_tmp8_, "details");
	}
	_tmp9_ = self->priv->properties_stack_switcher;
	gtk_widget_set_visible ((GtkWidget*) _tmp9_, FALSE);
	pamac_manager_window_set_flatpak_details (self, flatpak_pkg);
}

static Block18Data*
block18_data_ref (Block18Data* _data18_)
{
	g_atomic_int_inc (&_data18_->_ref_count_);
	return _data18_;
}

static void
block18_data_unref (void * _userdata_)
{
	Block18Data* _data18_;
	_data18_ = (Block18Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data18_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data18_->self;
		_g_object_unref0 (_data18_->updates_dialog);
		_g_object_unref0 (self);
		g_slice_free (Block18Data, _data18_);
	}
}

static void
____lambda81_ (Block18Data* _data18_)
{
	PamacManagerWindow* self;
	PamacUpdatesDialog* _tmp0_;
	self = _data18_->self;
	_tmp0_ = _data18_->updates_dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}

static void
_____lambda81__gtk_dialog_response (GtkDialog* _sender,
                                    gint response_id,
                                    gpointer self)
{
	____lambda81_ (self);
}

static void
pamac_manager_window_on_packages_listbox_row_activated (PamacManagerWindow* self,
                                                        GtkFlowBoxChild* row)
{
	PamacPackageRow* pamac_row = NULL;
	PamacPackageRow* _tmp0_;
	PamacPackage* pkg = NULL;
	PamacPackageRow* _tmp1_;
	PamacPackage* _tmp2_;
	PamacPackage* _tmp3_;
	PamacPackage* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	pamac_row = PAMAC_IS_PACKAGE_ROW (row) ? ((PamacPackageRow*) row) : NULL;
	_tmp0_ = pamac_row;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = pamac_row;
	_tmp2_ = _tmp1_->pkg;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	pkg = _tmp3_;
	_tmp4_ = pkg;
	if (_tmp4_ != NULL) {
		PamacPackage* _tmp5_;
		GtkBox* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp21_ = FALSE;
		HdyLeaflet* _tmp22_;
		gboolean _tmp23_;
		gboolean _tmp24_;
		_tmp5_ = pkg;
		pamac_manager_window_display_details (self, _tmp5_);
		_tmp6_ = self->main_details_box;
		_tmp7_ = gtk_widget_get_visible ((GtkWidget*) _tmp6_);
		_tmp8_ = _tmp7_;
		if (!_tmp8_) {
			GtkBox* _tmp9_;
			HdyLeaflet* _tmp11_;
			gboolean _tmp12_;
			gboolean _tmp13_;
			_tmp9_ = self->main_details_box;
			gtk_widget_set_visible ((GtkWidget*) _tmp9_, TRUE);
			if (!self->priv->first_details_click) {
				self->priv->first_details_click = TRUE;
			} else {
				HdyFlap* _tmp10_;
				_tmp10_ = self->browse_flap;
				gtk_widget_set_visible ((GtkWidget*) _tmp10_, FALSE);
				pamac_manager_window_set_adaptative_details (self, TRUE);
			}
			while (TRUE) {
				if (!gtk_events_pending ()) {
					break;
				}
				gtk_main_iteration ();
			}
			_tmp11_ = self->packages_leaflet;
			_tmp12_ = hdy_leaflet_get_folded (_tmp11_);
			_tmp13_ = _tmp12_;
			if (_tmp13_) {
				HdyLeaflet* _tmp14_;
				_tmp14_ = self->packages_leaflet;
				hdy_leaflet_set_visible_child_name (_tmp14_, "details");
				pamac_manager_window_set_adaptative_details (self, TRUE);
			} else {
				gboolean _tmp15_;
				_tmp15_ = self->priv->_mobile;
				if (_tmp15_) {
					HdyFlap* _tmp16_;
					_tmp16_ = self->browse_flap;
					gtk_widget_set_visible ((GtkWidget*) _tmp16_, FALSE);
					pamac_manager_window_set_adaptative_details (self, TRUE);
				}
			}
		} else {
			HdyLeaflet* _tmp17_;
			gboolean _tmp18_;
			gboolean _tmp19_;
			_tmp17_ = self->packages_leaflet;
			_tmp18_ = hdy_leaflet_get_folded (_tmp17_);
			_tmp19_ = _tmp18_;
			if (_tmp19_) {
				HdyLeaflet* _tmp20_;
				_tmp20_ = self->packages_leaflet;
				hdy_leaflet_set_visible_child_name (_tmp20_, "details");
			}
		}
		_tmp22_ = self->packages_leaflet;
		_tmp23_ = hdy_leaflet_get_folded (_tmp22_);
		_tmp24_ = _tmp23_;
		if (_tmp24_) {
			_tmp21_ = TRUE;
		} else {
			HdyFlap* _tmp25_;
			gboolean _tmp26_;
			gboolean _tmp27_;
			_tmp25_ = self->browse_flap;
			_tmp26_ = gtk_widget_get_visible ((GtkWidget*) _tmp25_);
			_tmp27_ = _tmp26_;
			_tmp21_ = _tmp27_ == FALSE;
		}
		if (_tmp21_) {
			GtkSearchEntry* _tmp28_;
			HdyViewSwitcherTitle* _tmp29_;
			GtkButton* _tmp30_;
			GtkButton* _tmp31_;
			_tmp28_ = self->search_entry;
			gtk_widget_set_visible ((GtkWidget*) _tmp28_, FALSE);
			_tmp29_ = self->view_stack_switcher;
			gtk_widget_set_visible ((GtkWidget*) _tmp29_, FALSE);
			_tmp30_ = self->button_back;
			gtk_widget_set_visible ((GtkWidget*) _tmp30_, TRUE);
			_tmp31_ = self->search_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp31_, FALSE);
		}
	} else {
		PamacPackageRow* _tmp32_;
		GtkLabel* _tmp33_;
		const gchar* _tmp34_;
		const gchar* _tmp35_;
		_tmp32_ = pamac_row;
		_tmp33_ = _tmp32_->name_label;
		_tmp34_ = gtk_label_get_label (_tmp33_);
		_tmp35_ = _tmp34_;
		if (g_strcmp0 (_tmp35_, g_dgettext (NULL, "OS Updates")) == 0) {
			Block18Data* _data18_;
			PamacUpdatesDialog* _tmp36_;
			PamacUpdatesDialog* _tmp37_;
			GtkLabel* _tmp38_;
			GPtrArray* _tmp39_;
			PamacUpdatesDialog* _tmp48_;
			PamacUpdatesDialog* _tmp49_;
			_data18_ = g_slice_new0 (Block18Data);
			_data18_->_ref_count_ = 1;
			_data18_->self = g_object_ref (self);
			_tmp36_ = pamac_updates_dialog_new ((GtkApplicationWindow*) self);
			g_object_ref_sink (_tmp36_);
			_data18_->updates_dialog = _tmp36_;
			_tmp37_ = _data18_->updates_dialog;
			_tmp38_ = _tmp37_->label;
			gtk_label_set_label (_tmp38_, g_dgettext (NULL, "Includes performance, stability and security improvements"));
			_tmp39_ = self->priv->current_packages_list;
			{
				GPtrArray* update_pkg_collection = NULL;
				guint update_pkg_index = 0U;
				update_pkg_collection = _tmp39_;
				for (update_pkg_index = 0; update_pkg_index < update_pkg_collection->len; update_pkg_index = update_pkg_index + 1) {
					PamacPackage* update_pkg = NULL;
					update_pkg = (PamacPackage*) g_ptr_array_index (update_pkg_collection, update_pkg_index);
					{
						PamacPackage* _tmp40_;
						const gchar* _tmp41_;
						const gchar* _tmp42_;
						_tmp40_ = update_pkg;
						_tmp41_ = pamac_package_get_app_name (_tmp40_);
						_tmp42_ = _tmp41_;
						if (_tmp42_ == NULL) {
							PamacPackageRow* update_row = NULL;
							PamacPackage* _tmp43_;
							PamacPackageRow* _tmp44_;
							PamacUpdatesDialog* _tmp45_;
							GtkListBox* _tmp46_;
							PamacPackageRow* _tmp47_;
							_tmp43_ = update_pkg;
							_tmp44_ = pamac_manager_window_create_update_row (self, _tmp43_);
							update_row = _tmp44_;
							_tmp45_ = _data18_->updates_dialog;
							_tmp46_ = _tmp45_->listbox;
							_tmp47_ = update_row;
							gtk_container_add ((GtkContainer*) _tmp46_, (GtkWidget*) _tmp47_);
							_g_object_unref0 (update_row);
						}
					}
				}
			}
			_tmp48_ = _data18_->updates_dialog;
			gtk_widget_show ((GtkWidget*) _tmp48_);
			_tmp49_ = _data18_->updates_dialog;
			g_signal_connect_data ((GtkDialog*) _tmp49_, "response", (GCallback) _____lambda81__gtk_dialog_response, block18_data_ref (_data18_), (GClosureNotify) block18_data_unref, 0);
			block18_data_unref (_data18_);
			_data18_ = NULL;
		}
	}
	_g_object_unref0 (pkg);
}

static void
_pamac_manager_window_on_packages_listbox_row_activated_gtk_flow_box_child_activated (GtkFlowBox* _sender,
                                                                                      GtkFlowBoxChild* child,
                                                                                      gpointer self)
{
	pamac_manager_window_on_packages_listbox_row_activated ((PamacManagerWindow*) self, child);
}

static Block19Data*
block19_data_ref (Block19Data* _data19_)
{
	g_atomic_int_inc (&_data19_->_ref_count_);
	return _data19_;
}

static void
block19_data_unref (void * _userdata_)
{
	Block19Data* _data19_;
	_data19_ = (Block19Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data19_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data19_->self;
		_g_free0 (_data19_->depstring);
		_g_object_unref0 (self);
		g_slice_free (Block19Data, _data19_);
	}
}

static gint
_pamac_compare_pkgs_by_name_gcompare_func (gconstpointer a,
                                           gconstpointer b)
{
	gint result;
	result = pamac_compare_pkgs_by_name ((PamacPackage*) a, (PamacPackage*) b);
	return result;
}

static void
__lambda51_ (Block19Data* _data19_,
             GtkWidget* child)
{
	PamacManagerWindow* self;
	GtkLabel* dep_label = NULL;
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	self = _data19_->self;
	g_return_if_fail (child != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (child, gtk_label_get_type ()) ? ((GtkLabel*) child) : NULL);
	dep_label = _tmp0_;
	_tmp1_ = dep_label;
	if (_tmp1_ != NULL) {
		GtkLabel* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp2_ = dep_label;
		_tmp3_ = gtk_label_get_label (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		_g_free0 (_data19_->depstring);
		_data19_->depstring = _tmp5_;
	}
	_g_object_unref0 (dep_label);
}

static void
___lambda51__gtk_callback (GtkWidget* widget,
                           gpointer self)
{
	__lambda51_ (self, widget);
}

static void
pamac_manager_window_on_deps_listbox_row_activated (PamacManagerWindow* self,
                                                    GtkListBoxRow* row)
{
	Block19Data* _data19_;
	GQueue* _tmp0_;
	PamacPackage* _tmp1_;
	GList* _tmp2_;
	const gchar* _tmp6_;
	PamacDatabaseGtk* _tmp7_;
	const gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_data19_ = g_slice_new0 (Block19Data);
	_data19_->_ref_count_ = 1;
	_data19_->self = g_object_ref (self);
	_tmp0_ = self->display_package_queue;
	_tmp1_ = self->priv->current_package_displayed;
	_tmp2_ = g_queue_find_custom (_tmp0_, _tmp1_, _pamac_compare_pkgs_by_name_gcompare_func);
	if (_tmp2_ == NULL) {
		GQueue* _tmp3_;
		PamacPackage* _tmp4_;
		PamacPackage* _tmp5_;
		_tmp3_ = self->display_package_queue;
		_tmp4_ = self->priv->current_package_displayed;
		_tmp5_ = _g_object_ref0 (_tmp4_);
		g_queue_push_tail (_tmp3_, _tmp5_);
	}
	_data19_->depstring = NULL;
	gtk_container_foreach ((GtkContainer*) row, ___lambda51__gtk_callback, _data19_);
	_tmp6_ = _data19_->depstring;
	if (_tmp6_ == NULL) {
		block19_data_unref (_data19_);
		_data19_ = NULL;
		return;
	}
	_tmp7_ = self->priv->_database;
	_tmp8_ = _data19_->depstring;
	if (pamac_database_has_installed_satisfier ((PamacDatabase*) _tmp7_, _tmp8_)) {
		PamacDatabaseGtk* _tmp9_;
		const gchar* _tmp10_;
		PamacAlpmPackage* _tmp11_;
		_tmp9_ = self->priv->_database;
		_tmp10_ = _data19_->depstring;
		_tmp11_ = pamac_database_get_installed_satisfier ((PamacDatabase*) _tmp9_, _tmp10_);
		pamac_manager_window_display_package_details (self, _tmp11_);
	} else {
		PamacDatabaseGtk* _tmp12_;
		const gchar* _tmp13_;
		_tmp12_ = self->priv->_database;
		_tmp13_ = _data19_->depstring;
		if (pamac_database_has_sync_satisfier ((PamacDatabase*) _tmp12_, _tmp13_)) {
			PamacDatabaseGtk* _tmp14_;
			const gchar* _tmp15_;
			PamacAlpmPackage* _tmp16_;
			_tmp14_ = self->priv->_database;
			_tmp15_ = _data19_->depstring;
			_tmp16_ = pamac_database_get_sync_satisfier ((PamacDatabase*) _tmp14_, _tmp15_);
			pamac_manager_window_display_package_details (self, _tmp16_);
		} else {
			GdkWindow* _tmp17_;
			GdkDisplay* _tmp18_;
			GdkCursor* _tmp19_;
			GdkCursor* _tmp20_;
			gchar* dep_name = NULL;
			PamacDatabaseGtk* _tmp21_;
			const gchar* _tmp22_;
			gchar* _tmp23_;
			PamacAURPackage* aur_pkg = NULL;
			PamacDatabaseGtk* _tmp24_;
			const gchar* _tmp25_;
			PamacAURPackage* _tmp26_;
			PamacAURPackage* _tmp27_;
			GdkWindow* _tmp28_;
			PamacAURPackage* _tmp29_;
			_tmp17_ = gtk_widget_get_window ((GtkWidget*) self);
			_tmp18_ = gdk_display_get_default ();
			_tmp19_ = gdk_cursor_new_for_display (_tmp18_, GDK_WATCH);
			_tmp20_ = _tmp19_;
			gdk_window_set_cursor (_tmp17_, _tmp20_);
			_g_object_unref0 (_tmp20_);
			_tmp21_ = self->priv->_database;
			_tmp22_ = _data19_->depstring;
			_tmp23_ = pamac_database_get_alpm_dep_name ((PamacDatabase*) _tmp21_, _tmp22_);
			dep_name = _tmp23_;
			_tmp24_ = self->priv->_database;
			_tmp25_ = dep_name;
			_tmp26_ = pamac_database_get_aur_pkg ((PamacDatabase*) _tmp24_, _tmp25_);
			_tmp27_ = _g_object_ref0 (_tmp26_);
			aur_pkg = _tmp27_;
			_tmp28_ = gtk_widget_get_window ((GtkWidget*) self);
			gdk_window_set_cursor (_tmp28_, NULL);
			_tmp29_ = aur_pkg;
			if (_tmp29_ != NULL) {
				PamacAURPackage* _tmp30_;
				_tmp30_ = aur_pkg;
				pamac_manager_window_display_aur_details (self, _tmp30_);
			}
			_g_object_unref0 (aur_pkg);
			_g_free0 (dep_name);
		}
	}
	block19_data_unref (_data19_);
	_data19_ = NULL;
}

static void
pamac_manager_window_get_pending_aur_pkgs_data_free (gpointer _data)
{
	PamacManagerWindowGetPendingAurPkgsData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacManagerWindowGetPendingAurPkgsData, _data_);
}

static void
pamac_manager_window_get_pending_aur_pkgs (PamacManagerWindow* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	PamacManagerWindowGetPendingAurPkgsData* _data_;
	PamacManagerWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (PamacManagerWindowGetPendingAurPkgsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_manager_window_get_pending_aur_pkgs_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	pamac_manager_window_get_pending_aur_pkgs_co (_data_);
}

static GPtrArray*
pamac_manager_window_get_pending_aur_pkgs_finish (PamacManagerWindow* self,
                                                  GAsyncResult* _res_)
{
	GPtrArray* result;
	PamacManagerWindowGetPendingAurPkgsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static gconstpointer
_vala_hash_set_next_value (GHashTableIter *self)
{
	void* vi = NULL;
	GHashTableIter* htp = NULL;
	void* _tmp0_;
	gconstpointer value = NULL;
	gconstpointer _tmp1_ = NULL;
	gconstpointer _tmp2_ = NULL;
	gboolean _tmp3_;
	gconstpointer result;
	vi = &(*self);
	_tmp0_ = vi;
	htp = _tmp0_;
	_tmp3_ = g_hash_table_iter_next (htp, (gpointer*) (&_tmp2_), (gpointer*) NULL);
	value = _tmp2_;
	if (_tmp3_) {
		gconstpointer _tmp4_;
		_tmp4_ = value;
		_tmp1_ = _tmp4_;
	} else {
		_tmp1_ = NULL;
	}
	result = _tmp1_;
	return result;
}

static void
pamac_manager_window_get_pending_aur_pkgs_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	PamacManagerWindowGetPendingAurPkgsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_manager_window_get_pending_aur_pkgs_co (_data_);
}

static gboolean
pamac_manager_window_get_pending_aur_pkgs_co (PamacManagerWindowGetPendingAurPkgsData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->aur_pkgs = _data_->_tmp0_;
	_data_->_tmp1_ = pamac_to_build;
	_data_->_tmp2_ = g_hash_table_size (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = g_ptr_array_new_full (_data_->_tmp3_, _g_free0_);
	_data_->to_build_array = _data_->_tmp4_;
	{
		_data_->_tmp5_ = pamac_to_build;
		memset (&_data_->_tmp6_, 0, sizeof (GHashTableIter));
		g_hash_table_iter_init (&_data_->_tmp6_, _data_->_tmp5_);
		_data_->_name_it = _data_->_tmp6_;
		while (TRUE) {
			_data_->_tmp7_ = _vala_hash_set_next_value (&_data_->_name_it);
			_data_->name = (const gchar*) _data_->_tmp7_;
			_data_->_tmp8_ = _data_->name;
			if (!(_data_->_tmp8_ != NULL)) {
				break;
			}
			_data_->_tmp9_ = _data_->to_build_array;
			_data_->_tmp10_ = _data_->name;
			_data_->_tmp11_ = g_strdup (_data_->_tmp10_);
			g_ptr_array_add (_data_->_tmp9_, _data_->_tmp11_);
		}
	}
	_data_->_tmp12_ = _data_->self->priv->_database;
	_data_->_tmp13_ = _data_->to_build_array;
	_data_->_state_ = 1;
	pamac_database_get_aur_pkgs_async ((PamacDatabase*) _data_->_tmp12_, _data_->_tmp13_, pamac_manager_window_get_pending_aur_pkgs_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp14_ = pamac_database_get_aur_pkgs_finish ((PamacDatabase*) _data_->_tmp12_, _data_->_res_);
	_data_->table = _data_->_tmp14_;
	_data_->_tmp15_ = _data_->table;
	g_hash_table_iter_init (&_data_->iter, _data_->_tmp15_);
	while (TRUE) {
		_data_->_tmp16_ = NULL;
		_data_->_tmp17_ = g_hash_table_iter_next (&_data_->iter, (gpointer*) NULL, (gpointer*) (&_data_->_tmp16_));
		_data_->aur_pkg = (PamacAURPackage*) _data_->_tmp16_;
		if (!_data_->_tmp17_) {
			break;
		}
		_data_->_tmp18_ = _data_->aur_pkg;
		if (_data_->_tmp18_ != NULL) {
			_data_->_tmp19_ = _data_->aur_pkgs;
			_data_->_tmp20_ = _data_->aur_pkg;
			g_ptr_array_add (_data_->_tmp19_, _data_->_tmp20_);
		}
	}
	_data_->result = _data_->aur_pkgs;
	_g_hash_table_unref0 (_data_->table);
	_g_ptr_array_unref0 (_data_->to_build_array);
	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_manager_window_get_pending_pkgs_data_free (gpointer _data)
{
	PamacManagerWindowGetPendingPkgsData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacManagerWindowGetPendingPkgsData, _data_);
}

static void
pamac_manager_window_get_pending_pkgs (PamacManagerWindow* self,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	PamacManagerWindowGetPendingPkgsData* _data_;
	PamacManagerWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (PamacManagerWindowGetPendingPkgsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_manager_window_get_pending_pkgs_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	pamac_manager_window_get_pending_pkgs_co (_data_);
}

static GPtrArray*
pamac_manager_window_get_pending_pkgs_finish (PamacManagerWindow* self,
                                              GAsyncResult* _res_)
{
	GPtrArray* result;
	PamacManagerWindowGetPendingPkgsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
pamac_manager_window_get_pending_pkgs_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	PamacManagerWindowGetPendingPkgsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_manager_window_get_pending_pkgs_co (_data_);
}

static gboolean
pamac_manager_window_get_pending_pkgs_co (PamacManagerWindowGetPendingPkgsData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->pkgs = _data_->_tmp0_;
	{
		_data_->_tmp1_ = pamac_to_install;
		memset (&_data_->_tmp2_, 0, sizeof (GHashTableIter));
		g_hash_table_iter_init (&_data_->_tmp2_, _data_->_tmp1_);
		_data_->_pkgname_it = _data_->_tmp2_;
		while (TRUE) {
			_data_->_tmp3_ = _vala_hash_set_next_value (&_data_->_pkgname_it);
			_data_->pkgname = (const gchar*) _data_->_tmp3_;
			_data_->_tmp4_ = _data_->pkgname;
			if (!(_data_->_tmp4_ != NULL)) {
				break;
			}
			_data_->_tmp5_ = _data_->self->priv->_database;
			_data_->_tmp6_ = _data_->pkgname;
			_data_->_tmp7_ = pamac_database_get_installed_pkg ((PamacDatabase*) _data_->_tmp5_, _data_->_tmp6_);
			_data_->_tmp8_ = _g_object_ref0 (_data_->_tmp7_);
			_data_->pkg = _data_->_tmp8_;
			_data_->_tmp9_ = _data_->pkg;
			if (_data_->_tmp9_ == NULL) {
				_data_->_tmp10_ = _data_->self->priv->_database;
				_data_->_tmp11_ = _data_->pkgname;
				_data_->_tmp12_ = pamac_database_get_sync_pkg ((PamacDatabase*) _data_->_tmp10_, _data_->_tmp11_);
				_data_->_tmp13_ = _g_object_ref0 (_data_->_tmp12_);
				_g_object_unref0 (_data_->pkg);
				_data_->pkg = _data_->_tmp13_;
			}
			_data_->_tmp14_ = _data_->pkg;
			if (_data_->_tmp14_ != NULL) {
				_data_->_tmp15_ = _data_->pkgs;
				_data_->_tmp16_ = _data_->pkg;
				g_ptr_array_add (_data_->_tmp15_, (PamacPackage*) _data_->_tmp16_);
			}
			_g_object_unref0 (_data_->pkg);
		}
	}
	{
		_data_->_tmp17_ = pamac_to_remove;
		memset (&_data_->_tmp18_, 0, sizeof (GHashTableIter));
		g_hash_table_iter_init (&_data_->_tmp18_, _data_->_tmp17_);
		_data_->_vala1__pkgname_it = _data_->_tmp18_;
		while (TRUE) {
			_data_->_tmp19_ = _vala_hash_set_next_value (&_data_->_vala1__pkgname_it);
			_data_->_vala1_pkgname = (const gchar*) _data_->_tmp19_;
			_data_->_tmp20_ = _data_->_vala1_pkgname;
			if (!(_data_->_tmp20_ != NULL)) {
				break;
			}
			_data_->_tmp21_ = _data_->self->priv->_database;
			_data_->_tmp22_ = _data_->_vala1_pkgname;
			_data_->_tmp23_ = pamac_database_get_installed_pkg ((PamacDatabase*) _data_->_tmp21_, _data_->_tmp22_);
			_data_->_tmp24_ = _g_object_ref0 (_data_->_tmp23_);
			_data_->_vala1_pkg = _data_->_tmp24_;
			_data_->_tmp25_ = _data_->_vala1_pkg;
			if (_data_->_tmp25_ != NULL) {
				_data_->_tmp26_ = _data_->pkgs;
				_data_->_tmp27_ = _data_->_vala1_pkg;
				g_ptr_array_add (_data_->_tmp26_, (PamacPackage*) _data_->_tmp27_);
			}
			_g_object_unref0 (_data_->_vala1_pkg);
		}
	}
	_data_->_tmp28_ = pamac_snap_to_install;
	g_hash_table_iter_init (&_data_->snap_iter, _data_->_tmp28_);
	while (TRUE) {
		_data_->_tmp29_ = NULL;
		_data_->_tmp30_ = g_hash_table_iter_next (&_data_->snap_iter, (gpointer*) NULL, (gpointer*) (&_data_->_tmp29_));
		_data_->snap_pkg = (PamacSnapPackage*) _data_->_tmp29_;
		if (!_data_->_tmp30_) {
			break;
		}
		_data_->_tmp31_ = _data_->pkgs;
		_data_->_tmp32_ = _data_->snap_pkg;
		g_ptr_array_add (_data_->_tmp31_, (PamacPackage*) _data_->_tmp32_);
	}
	_data_->_tmp33_ = pamac_snap_to_remove;
	g_hash_table_iter_init (&_data_->snap_iter, _data_->_tmp33_);
	while (TRUE) {
		_data_->_tmp34_ = NULL;
		_data_->_tmp35_ = g_hash_table_iter_next (&_data_->snap_iter, (gpointer*) NULL, (gpointer*) (&_data_->_tmp34_));
		_data_->snap_pkg = (PamacSnapPackage*) _data_->_tmp34_;
		if (!_data_->_tmp35_) {
			break;
		}
		_data_->_tmp36_ = _data_->pkgs;
		_data_->_tmp37_ = _data_->snap_pkg;
		g_ptr_array_add (_data_->_tmp36_, (PamacPackage*) _data_->_tmp37_);
	}
	_data_->_tmp38_ = pamac_flatpak_to_install;
	g_hash_table_iter_init (&_data_->flatpak_iter, _data_->_tmp38_);
	while (TRUE) {
		_data_->_tmp39_ = NULL;
		_data_->_tmp40_ = g_hash_table_iter_next (&_data_->flatpak_iter, (gpointer*) NULL, (gpointer*) (&_data_->_tmp39_));
		_data_->flatpak_pkg = (PamacFlatpakPackage*) _data_->_tmp39_;
		if (!_data_->_tmp40_) {
			break;
		}
		_data_->_tmp41_ = _data_->pkgs;
		_data_->_tmp42_ = _data_->flatpak_pkg;
		g_ptr_array_add (_data_->_tmp41_, (PamacPackage*) _data_->_tmp42_);
	}
	_data_->_tmp43_ = pamac_flatpak_to_remove;
	g_hash_table_iter_init (&_data_->flatpak_iter, _data_->_tmp43_);
	while (TRUE) {
		_data_->_tmp44_ = NULL;
		_data_->_tmp45_ = g_hash_table_iter_next (&_data_->flatpak_iter, (gpointer*) NULL, (gpointer*) (&_data_->_tmp44_));
		_data_->flatpak_pkg = (PamacFlatpakPackage*) _data_->_tmp44_;
		if (!_data_->_tmp45_) {
			break;
		}
		_data_->_tmp46_ = _data_->pkgs;
		_data_->_tmp47_ = _data_->flatpak_pkg;
		g_ptr_array_add (_data_->_tmp46_, (PamacPackage*) _data_->_tmp47_);
	}
	_data_->_tmp48_ = pamac_to_build;
	_data_->_tmp49_ = g_hash_table_size (_data_->_tmp48_);
	_data_->_tmp50_ = _data_->_tmp49_;
	if (_data_->_tmp50_ > ((guint) 0)) {
		_data_->_state_ = 1;
		pamac_manager_window_get_pending_aur_pkgs (_data_->self, pamac_manager_window_get_pending_pkgs_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp51_ = pamac_manager_window_get_pending_aur_pkgs_finish (_data_->self, _data_->_res_);
		_data_->aur_pkgs = _data_->_tmp51_;
		_data_->_tmp52_ = _data_->aur_pkgs;
		{
			_data_->aur_pkg_collection = _data_->_tmp52_;
			for (_data_->aur_pkg_index = 0; _data_->aur_pkg_index < _data_->aur_pkg_collection->len; _data_->aur_pkg_index = _data_->aur_pkg_index + 1) {
				_data_->aur_pkg = (PamacPackage*) g_ptr_array_index (_data_->aur_pkg_collection, _data_->aur_pkg_index);
				{
					_data_->_tmp53_ = _data_->pkgs;
					_data_->_tmp54_ = _data_->aur_pkg;
					g_ptr_array_add (_data_->_tmp53_, _data_->_tmp54_);
				}
			}
		}
		_g_ptr_array_unref0 (_data_->aur_pkgs);
	}
	_data_->result = _data_->pkgs;
	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_manager_window_search_all_pkgs_data_free (gpointer _data)
{
	PamacManagerWindowSearchAllPkgsData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacManagerWindowSearchAllPkgsData, _data_);
}

static void
pamac_manager_window_search_all_pkgs (PamacManagerWindow* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	PamacManagerWindowSearchAllPkgsData* _data_;
	PamacManagerWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (PamacManagerWindowSearchAllPkgsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_manager_window_search_all_pkgs_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	pamac_manager_window_search_all_pkgs_co (_data_);
}

static GPtrArray*
pamac_manager_window_search_all_pkgs_finish (PamacManagerWindow* self,
                                             GAsyncResult* _res_)
{
	GPtrArray* result;
	PamacManagerWindowSearchAllPkgsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static Block20Data*
block20_data_ref (Block20Data* _data20_)
{
	g_atomic_int_inc (&_data20_->_ref_count_);
	return _data20_;
}

static void
block20_data_unref (void * _userdata_)
{
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data20_->self;
		_g_ptr_array_unref0 (_data20_->flatpaks);
		_g_ptr_array_unref0 (_data20_->snaps);
		_g_ptr_array_unref0 (_data20_->aur_pkgs);
		_g_ptr_array_unref0 (_data20_->pkgs);
		_g_object_unref0 (self);
		g_slice_free (Block20Data, _data20_);
	}
}

static void
__lambda38_ (Block20Data* _data20_,
             GObject* obj,
             GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data20_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_search_pkgs_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data20_->pkgs);
	_data20_->pkgs = _tmp1_;
	pamac_manager_window_search_all_pkgs_co (_data20_->_async_data_);
}

static void
___lambda38__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda38_ (self, source_object, res);
	block20_data_unref (self);
}

static void
___lambda39_ (Block20Data* _data20_,
              GObject* obj,
              GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data20_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_search_aur_pkgs_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data20_->aur_pkgs);
	_data20_->aur_pkgs = _tmp1_;
	pamac_manager_window_search_all_pkgs_co (_data20_->_async_data_);
}

static void
____lambda39__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda39_ (self, source_object, res);
	block20_data_unref (self);
}

static void
___lambda40_ (Block20Data* _data20_,
              GObject* obj,
              GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data20_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_search_snaps_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data20_->snaps);
	_data20_->snaps = _tmp1_;
	pamac_manager_window_search_all_pkgs_co (_data20_->_async_data_);
}

static void
____lambda40__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda40_ (self, source_object, res);
	block20_data_unref (self);
}

static void
___lambda41_ (Block20Data* _data20_,
              GObject* obj,
              GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data20_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_search_flatpaks_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data20_->flatpaks);
	_data20_->flatpaks = _tmp1_;
	pamac_manager_window_search_all_pkgs_co (_data20_->_async_data_);
}

static void
____lambda41__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda41_ (self, source_object, res);
	block20_data_unref (self);
}

static gboolean
pamac_manager_window_search_all_pkgs_co (PamacManagerWindowSearchAllPkgsData* _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;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data20_ = g_slice_new0 (Block20Data);
	_data_->_data20_->_ref_count_ = 1;
	_data_->_data20_->self = g_object_ref (_data_->self);
	_data_->_data20_->_async_data_ = _data_;
	_data_->_tmp0_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data20_->pkgs = _data_->_tmp0_;
	_data_->_tmp1_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data20_->aur_pkgs = _data_->_tmp1_;
	_data_->_tmp2_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data20_->snaps = _data_->_tmp2_;
	_data_->_tmp3_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data20_->flatpaks = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->self->priv->_database;
	_data_->_tmp5_ = pamac_search_string;
	pamac_database_search_pkgs_async ((PamacDatabase*) _data_->_tmp4_, _data_->_tmp5_, ___lambda38__gasync_ready_callback, block20_data_ref (_data_->_data20_));
	_data_->_tmp6_ = _data_->self->priv->_enable_aur;
	if (_data_->_tmp6_) {
		_data_->_tmp7_ = _data_->self->priv->_database;
		_data_->_tmp8_ = pamac_search_string;
		pamac_database_search_aur_pkgs_async ((PamacDatabase*) _data_->_tmp7_, _data_->_tmp8_, ____lambda39__gasync_ready_callback, block20_data_ref (_data_->_data20_));
	}
	_data_->_tmp9_ = _data_->self->priv->_database;
	_data_->_tmp10_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = pamac_config_get_enable_snap (_data_->_tmp11_);
	_data_->_tmp13_ = _data_->_tmp12_;
	if (_data_->_tmp13_) {
		_data_->_tmp14_ = _data_->self->priv->_database;
		_data_->_tmp15_ = pamac_search_string;
		pamac_database_search_snaps_async ((PamacDatabase*) _data_->_tmp14_, _data_->_tmp15_, ____lambda40__gasync_ready_callback, block20_data_ref (_data_->_data20_));
	}
	_data_->_tmp16_ = _data_->self->priv->_database;
	_data_->_tmp17_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = pamac_config_get_enable_flatpak (_data_->_tmp18_);
	_data_->_tmp20_ = _data_->_tmp19_;
	if (_data_->_tmp20_) {
		_data_->_tmp21_ = _data_->self->priv->_database;
		_data_->_tmp22_ = pamac_search_string;
		pamac_database_search_flatpaks_async ((PamacDatabase*) _data_->_tmp21_, _data_->_tmp22_, ____lambda41__gasync_ready_callback, block20_data_ref (_data_->_data20_));
	}
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp23_ = _data_->self->priv->_enable_aur;
	if (_data_->_tmp23_) {
		_data_->_state_ = 2;
		return FALSE;
		_state_2:
		;
	}
	_data_->_tmp24_ = _data_->self->priv->_database;
	_data_->_tmp25_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp24_);
	_data_->_tmp26_ = _data_->_tmp25_;
	_data_->_tmp27_ = pamac_config_get_enable_snap (_data_->_tmp26_);
	_data_->_tmp28_ = _data_->_tmp27_;
	if (_data_->_tmp28_) {
		_data_->_state_ = 3;
		return FALSE;
		_state_3:
		;
	}
	_data_->_tmp29_ = _data_->self->priv->_database;
	_data_->_tmp30_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp29_);
	_data_->_tmp31_ = _data_->_tmp30_;
	_data_->_tmp32_ = pamac_config_get_enable_flatpak (_data_->_tmp31_);
	_data_->_tmp33_ = _data_->_tmp32_;
	if (_data_->_tmp33_) {
		_data_->_state_ = 4;
		return FALSE;
		_state_4:
		;
	}
	_data_->_tmp34_ = _data_->_data20_->aur_pkgs;
	{
		_data_->pkg_collection = _data_->_tmp34_;
		for (_data_->pkg_index = 0; _data_->pkg_index < _data_->pkg_collection->len; _data_->pkg_index = _data_->pkg_index + 1) {
			_data_->pkg = (PamacAURPackage*) g_ptr_array_index (_data_->pkg_collection, _data_->pkg_index);
			{
				_data_->_tmp35_ = _data_->pkg;
				_data_->_tmp36_ = pamac_package_get_installed_version ((PamacPackage*) _data_->_tmp35_);
				_data_->_tmp37_ = _data_->_tmp36_;
				if (_data_->_tmp37_ == NULL) {
					_data_->_tmp38_ = _data_->_data20_->pkgs;
					_data_->_tmp39_ = _data_->pkg;
					g_ptr_array_add (_data_->_tmp38_, (PamacPackage*) _data_->_tmp39_);
				}
			}
		}
	}
	_data_->_tmp40_ = _data_->_data20_->pkgs;
	_data_->_tmp41_ = _data_->_data20_->snaps;
	g_ptr_array_extend (_data_->_tmp40_, _data_->_tmp41_, NULL, NULL);
	_data_->_tmp42_ = _data_->_data20_->pkgs;
	_data_->_tmp43_ = _data_->_data20_->flatpaks;
	g_ptr_array_extend (_data_->_tmp42_, _data_->_tmp43_, NULL, NULL);
	_data_->_tmp44_ = _data_->_data20_->pkgs;
	_data_->_tmp45_ = _g_ptr_array_ref0 (_data_->_tmp44_);
	_data_->result = _data_->_tmp45_;
	block20_data_unref (_data_->_data20_);
	_data_->_data20_ = 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_manager_window_on_remove_all_button_clicked (PamacManagerWindow* self)
{
	GPtrArray* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_packages_list;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp0_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacPackage* pkg = NULL;
			pkg = (PamacPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				gboolean _tmp1_ = FALSE;
				gboolean _tmp2_ = FALSE;
				PamacTransactionGtk* _tmp3_;
				PamacPackage* _tmp4_;
				const gchar* _tmp5_;
				const gchar* _tmp6_;
				_tmp3_ = self->transaction;
				_tmp4_ = pkg;
				_tmp5_ = pamac_package_get_id (_tmp4_);
				_tmp6_ = _tmp5_;
				if (!pamac_transaction_gtk_transaction_summary_contains (_tmp3_, _tmp6_)) {
					PamacPackage* _tmp7_;
					const gchar* _tmp8_;
					const gchar* _tmp9_;
					_tmp7_ = pkg;
					_tmp8_ = pamac_package_get_installed_version (_tmp7_);
					_tmp9_ = _tmp8_;
					_tmp2_ = _tmp9_ != NULL;
				} else {
					_tmp2_ = FALSE;
				}
				if (_tmp2_) {
					PamacDatabaseGtk* _tmp10_;
					PamacPackage* _tmp11_;
					const gchar* _tmp12_;
					const gchar* _tmp13_;
					_tmp10_ = self->priv->_database;
					_tmp11_ = pkg;
					_tmp12_ = pamac_package_get_name (_tmp11_);
					_tmp13_ = _tmp12_;
					_tmp1_ = !pamac_database_should_hold ((PamacDatabase*) _tmp10_, _tmp13_);
				} else {
					_tmp1_ = FALSE;
				}
				if (_tmp1_) {
					GHashTable* _tmp14_;
					PamacPackage* _tmp15_;
					const gchar* _tmp16_;
					const gchar* _tmp17_;
					GHashTable* _tmp18_;
					PamacPackage* _tmp19_;
					const gchar* _tmp20_;
					const gchar* _tmp21_;
					gchar* _tmp22_;
					_tmp14_ = pamac_to_install;
					_tmp15_ = pkg;
					_tmp16_ = pamac_package_get_name (_tmp15_);
					_tmp17_ = _tmp16_;
					g_hash_table_remove (_tmp14_, _tmp17_);
					_tmp18_ = pamac_to_remove;
					_tmp19_ = pkg;
					_tmp20_ = pamac_package_get_name (_tmp19_);
					_tmp21_ = _tmp20_;
					_tmp22_ = g_strdup (_tmp21_);
					g_hash_table_add (_tmp18_, _tmp22_);
				}
			}
		}
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
_pamac_manager_window_on_remove_all_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	pamac_manager_window_on_remove_all_button_clicked ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_install_all_button_clicked (PamacManagerWindow* self)
{
	GPtrArray* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_packages_list;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp0_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacPackage* pkg = NULL;
			pkg = (PamacPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				gboolean _tmp1_ = FALSE;
				PamacTransactionGtk* _tmp2_;
				PamacPackage* _tmp3_;
				const gchar* _tmp4_;
				const gchar* _tmp5_;
				_tmp2_ = self->transaction;
				_tmp3_ = pkg;
				_tmp4_ = pamac_package_get_id (_tmp3_);
				_tmp5_ = _tmp4_;
				if (!pamac_transaction_gtk_transaction_summary_contains (_tmp2_, _tmp5_)) {
					PamacPackage* _tmp6_;
					const gchar* _tmp7_;
					const gchar* _tmp8_;
					_tmp6_ = pkg;
					_tmp7_ = pamac_package_get_installed_version (_tmp6_);
					_tmp8_ = _tmp7_;
					_tmp1_ = _tmp8_ == NULL;
				} else {
					_tmp1_ = FALSE;
				}
				if (_tmp1_) {
					GHashTable* _tmp9_;
					PamacPackage* _tmp10_;
					const gchar* _tmp11_;
					const gchar* _tmp12_;
					gchar* _tmp13_;
					_tmp9_ = pamac_to_install;
					_tmp10_ = pkg;
					_tmp11_ = pamac_package_get_name (_tmp10_);
					_tmp12_ = _tmp11_;
					_tmp13_ = g_strdup (_tmp12_);
					g_hash_table_add (_tmp9_, _tmp13_);
				}
			}
		}
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
_pamac_manager_window_on_install_all_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self)
{
	pamac_manager_window_on_install_all_button_clicked ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_ignore_all_button_clicked (PamacManagerWindow* self)
{
	GPtrArray* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_packages_list;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp0_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacPackage* pkg = NULL;
			pkg = (PamacPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GHashTable* _tmp1_;
				PamacPackage* _tmp2_;
				const gchar* _tmp3_;
				const gchar* _tmp4_;
				GHashTable* _tmp5_;
				PamacPackage* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				gchar* _tmp9_;
				_tmp1_ = pamac_to_update;
				_tmp2_ = pkg;
				_tmp3_ = pamac_package_get_name (_tmp2_);
				_tmp4_ = _tmp3_;
				g_hash_table_remove (_tmp1_, _tmp4_);
				_tmp5_ = pamac_temporary_ignorepkgs;
				_tmp6_ = pkg;
				_tmp7_ = pamac_package_get_name (_tmp6_);
				_tmp8_ = _tmp7_;
				_tmp9_ = g_strdup (_tmp8_);
				g_hash_table_add (_tmp5_, _tmp9_);
			}
		}
	}
	pamac_manager_window_refresh_listbox_buttons (self);
	pamac_manager_window_set_pending_operations (self);
}

static void
_pamac_manager_window_on_ignore_all_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	pamac_manager_window_on_ignore_all_button_clicked ((PamacManagerWindow*) self);
}

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

static void
pamac_manager_window_on_search_entry_activated (PamacManagerWindow* self)
{
	gchar* tmp_search_string = NULL;
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->search_entry;
	_tmp1_ = gtk_entry_get_text ((GtkEntry*) _tmp0_);
	_tmp2_ = string_strip (_tmp1_);
	tmp_search_string = _tmp2_;
	_tmp3_ = tmp_search_string;
	if (g_utf8_strlen (_tmp3_, (gssize) -1) > 1) {
		GdkWindow* _tmp4_;
		GdkDisplay* _tmp5_;
		GdkCursor* _tmp6_;
		GdkCursor* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		GtkStack* _tmp10_;
		_tmp4_ = gtk_widget_get_window ((GtkWidget*) self);
		_tmp5_ = gdk_display_get_default ();
		_tmp6_ = gdk_cursor_new_for_display (_tmp5_, GDK_WATCH);
		_tmp7_ = _tmp6_;
		gdk_window_set_cursor (_tmp4_, _tmp7_);
		_g_object_unref0 (_tmp7_);
		_tmp8_ = tmp_search_string;
		_tmp9_ = g_utf8_strdown (_tmp8_, (gssize) -1);
		_g_free0 (pamac_search_string);
		pamac_search_string = _tmp9_;
		_tmp10_ = self->view_stack;
		gtk_stack_set_visible_child_name (_tmp10_, "search");
		pamac_manager_window_refresh_packages_list (self);
	}
	_g_free0 (tmp_search_string);
}

static void
_pamac_manager_window_on_search_entry_activated_gtk_entry_activate (GtkEntry* _sender,
                                                                    gpointer self)
{
	pamac_manager_window_on_search_entry_activated ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_search_entry_changed (PamacManagerWindow* self)
{
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gboolean _tmp6_ = FALSE;
	GtkStack* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->main_stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (_tmp2_, "browse") != 0) {
		return;
	}
	_tmp3_ = self->view_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "updates") == 0) {
		return;
	}
	_tmp7_ = self->view_stack;
	_tmp8_ = gtk_stack_get_visible_child_name (_tmp7_);
	_tmp9_ = _tmp8_;
	if (g_strcmp0 (_tmp9_, "browse") == 0) {
		_tmp6_ = TRUE;
	} else {
		GtkStack* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp10_ = self->view_stack;
		_tmp11_ = gtk_stack_get_visible_child_name (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp6_ = g_strcmp0 (_tmp12_, "installed") == 0;
	}
	if (_tmp6_) {
		GtkButton* _tmp13_;
		_tmp13_ = self->search_button;
		gtk_button_clicked (_tmp13_);
	}
}

static void
_pamac_manager_window_on_search_entry_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                    gpointer self)
{
	pamac_manager_window_on_search_entry_changed ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_sortby_combobox_changed (PamacManagerWindow* self)
{
	gint index = 0;
	GtkComboBoxText* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->sortby_combobox;
	_tmp1_ = gtk_combo_box_get_active ((GtkComboBox*) _tmp0_);
	_tmp2_ = _tmp1_;
	index = _tmp2_;
	switch (index) {
		case 0:
		case 4:
		{
			GtkStack* _tmp3_;
			const gchar* _tmp4_;
			const gchar* _tmp5_;
			_tmp3_ = self->view_stack;
			_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
			_tmp5_ = _tmp4_;
			if (g_strcmp0 (_tmp5_, "search") == 0) {
				GtkListBoxRow* row = NULL;
				GtkListBox* _tmp6_;
				GtkListBoxRow* _tmp7_;
				PamacSimpleRow* simple_row = NULL;
				GtkListBoxRow* _tmp8_;
				PamacSimpleRow* _tmp9_;
				gboolean _tmp10_ = FALSE;
				PamacSimpleRow* _tmp11_;
				_tmp6_ = self->priv->search_listbox;
				_tmp7_ = gtk_list_box_get_selected_row (_tmp6_);
				row = _tmp7_;
				_tmp8_ = row;
				_tmp9_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (_tmp8_) ? ((PamacSimpleRow*) _tmp8_) : NULL);
				simple_row = _tmp9_;
				_tmp11_ = simple_row;
				if (_tmp11_ != NULL) {
					PamacSimpleRow* _tmp12_;
					const gchar* _tmp13_;
					const gchar* _tmp14_;
					_tmp12_ = simple_row;
					_tmp13_ = pamac_simple_row_get_title (_tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = g_strcmp0 (_tmp14_, g_dgettext (NULL, "AUR")) == 0;
				} else {
					_tmp10_ = FALSE;
				}
				if (_tmp10_) {
					GPtrArray* _tmp15_;
					_tmp15_ = self->priv->current_packages_list;
					pamac_manager_window_populate_aur_list (self, _tmp15_);
				}
				_g_object_unref0 (simple_row);
			} else {
				GtkStack* _tmp16_;
				const gchar* _tmp17_;
				const gchar* _tmp18_;
				_tmp16_ = self->view_stack;
				_tmp17_ = gtk_stack_get_visible_child_name (_tmp16_);
				_tmp18_ = _tmp17_;
				if (g_strcmp0 (_tmp18_, "updates") == 0) {
					GtkListBoxRow* row = NULL;
					GtkListBox* _tmp19_;
					GtkListBoxRow* _tmp20_;
					PamacSimpleRow* simple_row = NULL;
					GtkListBoxRow* _tmp21_;
					PamacSimpleRow* _tmp22_;
					gboolean _tmp23_ = FALSE;
					PamacSimpleRow* _tmp24_;
					_tmp19_ = self->priv->updates_listbox;
					_tmp20_ = gtk_list_box_get_selected_row (_tmp19_);
					row = _tmp20_;
					_tmp21_ = row;
					_tmp22_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (_tmp21_) ? ((PamacSimpleRow*) _tmp21_) : NULL);
					simple_row = _tmp22_;
					_tmp24_ = simple_row;
					if (_tmp24_ != NULL) {
						PamacSimpleRow* _tmp25_;
						const gchar* _tmp26_;
						const gchar* _tmp27_;
						_tmp25_ = simple_row;
						_tmp26_ = pamac_simple_row_get_title (_tmp25_);
						_tmp27_ = _tmp26_;
						_tmp23_ = g_strcmp0 (_tmp27_, g_dgettext (NULL, "AUR")) == 0;
					} else {
						_tmp23_ = FALSE;
					}
					if (_tmp23_) {
						GPtrArray* _tmp28_;
						_tmp28_ = self->priv->current_packages_list;
						pamac_manager_window_populate_aur_list (self, _tmp28_);
					}
					_g_object_unref0 (simple_row);
				} else {
					GPtrArray* _tmp29_;
					_tmp29_ = self->priv->current_packages_list;
					pamac_manager_window_populate_packages_list (self, _tmp29_);
				}
			}
			break;
		}
		case 1:
		case 2:
		case 3:
		{
			GPtrArray* _tmp30_;
			_tmp30_ = self->priv->current_packages_list;
			pamac_manager_window_populate_packages_list (self, _tmp30_);
			break;
		}
		default:
		{
			break;
		}
	}
}

static void
_pamac_manager_window_on_sortby_combobox_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                        gpointer self)
{
	pamac_manager_window_on_sortby_combobox_changed ((PamacManagerWindow*) self);
}

static void
___lambda82_ (PamacManagerWindow* self,
              GObject* obj,
              GAsyncResult* res)
{
	GPtrArray* pkgs = NULL;
	GPtrArray* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkStack* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (res != NULL);
	_tmp0_ = pamac_manager_window_get_pending_pkgs_finish (self, res);
	pkgs = _tmp0_;
	_tmp2_ = self->view_stack;
	_tmp3_ = gtk_stack_get_visible_child_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "browse") == 0) {
		const gchar* _tmp5_;
		_tmp5_ = self->priv->current_packages_list_name;
		_tmp1_ = g_strcmp0 (_tmp5_, "Pending") == 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GPtrArray* _tmp6_;
		_tmp6_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp6_);
	} else {
		GdkWindow* _tmp7_;
		_tmp7_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp7_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
____lambda82__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda82_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
pamac_manager_window_on_filters_listbox_row_activated (PamacManagerWindow* self,
                                                       GtkListBoxRow* row)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	self->priv->current_filters_index = gtk_list_box_row_get_index (row);
	switch (self->priv->current_filters_index) {
		case 0:
		{
			GtkStack* _tmp0_;
			_tmp0_ = self->priv->browse_stack;
			gtk_stack_set_visible_child_name (_tmp0_, "categories");
			break;
		}
		case 1:
		{
			GtkStack* _tmp1_;
			_tmp1_ = self->priv->browse_stack;
			gtk_stack_set_visible_child_name (_tmp1_, "groups");
			break;
		}
		case 2:
		{
			GtkStack* _tmp2_;
			_tmp2_ = self->priv->browse_stack;
			gtk_stack_set_visible_child_name (_tmp2_, "repos");
			break;
		}
		case 4:
		{
			GdkWindow* _tmp3_;
			GdkDisplay* _tmp4_;
			GdkCursor* _tmp5_;
			GdkCursor* _tmp6_;
			gchar* _tmp7_;
			GtkButton* _tmp8_;
			GtkButton* _tmp9_;
			GtkButton* _tmp10_;
			gboolean _tmp11_ = FALSE;
			HdyFlap* _tmp12_;
			gboolean _tmp13_;
			gboolean _tmp14_;
			_tmp3_ = gtk_widget_get_window ((GtkWidget*) self);
			_tmp4_ = gdk_display_get_default ();
			_tmp5_ = gdk_cursor_new_for_display (_tmp4_, GDK_WATCH);
			_tmp6_ = _tmp5_;
			gdk_window_set_cursor (_tmp3_, _tmp6_);
			_g_object_unref0 (_tmp6_);
			_tmp7_ = g_strdup ("Pending");
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp7_;
			pamac_manager_window_get_pending_pkgs (self, ____lambda82__gasync_ready_callback, g_object_ref (self));
			_tmp8_ = self->priv->install_all_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp8_, FALSE);
			_tmp9_ = self->priv->remove_all_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp9_, FALSE);
			_tmp10_ = self->priv->ignore_all_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp10_, FALSE);
			_tmp12_ = self->browse_flap;
			_tmp13_ = hdy_flap_get_folded (_tmp12_);
			_tmp14_ = _tmp13_;
			if (_tmp14_) {
				HdyFlap* _tmp15_;
				gboolean _tmp16_;
				gboolean _tmp17_;
				_tmp15_ = self->browse_flap;
				_tmp16_ = hdy_flap_get_reveal_flap (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp11_ = _tmp17_;
			} else {
				_tmp11_ = FALSE;
			}
			if (_tmp11_) {
				HdyFlap* _tmp18_;
				_tmp18_ = self->browse_flap;
				hdy_flap_set_reveal_flap (_tmp18_, FALSE);
			}
			break;
		}
		default:
		{
			break;
		}
	}
}

static void
_pamac_manager_window_on_filters_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                   GtkListBoxRow* row,
                                                                                   gpointer self)
{
	pamac_manager_window_on_filters_listbox_row_activated ((PamacManagerWindow*) self, row);
}

static void
pamac_manager_window_on_browse_stack_visible_child_changed (PamacManagerWindow* self)
{
	HdyFlap* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GQuark _tmp8_ = 0U;
	static GQuark _tmp7_label0 = 0;
	static GQuark _tmp7_label1 = 0;
	static GQuark _tmp7_label2 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->browse_flap;
	_tmp1_ = hdy_flap_get_folded (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = self->priv->browse_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp8_ = (NULL == _tmp6_) ? 0 : g_quark_from_string (_tmp6_);
	if (_tmp8_ == ((0 != _tmp7_label0) ? _tmp7_label0 : (_tmp7_label0 = g_quark_from_static_string ("categories")))) {
		switch (0) {
			default:
			{
				GtkListBoxRow* selected_row = NULL;
				GtkListBox* _tmp9_;
				GtkListBoxRow* _tmp10_;
				GtkListBoxRow* _tmp11_;
				gboolean _tmp12_;
				gboolean _tmp13_;
				GtkListBox* _tmp17_;
				GtkListBoxRow* _tmp18_;
				_tmp9_ = self->priv->categories_listbox;
				_tmp10_ = gtk_list_box_get_selected_row (_tmp9_);
				selected_row = _tmp10_;
				_tmp11_ = selected_row;
				_tmp12_ = gtk_widget_get_visible ((GtkWidget*) _tmp11_);
				_tmp13_ = _tmp12_;
				if (!_tmp13_) {
					GtkListBox* _tmp14_;
					GtkListBox* _tmp15_;
					GtkListBoxRow* _tmp16_;
					_tmp14_ = self->priv->categories_listbox;
					_tmp15_ = self->priv->categories_listbox;
					_tmp16_ = gtk_list_box_get_row_at_index (_tmp15_, 1);
					gtk_list_box_select_row (_tmp14_, _tmp16_);
				}
				_tmp17_ = self->priv->categories_listbox;
				_tmp18_ = gtk_list_box_get_selected_row (_tmp17_);
				pamac_manager_window_on_categories_listbox_row_activated (self, _tmp18_);
				break;
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label1) ? _tmp7_label1 : (_tmp7_label1 = g_quark_from_static_string ("groups")))) {
		switch (0) {
			default:
			{
				GtkListBox* _tmp19_;
				GtkListBoxRow* _tmp20_;
				_tmp19_ = self->priv->groups_listbox;
				_tmp20_ = gtk_list_box_get_selected_row (_tmp19_);
				pamac_manager_window_on_groups_listbox_row_activated (self, _tmp20_);
				break;
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label2) ? _tmp7_label2 : (_tmp7_label2 = g_quark_from_static_string ("repos")))) {
		switch (0) {
			default:
			{
				GtkListBox* _tmp21_;
				GtkListBoxRow* _tmp22_;
				_tmp21_ = self->priv->repos_listbox;
				_tmp22_ = gtk_list_box_get_selected_row (_tmp21_);
				pamac_manager_window_on_repos_listbox_row_activated (self, _tmp22_);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				break;
			}
		}
	}
}

static Block21Data*
block21_data_ref (Block21Data* _data21_)
{
	g_atomic_int_inc (&_data21_->_ref_count_);
	return _data21_;
}

static void
block21_data_unref (void * _userdata_)
{
	Block21Data* _data21_;
	_data21_ = (Block21Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data21_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data21_->self;
		_g_free0 (_data21_->category);
		_g_object_unref0 (self);
		g_slice_free (Block21Data, _data21_);
	}
}

static void
__lambda14_ (Block21Data* _data21_,
             GObject* obj,
             GAsyncResult* res)
{
	PamacManagerWindow* self;
	GPtrArray* pkgs = NULL;
	GPtrArray* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkStack* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	self = _data21_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = pamac_manager_window_get_category_pkgs_finish (self, res);
	pkgs = _tmp0_;
	_tmp2_ = self->view_stack;
	_tmp3_ = gtk_stack_get_visible_child_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "browse") == 0) {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp5_ = self->priv->current_packages_list_name;
		_tmp6_ = _data21_->category;
		_tmp7_ = g_strdup_printf ("category_%s", _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp1_ = g_strcmp0 (_tmp5_, _tmp8_) == 0;
		_g_free0 (_tmp8_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		HdyViewSwitcherTitle* _tmp9_;
		const gchar* _tmp10_;
		GPtrArray* _tmp11_;
		_tmp9_ = self->view_stack_switcher;
		_tmp10_ = _data21_->category_name;
		hdy_view_switcher_title_set_title (_tmp9_, _tmp10_);
		_tmp11_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp11_);
	} else {
		GdkWindow* _tmp12_;
		_tmp12_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp12_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
___lambda14__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda14_ (self, source_object, res);
	block21_data_unref (self);
}

static void
pamac_manager_window_on_categories_listbox_row_activated (PamacManagerWindow* self,
                                                          GtkListBoxRow* row)
{
	Block21Data* _data21_;
	PamacSimpleRow* simple_row = NULL;
	PamacSimpleRow* _tmp2_;
	PamacSimpleRow* _tmp3_;
	PamacSimpleRow* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	GdkWindow* _tmp28_;
	GdkDisplay* _tmp29_;
	GdkCursor* _tmp30_;
	GdkCursor* _tmp31_;
	const gchar* _tmp32_;
	gchar* _tmp33_;
	const gchar* _tmp34_;
	GtkButton* _tmp35_;
	GtkButton* _tmp36_;
	GtkButton* _tmp37_;
	gboolean _tmp38_ = FALSE;
	HdyFlap* _tmp39_;
	gboolean _tmp40_;
	gboolean _tmp41_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_data21_ = g_slice_new0 (Block21Data);
	_data21_->_ref_count_ = 1;
	_data21_->self = g_object_ref (self);
	if (PAMAC_IS_BACK_ROW (row)) {
		GtkListBox* _tmp0_;
		GtkStack* _tmp1_;
		_tmp0_ = self->priv->filters_listbox;
		gtk_list_box_select_row (_tmp0_, NULL);
		_tmp1_ = self->priv->browse_stack;
		gtk_stack_set_visible_child_name (_tmp1_, "filters");
		block21_data_unref (_data21_);
		_data21_ = NULL;
		return;
	}
	_tmp2_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (row) ? ((PamacSimpleRow*) row) : NULL);
	simple_row = _tmp2_;
	_tmp3_ = simple_row;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (simple_row);
		block21_data_unref (_data21_);
		_data21_ = NULL;
		return;
	}
	_tmp4_ = simple_row;
	_tmp5_ = pamac_simple_row_get_title (_tmp4_);
	_tmp6_ = _tmp5_;
	_data21_->category_name = _tmp6_;
	_tmp7_ = g_strdup ("");
	_data21_->category = _tmp7_;
	_tmp8_ = _data21_->category_name;
	if (g_strcmp0 (_tmp8_, g_dgettext (NULL, "Featured")) == 0) {
		gchar* _tmp9_;
		_tmp9_ = g_strdup ("Featured");
		_g_free0 (_data21_->category);
		_data21_->category = _tmp9_;
	} else {
		const gchar* _tmp10_;
		_tmp10_ = _data21_->category_name;
		if (g_strcmp0 (_tmp10_, g_dgettext (NULL, "Photo & Video")) == 0) {
			gchar* _tmp11_;
			_tmp11_ = g_strdup ("Photo & Video");
			_g_free0 (_data21_->category);
			_data21_->category = _tmp11_;
		} else {
			const gchar* _tmp12_;
			_tmp12_ = _data21_->category_name;
			if (g_strcmp0 (_tmp12_, g_dgettext (NULL, "Music & Audio")) == 0) {
				gchar* _tmp13_;
				_tmp13_ = g_strdup ("Music & Audio");
				_g_free0 (_data21_->category);
				_data21_->category = _tmp13_;
			} else {
				const gchar* _tmp14_;
				_tmp14_ = _data21_->category_name;
				if (g_strcmp0 (_tmp14_, g_dgettext (NULL, "Productivity")) == 0) {
					gchar* _tmp15_;
					_tmp15_ = g_strdup ("Productivity");
					_g_free0 (_data21_->category);
					_data21_->category = _tmp15_;
				} else {
					const gchar* _tmp16_;
					_tmp16_ = _data21_->category_name;
					if (g_strcmp0 (_tmp16_, g_dgettext (NULL, "Communication & News")) == 0) {
						gchar* _tmp17_;
						_tmp17_ = g_strdup ("Communication & News");
						_g_free0 (_data21_->category);
						_data21_->category = _tmp17_;
					} else {
						const gchar* _tmp18_;
						_tmp18_ = _data21_->category_name;
						if (g_strcmp0 (_tmp18_, g_dgettext (NULL, "Education & Science")) == 0) {
							gchar* _tmp19_;
							_tmp19_ = g_strdup ("Education & Science");
							_g_free0 (_data21_->category);
							_data21_->category = _tmp19_;
						} else {
							const gchar* _tmp20_;
							_tmp20_ = _data21_->category_name;
							if (g_strcmp0 (_tmp20_, g_dgettext (NULL, "Games")) == 0) {
								gchar* _tmp21_;
								_tmp21_ = g_strdup ("Games");
								_g_free0 (_data21_->category);
								_data21_->category = _tmp21_;
							} else {
								const gchar* _tmp22_;
								_tmp22_ = _data21_->category_name;
								if (g_strcmp0 (_tmp22_, g_dgettext (NULL, "Utilities")) == 0) {
									gchar* _tmp23_;
									_tmp23_ = g_strdup ("Utilities");
									_g_free0 (_data21_->category);
									_data21_->category = _tmp23_;
								} else {
									const gchar* _tmp24_;
									_tmp24_ = _data21_->category_name;
									if (g_strcmp0 (_tmp24_, g_dgettext (NULL, "Development")) == 0) {
										gchar* _tmp25_;
										_tmp25_ = g_strdup ("Development");
										_g_free0 (_data21_->category);
										_data21_->category = _tmp25_;
									} else {
										const gchar* _tmp26_;
										_tmp26_ = _data21_->category_name;
										if (g_strcmp0 (_tmp26_, g_dgettext (NULL, "Pending")) == 0) {
											gchar* _tmp27_;
											_tmp27_ = g_strdup ("Pending");
											_g_free0 (_data21_->category);
											_data21_->category = _tmp27_;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp28_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp29_ = gdk_display_get_default ();
	_tmp30_ = gdk_cursor_new_for_display (_tmp29_, GDK_WATCH);
	_tmp31_ = _tmp30_;
	gdk_window_set_cursor (_tmp28_, _tmp31_);
	_g_object_unref0 (_tmp31_);
	_tmp32_ = _data21_->category;
	_tmp33_ = g_strdup_printf ("category_%s", _tmp32_);
	_g_free0 (self->priv->current_packages_list_name);
	self->priv->current_packages_list_name = _tmp33_;
	_tmp34_ = _data21_->category;
	pamac_manager_window_get_category_pkgs (self, _tmp34_, ___lambda14__gasync_ready_callback, block21_data_ref (_data21_));
	_tmp35_ = self->priv->install_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp35_, FALSE);
	_tmp36_ = self->priv->remove_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp36_, FALSE);
	_tmp37_ = self->priv->ignore_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp37_, FALSE);
	_tmp39_ = self->browse_flap;
	_tmp40_ = hdy_flap_get_folded (_tmp39_);
	_tmp41_ = _tmp40_;
	if (_tmp41_) {
		HdyFlap* _tmp42_;
		gboolean _tmp43_;
		gboolean _tmp44_;
		_tmp42_ = self->browse_flap;
		_tmp43_ = hdy_flap_get_reveal_flap (_tmp42_);
		_tmp44_ = _tmp43_;
		_tmp38_ = _tmp44_;
	} else {
		_tmp38_ = FALSE;
	}
	if (_tmp38_) {
		HdyFlap* _tmp45_;
		_tmp45_ = self->browse_flap;
		hdy_flap_set_reveal_flap (_tmp45_, FALSE);
	}
	_g_object_unref0 (simple_row);
	block21_data_unref (_data21_);
	_data21_ = NULL;
}

static void
_pamac_manager_window_on_categories_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                      GtkListBoxRow* row,
                                                                                      gpointer self)
{
	pamac_manager_window_on_categories_listbox_row_activated ((PamacManagerWindow*) self, row);
}

static Block22Data*
block22_data_ref (Block22Data* _data22_)
{
	g_atomic_int_inc (&_data22_->_ref_count_);
	return _data22_;
}

static void
block22_data_unref (void * _userdata_)
{
	Block22Data* _data22_;
	_data22_ = (Block22Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data22_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data22_->self;
		_g_object_unref0 (self);
		g_slice_free (Block22Data, _data22_);
	}
}

static void
__lambda27_ (Block22Data* _data22_,
             GObject* obj,
             GAsyncResult* res)
{
	PamacManagerWindow* self;
	GPtrArray* pkgs = NULL;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	gboolean found = FALSE;
	GPtrArray* _tmp2_;
	GtkButton* _tmp6_;
	GPtrArray* _tmp7_;
	GtkButton* _tmp11_;
	gboolean _tmp12_ = FALSE;
	GtkStack* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	self = _data22_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_group_pkgs_finish ((PamacDatabase*) _tmp0_, res);
	pkgs = _tmp1_;
	found = FALSE;
	_tmp2_ = pkgs;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp2_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAlpmPackage* pkg = NULL;
			pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				PamacAlpmPackage* _tmp3_;
				const gchar* _tmp4_;
				const gchar* _tmp5_;
				_tmp3_ = pkg;
				_tmp4_ = pamac_package_get_installed_version ((PamacPackage*) _tmp3_);
				_tmp5_ = _tmp4_;
				if (_tmp5_ == NULL) {
					found = TRUE;
					break;
				}
			}
		}
	}
	_tmp6_ = self->priv->install_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, found);
	found = FALSE;
	_tmp7_ = pkgs;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp7_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAlpmPackage* pkg = NULL;
			pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				PamacAlpmPackage* _tmp8_;
				const gchar* _tmp9_;
				const gchar* _tmp10_;
				_tmp8_ = pkg;
				_tmp9_ = pamac_package_get_installed_version ((PamacPackage*) _tmp8_);
				_tmp10_ = _tmp9_;
				if (_tmp10_ != NULL) {
					found = TRUE;
					break;
				}
			}
		}
	}
	_tmp11_ = self->priv->remove_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp11_, found);
	_tmp13_ = self->view_stack;
	_tmp14_ = gtk_stack_get_visible_child_name (_tmp13_);
	_tmp15_ = _tmp14_;
	if (g_strcmp0 (_tmp15_, "browse") == 0) {
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		_tmp16_ = self->priv->current_packages_list_name;
		_tmp17_ = _data22_->group_name;
		_tmp18_ = g_strdup_printf ("group_%s", _tmp17_);
		_tmp19_ = _tmp18_;
		_tmp12_ = g_strcmp0 (_tmp16_, _tmp19_) == 0;
		_g_free0 (_tmp19_);
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		HdyViewSwitcherTitle* _tmp20_;
		const gchar* _tmp21_;
		GPtrArray* _tmp22_;
		_tmp20_ = self->view_stack_switcher;
		_tmp21_ = _data22_->group_name;
		hdy_view_switcher_title_set_title (_tmp20_, _tmp21_);
		_tmp22_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp22_);
	} else {
		GdkWindow* _tmp23_;
		_tmp23_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp23_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
___lambda27__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda27_ (self, source_object, res);
	block22_data_unref (self);
}

static void
pamac_manager_window_on_groups_listbox_row_activated (PamacManagerWindow* self,
                                                      GtkListBoxRow* row)
{
	Block22Data* _data22_;
	PamacSimpleRow* simple_row = NULL;
	PamacSimpleRow* _tmp2_;
	PamacSimpleRow* _tmp3_;
	GdkWindow* _tmp4_;
	GdkDisplay* _tmp5_;
	GdkCursor* _tmp6_;
	GdkCursor* _tmp7_;
	PamacSimpleRow* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	PamacDatabaseGtk* _tmp13_;
	const gchar* _tmp14_;
	GtkButton* _tmp15_;
	gboolean _tmp16_ = FALSE;
	HdyFlap* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_data22_ = g_slice_new0 (Block22Data);
	_data22_->_ref_count_ = 1;
	_data22_->self = g_object_ref (self);
	if (PAMAC_IS_BACK_ROW (row)) {
		GtkListBox* _tmp0_;
		GtkStack* _tmp1_;
		_tmp0_ = self->priv->filters_listbox;
		gtk_list_box_select_row (_tmp0_, NULL);
		_tmp1_ = self->priv->browse_stack;
		gtk_stack_set_visible_child_name (_tmp1_, "filters");
		block22_data_unref (_data22_);
		_data22_ = NULL;
		return;
	}
	_tmp2_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (row) ? ((PamacSimpleRow*) row) : NULL);
	simple_row = _tmp2_;
	_tmp3_ = simple_row;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (simple_row);
		block22_data_unref (_data22_);
		_data22_ = NULL;
		return;
	}
	_tmp4_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp5_ = gdk_display_get_default ();
	_tmp6_ = gdk_cursor_new_for_display (_tmp5_, GDK_WATCH);
	_tmp7_ = _tmp6_;
	gdk_window_set_cursor (_tmp4_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = simple_row;
	_tmp9_ = pamac_simple_row_get_title (_tmp8_);
	_tmp10_ = _tmp9_;
	_data22_->group_name = _tmp10_;
	_tmp11_ = _data22_->group_name;
	_tmp12_ = g_strdup_printf ("group_%s", _tmp11_);
	_g_free0 (self->priv->current_packages_list_name);
	self->priv->current_packages_list_name = _tmp12_;
	_tmp13_ = self->priv->_database;
	_tmp14_ = _data22_->group_name;
	pamac_database_get_group_pkgs_async ((PamacDatabase*) _tmp13_, _tmp14_, ___lambda27__gasync_ready_callback, block22_data_ref (_data22_));
	_tmp15_ = self->priv->ignore_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp15_, FALSE);
	_tmp17_ = self->browse_flap;
	_tmp18_ = hdy_flap_get_folded (_tmp17_);
	_tmp19_ = _tmp18_;
	if (_tmp19_) {
		HdyFlap* _tmp20_;
		gboolean _tmp21_;
		gboolean _tmp22_;
		_tmp20_ = self->browse_flap;
		_tmp21_ = hdy_flap_get_reveal_flap (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp16_ = _tmp22_;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		HdyFlap* _tmp23_;
		_tmp23_ = self->browse_flap;
		hdy_flap_set_reveal_flap (_tmp23_, FALSE);
	}
	_g_object_unref0 (simple_row);
	block22_data_unref (_data22_);
	_data22_ = NULL;
}

static void
_pamac_manager_window_on_groups_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                  GtkListBoxRow* row,
                                                                                  gpointer self)
{
	pamac_manager_window_on_groups_listbox_row_activated ((PamacManagerWindow*) self, row);
}

static void
pamac_manager_window_get_all_installed_data_free (gpointer _data)
{
	PamacManagerWindowGetAllInstalledData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacManagerWindowGetAllInstalledData, _data_);
}

static void
pamac_manager_window_get_all_installed (PamacManagerWindow* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	PamacManagerWindowGetAllInstalledData* _data_;
	PamacManagerWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (PamacManagerWindowGetAllInstalledData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_manager_window_get_all_installed_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	pamac_manager_window_get_all_installed_co (_data_);
}

static GPtrArray*
pamac_manager_window_get_all_installed_finish (PamacManagerWindow* self,
                                               GAsyncResult* _res_)
{
	GPtrArray* result;
	PamacManagerWindowGetAllInstalledData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static Block23Data*
block23_data_ref (Block23Data* _data23_)
{
	g_atomic_int_inc (&_data23_->_ref_count_);
	return _data23_;
}

static void
block23_data_unref (void * _userdata_)
{
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data23_->self;
		_g_ptr_array_unref0 (_data23_->flatpaks);
		_g_ptr_array_unref0 (_data23_->snaps);
		_g_ptr_array_unref0 (_data23_->pkgs);
		_g_object_unref0 (self);
		g_slice_free (Block23Data, _data23_);
	}
}

static void
__lambda29_ (Block23Data* _data23_,
             GObject* obj,
             GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data23_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_installed_pkgs_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data23_->pkgs);
	_data23_->pkgs = _tmp1_;
	pamac_manager_window_get_all_installed_co (_data23_->_async_data_);
}

static void
___lambda29__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda29_ (self, source_object, res);
	block23_data_unref (self);
}

static void
___lambda30_ (Block23Data* _data23_,
              GObject* obj,
              GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data23_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_installed_snaps_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data23_->snaps);
	_data23_->snaps = _tmp1_;
	pamac_manager_window_get_all_installed_co (_data23_->_async_data_);
}

static void
____lambda30__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda30_ (self, source_object, res);
	block23_data_unref (self);
}

static void
___lambda31_ (Block23Data* _data23_,
              GObject* obj,
              GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data23_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_installed_flatpaks_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data23_->flatpaks);
	_data23_->flatpaks = _tmp1_;
	pamac_manager_window_get_all_installed_co (_data23_->_async_data_);
}

static void
____lambda31__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda31_ (self, source_object, res);
	block23_data_unref (self);
}

static gboolean
pamac_manager_window_get_all_installed_co (PamacManagerWindowGetAllInstalledData* _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_->_data23_ = g_slice_new0 (Block23Data);
	_data_->_data23_->_ref_count_ = 1;
	_data_->_data23_->self = g_object_ref (_data_->self);
	_data_->_data23_->_async_data_ = _data_;
	_data_->_tmp0_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data23_->pkgs = _data_->_tmp0_;
	_data_->_tmp1_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data23_->snaps = _data_->_tmp1_;
	_data_->_tmp2_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data23_->flatpaks = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->self->priv->_database;
	pamac_database_get_installed_pkgs_async ((PamacDatabase*) _data_->_tmp3_, ___lambda29__gasync_ready_callback, block23_data_ref (_data_->_data23_));
	_data_->_tmp4_ = _data_->self->priv->_database;
	_data_->_tmp5_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp4_);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = pamac_config_get_enable_snap (_data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	if (_data_->_tmp8_) {
		_data_->_tmp9_ = _data_->self->priv->_database;
		pamac_database_get_installed_snaps_async ((PamacDatabase*) _data_->_tmp9_, ____lambda30__gasync_ready_callback, block23_data_ref (_data_->_data23_));
	}
	_data_->_tmp10_ = _data_->self->priv->_database;
	_data_->_tmp11_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = pamac_config_get_enable_flatpak (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	if (_data_->_tmp14_) {
		_data_->_tmp15_ = _data_->self->priv->_database;
		pamac_database_get_installed_flatpaks_async ((PamacDatabase*) _data_->_tmp15_, ____lambda31__gasync_ready_callback, block23_data_ref (_data_->_data23_));
	}
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp16_ = _data_->self->priv->_database;
	_data_->_tmp17_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = pamac_config_get_enable_snap (_data_->_tmp18_);
	_data_->_tmp20_ = _data_->_tmp19_;
	if (_data_->_tmp20_) {
		_data_->_state_ = 2;
		return FALSE;
		_state_2:
		;
	}
	_data_->_tmp21_ = _data_->self->priv->_database;
	_data_->_tmp22_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp21_);
	_data_->_tmp23_ = _data_->_tmp22_;
	_data_->_tmp24_ = pamac_config_get_enable_flatpak (_data_->_tmp23_);
	_data_->_tmp25_ = _data_->_tmp24_;
	if (_data_->_tmp25_) {
		_data_->_state_ = 3;
		return FALSE;
		_state_3:
		;
	}
	_data_->_tmp26_ = _data_->_data23_->pkgs;
	_data_->_tmp27_ = _data_->_data23_->snaps;
	g_ptr_array_extend (_data_->_tmp26_, _data_->_tmp27_, NULL, NULL);
	_data_->_tmp28_ = _data_->_data23_->pkgs;
	_data_->_tmp29_ = _data_->_data23_->flatpaks;
	g_ptr_array_extend (_data_->_tmp28_, _data_->_tmp29_, NULL, NULL);
	_data_->_tmp30_ = _data_->_data23_->pkgs;
	_data_->_tmp31_ = _g_ptr_array_ref0 (_data_->_tmp30_);
	_data_->result = _data_->_tmp31_;
	block23_data_unref (_data_->_data23_);
	_data_->_data23_ = 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
___lambda32_ (PamacManagerWindow* self,
              GObject* obj,
              GAsyncResult* res)
{
	GPtrArray* pkgs = NULL;
	GPtrArray* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkStack* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (res != NULL);
	_tmp0_ = pamac_manager_window_get_all_installed_finish (self, res);
	pkgs = _tmp0_;
	_tmp2_ = self->view_stack;
	_tmp3_ = gtk_stack_get_visible_child_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "installed") == 0) {
		const gchar* _tmp5_;
		_tmp5_ = self->priv->current_packages_list_name;
		_tmp1_ = g_strcmp0 (_tmp5_, "installed_all") == 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		HdyViewSwitcherTitle* _tmp6_;
		GPtrArray* _tmp7_;
		_tmp6_ = self->view_stack_switcher;
		hdy_view_switcher_title_set_title (_tmp6_, g_dgettext (NULL, "Installed"));
		_tmp7_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp7_);
	} else {
		GdkWindow* _tmp8_;
		_tmp8_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp8_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
____lambda32__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda32_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
___lambda33_ (PamacManagerWindow* self,
              GObject* obj,
              GAsyncResult* res)
{
	GPtrArray* pkgs = NULL;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_explicitly_installed_pkgs_finish ((PamacDatabase*) _tmp0_, res);
	pkgs = _tmp1_;
	_tmp3_ = self->view_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "installed") == 0) {
		const gchar* _tmp6_;
		_tmp6_ = self->priv->current_packages_list_name;
		_tmp2_ = g_strcmp0 (_tmp6_, "explicitly_installed") == 0;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		HdyViewSwitcherTitle* _tmp7_;
		GPtrArray* _tmp8_;
		_tmp7_ = self->view_stack_switcher;
		hdy_view_switcher_title_set_title (_tmp7_, g_dgettext (NULL, "Explicitly installed"));
		_tmp8_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp8_);
	} else {
		GdkWindow* _tmp9_;
		_tmp9_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp9_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
____lambda33__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda33_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
___lambda34_ (PamacManagerWindow* self,
              GObject* obj,
              GAsyncResult* res)
{
	GPtrArray* pkgs = NULL;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_orphans_finish ((PamacDatabase*) _tmp0_, res);
	pkgs = _tmp1_;
	_tmp3_ = self->view_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "installed") == 0) {
		const gchar* _tmp6_;
		_tmp6_ = self->priv->current_packages_list_name;
		_tmp2_ = g_strcmp0 (_tmp6_, "orphans") == 0;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		HdyViewSwitcherTitle* _tmp7_;
		GPtrArray* _tmp8_;
		GtkButton* _tmp9_;
		GPtrArray* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		_tmp7_ = self->view_stack_switcher;
		hdy_view_switcher_title_set_title (_tmp7_, g_dgettext (NULL, "Orphans"));
		_tmp8_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp8_);
		_tmp9_ = self->priv->remove_all_button;
		_tmp10_ = pkgs;
		_tmp11_ = vala_g_ptr_array_get_length (_tmp10_);
		_tmp12_ = _tmp11_;
		gtk_widget_set_visible ((GtkWidget*) _tmp9_, _tmp12_ > 0);
	} else {
		GdkWindow* _tmp13_;
		_tmp13_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp13_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
____lambda34__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda34_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
___lambda35_ (PamacManagerWindow* self,
              GObject* obj,
              GAsyncResult* res)
{
	GPtrArray* pkgs = NULL;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_foreign_pkgs_finish ((PamacDatabase*) _tmp0_, res);
	pkgs = _tmp1_;
	_tmp3_ = self->view_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "installed") == 0) {
		const gchar* _tmp6_;
		_tmp6_ = self->priv->current_packages_list_name;
		_tmp2_ = g_strcmp0 (_tmp6_, "foreign") == 0;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		HdyViewSwitcherTitle* _tmp7_;
		GPtrArray* _tmp8_;
		_tmp7_ = self->view_stack_switcher;
		hdy_view_switcher_title_set_title (_tmp7_, g_dgettext (NULL, "Foreign"));
		_tmp8_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp8_);
	} else {
		GdkWindow* _tmp9_;
		_tmp9_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp9_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
____lambda35__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda35_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
____lambda36_ (PamacManagerWindow* self,
               GObject* obj,
               GAsyncResult* res)
{
	GPtrArray* pkgs = NULL;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_installed_snaps_finish ((PamacDatabase*) _tmp0_, res);
	pkgs = _tmp1_;
	_tmp3_ = self->view_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "installed") == 0) {
		const gchar* _tmp6_;
		_tmp6_ = self->priv->current_packages_list_name;
		_tmp2_ = g_strcmp0 (_tmp6_, "installed_snaps") == 0;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		HdyViewSwitcherTitle* _tmp7_;
		GPtrArray* _tmp8_;
		_tmp7_ = self->view_stack_switcher;
		hdy_view_switcher_title_set_title (_tmp7_, g_dgettext (NULL, "Snap"));
		_tmp8_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp8_);
	} else {
		GdkWindow* _tmp9_;
		_tmp9_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp9_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
_____lambda36__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda36_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
_____lambda37_ (PamacManagerWindow* self,
                GObject* obj,
                GAsyncResult* res)
{
	GPtrArray* pkgs = NULL;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_installed_flatpaks_finish ((PamacDatabase*) _tmp0_, res);
	pkgs = _tmp1_;
	_tmp3_ = self->view_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "installed") == 0) {
		const gchar* _tmp6_;
		_tmp6_ = self->priv->current_packages_list_name;
		_tmp2_ = g_strcmp0 (_tmp6_, "installed_flatpaks") == 0;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		HdyViewSwitcherTitle* _tmp7_;
		GPtrArray* _tmp8_;
		_tmp7_ = self->view_stack_switcher;
		hdy_view_switcher_title_set_title (_tmp7_, g_dgettext (NULL, "Flatpak"));
		_tmp8_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp8_);
	} else {
		GdkWindow* _tmp9_;
		_tmp9_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp9_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
______lambda37__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	_____lambda37_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
pamac_manager_window_on_installed_listbox_row_activated (PamacManagerWindow* self,
                                                         GtkListBoxRow* row)
{
	GdkWindow* _tmp0_;
	GdkDisplay* _tmp1_;
	GdkCursor* _tmp2_;
	GdkCursor* _tmp3_;
	gint index = 0;
	GtkButton* _tmp23_;
	GtkButton* _tmp24_;
	GtkButton* _tmp25_;
	gboolean _tmp26_ = FALSE;
	HdyFlap* _tmp27_;
	gboolean _tmp28_;
	gboolean _tmp29_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_tmp0_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp1_ = gdk_display_get_default ();
	_tmp2_ = gdk_cursor_new_for_display (_tmp1_, GDK_WATCH);
	_tmp3_ = _tmp2_;
	gdk_window_set_cursor (_tmp0_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	index = gtk_list_box_row_get_index (row);
	switch (index) {
		case 0:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("installed_all");
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp4_;
			pamac_manager_window_get_all_installed (self, ____lambda32__gasync_ready_callback, g_object_ref (self));
			break;
		}
		case 1:
		{
			gchar* _tmp5_;
			PamacDatabaseGtk* _tmp6_;
			_tmp5_ = g_strdup ("explicitly_installed");
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp5_;
			_tmp6_ = self->priv->_database;
			pamac_database_get_explicitly_installed_pkgs_async ((PamacDatabase*) _tmp6_, ____lambda33__gasync_ready_callback, g_object_ref (self));
			break;
		}
		case 2:
		{
			gchar* _tmp7_;
			PamacDatabaseGtk* _tmp8_;
			_tmp7_ = g_strdup ("orphans");
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp7_;
			_tmp8_ = self->priv->_database;
			pamac_database_get_orphans_async ((PamacDatabase*) _tmp8_, ____lambda34__gasync_ready_callback, g_object_ref (self));
			break;
		}
		case 3:
		{
			gchar* _tmp9_;
			PamacDatabaseGtk* _tmp10_;
			_tmp9_ = g_strdup ("foreign");
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp9_;
			_tmp10_ = self->priv->_database;
			pamac_database_get_foreign_pkgs_async ((PamacDatabase*) _tmp10_, ____lambda35__gasync_ready_callback, g_object_ref (self));
			break;
		}
		case 4:
		case 5:
		{
			PamacSimpleRow* simple_row = NULL;
			PamacSimpleRow* _tmp11_;
			PamacSimpleRow* _tmp12_;
			const gchar* title = NULL;
			PamacSimpleRow* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			_tmp11_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (row) ? ((PamacSimpleRow*) row) : NULL);
			simple_row = _tmp11_;
			_tmp12_ = simple_row;
			if (_tmp12_ == NULL) {
				GdkWindow* _tmp13_;
				_tmp13_ = gtk_widget_get_window ((GtkWidget*) self);
				gdk_window_set_cursor (_tmp13_, NULL);
				_g_object_unref0 (simple_row);
				return;
			}
			_tmp14_ = simple_row;
			_tmp15_ = pamac_simple_row_get_title (_tmp14_);
			_tmp16_ = _tmp15_;
			title = _tmp16_;
			_tmp17_ = title;
			if (g_strcmp0 (_tmp17_, g_dgettext (NULL, "Snap")) == 0) {
				gchar* _tmp18_;
				PamacDatabaseGtk* _tmp19_;
				_tmp18_ = g_strdup ("installed_snaps");
				_g_free0 (self->priv->current_packages_list_name);
				self->priv->current_packages_list_name = _tmp18_;
				_tmp19_ = self->priv->_database;
				pamac_database_get_installed_snaps_async ((PamacDatabase*) _tmp19_, _____lambda36__gasync_ready_callback, g_object_ref (self));
			} else {
				const gchar* _tmp20_;
				_tmp20_ = title;
				if (g_strcmp0 (_tmp20_, g_dgettext (NULL, "Flatpak")) == 0) {
					gchar* _tmp21_;
					PamacDatabaseGtk* _tmp22_;
					_tmp21_ = g_strdup ("installed_flatpaks");
					_g_free0 (self->priv->current_packages_list_name);
					self->priv->current_packages_list_name = _tmp21_;
					_tmp22_ = self->priv->_database;
					pamac_database_get_installed_flatpaks_async ((PamacDatabase*) _tmp22_, ______lambda37__gasync_ready_callback, g_object_ref (self));
				}
			}
			_g_object_unref0 (simple_row);
			break;
		}
		default:
		{
			break;
		}
	}
	_tmp23_ = self->priv->install_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp23_, FALSE);
	_tmp24_ = self->priv->remove_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp24_, FALSE);
	_tmp25_ = self->priv->ignore_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp25_, FALSE);
	_tmp27_ = self->browse_flap;
	_tmp28_ = hdy_flap_get_folded (_tmp27_);
	_tmp29_ = _tmp28_;
	if (_tmp29_) {
		HdyFlap* _tmp30_;
		gboolean _tmp31_;
		gboolean _tmp32_;
		_tmp30_ = self->browse_flap;
		_tmp31_ = hdy_flap_get_reveal_flap (_tmp30_);
		_tmp32_ = _tmp31_;
		_tmp26_ = _tmp32_;
	} else {
		_tmp26_ = FALSE;
	}
	if (_tmp26_) {
		HdyFlap* _tmp33_;
		_tmp33_ = self->browse_flap;
		hdy_flap_set_reveal_flap (_tmp33_, FALSE);
	}
}

static void
_pamac_manager_window_on_installed_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                     GtkListBoxRow* row,
                                                                                     gpointer self)
{
	pamac_manager_window_on_installed_listbox_row_activated ((PamacManagerWindow*) self, row);
}

static void
___lambda42_ (PamacManagerWindow* self,
              GObject* obj,
              GAsyncResult* res)
{
	GPtrArray* pkgs = NULL;
	GPtrArray* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkStack* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (res != NULL);
	_tmp0_ = pamac_manager_window_search_all_pkgs_finish (self, res);
	pkgs = _tmp0_;
	_tmp2_ = self->view_stack;
	_tmp3_ = gtk_stack_get_visible_child_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "search") == 0) {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp5_ = self->priv->current_packages_list_name;
		_tmp6_ = pamac_search_string;
		_tmp7_ = g_strdup_printf ("search_all_%s", _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp1_ = g_strcmp0 (_tmp5_, _tmp8_) == 0;
		_g_free0 (_tmp8_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GPtrArray* _tmp9_;
		_tmp9_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp9_);
	} else {
		GdkWindow* _tmp10_;
		_tmp10_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp10_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
____lambda42__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda42_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
___lambda43_ (PamacManagerWindow* self,
              GObject* obj,
              GAsyncResult* res)
{
	GPtrArray* pkgs = NULL;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_search_installed_pkgs_finish ((PamacDatabase*) _tmp0_, res);
	pkgs = _tmp1_;
	_tmp3_ = self->view_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "search") == 0) {
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp6_ = self->priv->current_packages_list_name;
		_tmp7_ = pamac_search_string;
		_tmp8_ = g_strdup_printf ("search_installed_%s", _tmp7_);
		_tmp9_ = _tmp8_;
		_tmp2_ = g_strcmp0 (_tmp6_, _tmp9_) == 0;
		_g_free0 (_tmp9_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GPtrArray* _tmp10_;
		_tmp10_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp10_);
	} else {
		GdkWindow* _tmp11_;
		_tmp11_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp11_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
____lambda43__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda43_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
___lambda44_ (PamacManagerWindow* self,
              GObject* obj,
              GAsyncResult* res)
{
	gboolean _tmp0_ = FALSE;
	GtkStack* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (res != NULL);
	_tmp1_ = self->view_stack;
	_tmp2_ = gtk_stack_get_visible_child_name (_tmp1_);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp3_, "search") == 0) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = self->priv->current_packages_list_name;
		_tmp5_ = pamac_search_string;
		_tmp6_ = g_strdup_printf ("search_repos_%s", _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp0_ = g_strcmp0 (_tmp4_, _tmp7_) == 0;
		_g_free0 (_tmp7_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GPtrArray* pkgs = NULL;
		PamacDatabaseGtk* _tmp8_;
		GPtrArray* _tmp9_;
		GPtrArray* _tmp10_;
		_tmp8_ = self->priv->_database;
		_tmp9_ = pamac_database_search_repos_pkgs_finish ((PamacDatabase*) _tmp8_, res);
		pkgs = _tmp9_;
		_tmp10_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp10_);
		_g_ptr_array_unref0 (pkgs);
	} else {
		GdkWindow* _tmp11_;
		_tmp11_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp11_, NULL);
	}
}

static void
____lambda44__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda44_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
____lambda45_ (PamacManagerWindow* self,
               GObject* obj,
               GAsyncResult* res)
{
	gboolean _tmp0_ = FALSE;
	GtkStack* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (res != NULL);
	_tmp1_ = self->view_stack;
	_tmp2_ = gtk_stack_get_visible_child_name (_tmp1_);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp3_, "search") == 0) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = self->priv->current_packages_list_name;
		_tmp5_ = pamac_search_string;
		_tmp6_ = g_strdup_printf ("search_aur_%s", _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp0_ = g_strcmp0 (_tmp4_, _tmp7_) == 0;
		_g_free0 (_tmp7_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GPtrArray* pkgs = NULL;
		PamacDatabaseGtk* _tmp8_;
		GPtrArray* _tmp9_;
		GPtrArray* _tmp10_;
		_tmp8_ = self->priv->_database;
		_tmp9_ = pamac_database_search_aur_pkgs_finish ((PamacDatabase*) _tmp8_, res);
		pkgs = _tmp9_;
		_tmp10_ = pkgs;
		pamac_manager_window_populate_aur_list (self, _tmp10_);
		_g_ptr_array_unref0 (pkgs);
	} else {
		GdkWindow* _tmp11_;
		_tmp11_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp11_, NULL);
	}
}

static void
_____lambda45__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda45_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
_____lambda46_ (PamacManagerWindow* self,
                GObject* obj,
                GAsyncResult* res)
{
	gboolean _tmp0_ = FALSE;
	GtkStack* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (res != NULL);
	_tmp1_ = self->view_stack;
	_tmp2_ = gtk_stack_get_visible_child_name (_tmp1_);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp3_, "search") == 0) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = self->priv->current_packages_list_name;
		_tmp5_ = pamac_search_string;
		_tmp6_ = g_strdup_printf ("search_snap_%s", _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp0_ = g_strcmp0 (_tmp4_, _tmp7_) == 0;
		_g_free0 (_tmp7_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GPtrArray* pkgs = NULL;
		PamacDatabaseGtk* _tmp8_;
		GPtrArray* _tmp9_;
		GPtrArray* _tmp10_;
		_tmp8_ = self->priv->_database;
		_tmp9_ = pamac_database_search_snaps_finish ((PamacDatabase*) _tmp8_, res);
		pkgs = _tmp9_;
		_tmp10_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp10_);
		_g_ptr_array_unref0 (pkgs);
	} else {
		GdkWindow* _tmp11_;
		_tmp11_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp11_, NULL);
	}
}

static void
______lambda46__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	_____lambda46_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
______lambda47_ (PamacManagerWindow* self,
                 GObject* obj,
                 GAsyncResult* res)
{
	gboolean _tmp0_ = FALSE;
	GtkStack* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (res != NULL);
	_tmp1_ = self->view_stack;
	_tmp2_ = gtk_stack_get_visible_child_name (_tmp1_);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp3_, "search") == 0) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = self->priv->current_packages_list_name;
		_tmp5_ = pamac_search_string;
		_tmp6_ = g_strdup_printf ("search_flatpak_%s", _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp0_ = g_strcmp0 (_tmp4_, _tmp7_) == 0;
		_g_free0 (_tmp7_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GPtrArray* pkgs = NULL;
		PamacDatabaseGtk* _tmp8_;
		GPtrArray* _tmp9_;
		GPtrArray* _tmp10_;
		_tmp8_ = self->priv->_database;
		_tmp9_ = pamac_database_search_flatpaks_finish ((PamacDatabase*) _tmp8_, res);
		pkgs = _tmp9_;
		_tmp10_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp10_);
		_g_ptr_array_unref0 (pkgs);
	} else {
		GdkWindow* _tmp11_;
		_tmp11_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp11_, NULL);
	}
}

static void
_______lambda47__gasync_ready_callback (GObject* source_object,
                                        GAsyncResult* res,
                                        gpointer self)
{
	______lambda47_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
pamac_manager_window_on_search_listbox_row_activated (PamacManagerWindow* self,
                                                      GtkListBoxRow* row)
{
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	GdkWindow* _tmp2_;
	GdkDisplay* _tmp3_;
	GdkCursor* _tmp4_;
	GdkCursor* _tmp5_;
	gint index = 0;
	GtkButton* _tmp37_;
	GtkButton* _tmp38_;
	GtkButton* _tmp39_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_tmp0_ = self->search_entry;
	gtk_entry_grab_focus_without_selecting ((GtkEntry*) _tmp0_);
	_tmp1_ = pamac_search_string;
	if (_tmp1_ == NULL) {
		return;
	}
	_tmp2_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp3_ = gdk_display_get_default ();
	_tmp4_ = gdk_cursor_new_for_display (_tmp3_, GDK_WATCH);
	_tmp5_ = _tmp4_;
	gdk_window_set_cursor (_tmp2_, _tmp5_);
	_g_object_unref0 (_tmp5_);
	index = gtk_list_box_row_get_index (row);
	switch (index) {
		case 0:
		{
			const gchar* _tmp6_;
			gchar* _tmp7_;
			_tmp6_ = pamac_search_string;
			_tmp7_ = g_strdup_printf ("search_all_%s", _tmp6_);
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp7_;
			pamac_manager_window_search_all_pkgs (self, ____lambda42__gasync_ready_callback, g_object_ref (self));
			break;
		}
		case 1:
		{
			const gchar* _tmp8_;
			gchar* _tmp9_;
			PamacDatabaseGtk* _tmp10_;
			const gchar* _tmp11_;
			_tmp8_ = pamac_search_string;
			_tmp9_ = g_strdup_printf ("search_installed_%s", _tmp8_);
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp9_;
			_tmp10_ = self->priv->_database;
			_tmp11_ = pamac_search_string;
			pamac_database_search_installed_pkgs_async ((PamacDatabase*) _tmp10_, _tmp11_, ____lambda43__gasync_ready_callback, g_object_ref (self));
			break;
		}
		case 2:
		{
			const gchar* _tmp12_;
			gchar* _tmp13_;
			PamacDatabaseGtk* _tmp14_;
			const gchar* _tmp15_;
			_tmp12_ = pamac_search_string;
			_tmp13_ = g_strdup_printf ("search_repos_%s", _tmp12_);
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp13_;
			_tmp14_ = self->priv->_database;
			_tmp15_ = pamac_search_string;
			pamac_database_search_repos_pkgs_async ((PamacDatabase*) _tmp14_, _tmp15_, ____lambda44__gasync_ready_callback, g_object_ref (self));
			break;
		}
		case 3:
		case 4:
		case 5:
		{
			PamacSimpleRow* simple_row = NULL;
			PamacSimpleRow* _tmp16_;
			PamacSimpleRow* _tmp17_;
			const gchar* title = NULL;
			PamacSimpleRow* _tmp19_;
			const gchar* _tmp20_;
			const gchar* _tmp21_;
			const gchar* _tmp22_;
			_tmp16_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (row) ? ((PamacSimpleRow*) row) : NULL);
			simple_row = _tmp16_;
			_tmp17_ = simple_row;
			if (_tmp17_ == NULL) {
				GdkWindow* _tmp18_;
				_tmp18_ = gtk_widget_get_window ((GtkWidget*) self);
				gdk_window_set_cursor (_tmp18_, NULL);
				_g_object_unref0 (simple_row);
				return;
			}
			_tmp19_ = simple_row;
			_tmp20_ = pamac_simple_row_get_title (_tmp19_);
			_tmp21_ = _tmp20_;
			title = _tmp21_;
			_tmp22_ = title;
			if (g_strcmp0 (_tmp22_, g_dgettext (NULL, "AUR")) == 0) {
				const gchar* _tmp23_;
				gchar* _tmp24_;
				PamacDatabaseGtk* _tmp25_;
				const gchar* _tmp26_;
				_tmp23_ = pamac_search_string;
				_tmp24_ = g_strdup_printf ("search_aur_%s", _tmp23_);
				_g_free0 (self->priv->current_packages_list_name);
				self->priv->current_packages_list_name = _tmp24_;
				_tmp25_ = self->priv->_database;
				_tmp26_ = pamac_search_string;
				pamac_database_search_aur_pkgs_async ((PamacDatabase*) _tmp25_, _tmp26_, _____lambda45__gasync_ready_callback, g_object_ref (self));
			} else {
				const gchar* _tmp27_;
				_tmp27_ = title;
				if (g_strcmp0 (_tmp27_, g_dgettext (NULL, "Snap")) == 0) {
					const gchar* _tmp28_;
					gchar* _tmp29_;
					PamacDatabaseGtk* _tmp30_;
					const gchar* _tmp31_;
					_tmp28_ = pamac_search_string;
					_tmp29_ = g_strdup_printf ("search_snap_%s", _tmp28_);
					_g_free0 (self->priv->current_packages_list_name);
					self->priv->current_packages_list_name = _tmp29_;
					_tmp30_ = self->priv->_database;
					_tmp31_ = pamac_search_string;
					pamac_database_search_snaps_async ((PamacDatabase*) _tmp30_, _tmp31_, ______lambda46__gasync_ready_callback, g_object_ref (self));
				} else {
					const gchar* _tmp32_;
					_tmp32_ = title;
					if (g_strcmp0 (_tmp32_, g_dgettext (NULL, "Flatpak")) == 0) {
						const gchar* _tmp33_;
						gchar* _tmp34_;
						PamacDatabaseGtk* _tmp35_;
						const gchar* _tmp36_;
						_tmp33_ = pamac_search_string;
						_tmp34_ = g_strdup_printf ("search_flatpak_%s", _tmp33_);
						_g_free0 (self->priv->current_packages_list_name);
						self->priv->current_packages_list_name = _tmp34_;
						_tmp35_ = self->priv->_database;
						_tmp36_ = pamac_search_string;
						pamac_database_search_flatpaks_async ((PamacDatabase*) _tmp35_, _tmp36_, _______lambda47__gasync_ready_callback, g_object_ref (self));
					}
				}
			}
			_g_object_unref0 (simple_row);
			break;
		}
		default:
		{
			break;
		}
	}
	_tmp37_ = self->priv->install_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp37_, FALSE);
	_tmp38_ = self->priv->remove_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp38_, FALSE);
	_tmp39_ = self->priv->ignore_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp39_, FALSE);
}

static void
_pamac_manager_window_on_search_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                  GtkListBoxRow* row,
                                                                                  gpointer self)
{
	pamac_manager_window_on_search_listbox_row_activated ((PamacManagerWindow*) self, row);
}

static void
pamac_manager_window_on_updates_listbox_row_activated (PamacManagerWindow* self,
                                                       GtkListBoxRow* row)
{
	GdkWindow* _tmp0_;
	GdkDisplay* _tmp1_;
	GdkCursor* _tmp2_;
	GdkCursor* _tmp3_;
	gint index = 0;
	GtkButton* _tmp139_;
	GtkButton* _tmp140_;
	gboolean _tmp141_ = FALSE;
	HdyFlap* _tmp142_;
	gboolean _tmp143_;
	gboolean _tmp144_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_tmp0_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp1_ = gdk_display_get_default ();
	_tmp2_ = gdk_cursor_new_for_display (_tmp1_, GDK_WATCH);
	_tmp3_ = _tmp2_;
	gdk_window_set_cursor (_tmp0_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	index = gtk_list_box_row_get_index (row);
	switch (index) {
		case 0:
		{
			gchar* _tmp4_;
			GPtrArray* pkgs = NULL;
			GPtrArray* _tmp5_;
			GPtrArray* _tmp6_;
			GPtrArray* _tmp9_;
			GPtrArray* _tmp12_;
			gboolean _tmp15_ = FALSE;
			GtkStack* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			PamacLocalConfig* _tmp23_;
			gboolean _tmp24_;
			gboolean _tmp25_;
			_tmp4_ = g_strdup ("all_updates");
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp4_;
			_tmp5_ = g_ptr_array_new_full ((guint) 0, NULL);
			pkgs = _tmp5_;
			_tmp6_ = self->priv->repos_updates;
			{
				GPtrArray* pkg_collection = NULL;
				guint pkg_index = 0U;
				pkg_collection = _tmp6_;
				for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
					PamacAlpmPackage* pkg = NULL;
					pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
					{
						GPtrArray* _tmp7_;
						PamacAlpmPackage* _tmp8_;
						_tmp7_ = pkgs;
						_tmp8_ = pkg;
						g_ptr_array_add (_tmp7_, (PamacPackage*) _tmp8_);
					}
				}
			}
			_tmp9_ = self->priv->aur_updates;
			{
				GPtrArray* pkg_collection = NULL;
				guint pkg_index = 0U;
				pkg_collection = _tmp9_;
				for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
					PamacPackage* pkg = NULL;
					pkg = (PamacPackage*) g_ptr_array_index (pkg_collection, pkg_index);
					{
						GPtrArray* _tmp10_;
						PamacPackage* _tmp11_;
						_tmp10_ = pkgs;
						_tmp11_ = pkg;
						g_ptr_array_add (_tmp10_, _tmp11_);
					}
				}
			}
			_tmp12_ = self->priv->flatpak_updates;
			{
				GPtrArray* pkg_collection = NULL;
				guint pkg_index = 0U;
				pkg_collection = _tmp12_;
				for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
					PamacPackage* pkg = NULL;
					pkg = (PamacPackage*) g_ptr_array_index (pkg_collection, pkg_index);
					{
						GPtrArray* _tmp13_;
						PamacPackage* _tmp14_;
						_tmp13_ = pkgs;
						_tmp14_ = pkg;
						g_ptr_array_add (_tmp13_, _tmp14_);
					}
				}
			}
			_tmp16_ = self->view_stack;
			_tmp17_ = gtk_stack_get_visible_child_name (_tmp16_);
			_tmp18_ = _tmp17_;
			if (g_strcmp0 (_tmp18_, "updates") == 0) {
				const gchar* _tmp19_;
				_tmp19_ = self->priv->current_packages_list_name;
				_tmp15_ = g_strcmp0 (_tmp19_, "all_updates") == 0;
			} else {
				_tmp15_ = FALSE;
			}
			if (_tmp15_) {
				HdyViewSwitcherTitle* _tmp20_;
				GPtrArray* _tmp21_;
				_tmp20_ = self->view_stack_switcher;
				hdy_view_switcher_title_set_title (_tmp20_, g_dgettext (NULL, "Updates"));
				_tmp21_ = pkgs;
				pamac_manager_window_populate_packages_list (self, _tmp21_);
			} else {
				GdkWindow* _tmp22_;
				_tmp22_ = gtk_widget_get_window ((GtkWidget*) self);
				gdk_window_set_cursor (_tmp22_, NULL);
			}
			_tmp23_ = self->local_config;
			_tmp24_ = pamac_local_config_get_software_mode (_tmp23_);
			_tmp25_ = _tmp24_;
			if (!_tmp25_) {
				GtkButton* _tmp26_;
				_tmp26_ = self->priv->ignore_all_button;
				gtk_widget_set_visible ((GtkWidget*) _tmp26_, TRUE);
			}
			_g_ptr_array_unref0 (pkgs);
			break;
		}
		case 1:
		{
			gchar* _tmp27_;
			GPtrArray* pkgs = NULL;
			GPtrArray* _tmp28_;
			GPtrArray* _tmp29_;
			gboolean _tmp36_ = FALSE;
			GtkStack* _tmp37_;
			const gchar* _tmp38_;
			const gchar* _tmp39_;
			GPtrArray* _tmp44_;
			gint _tmp45_;
			gint _tmp46_;
			_tmp27_ = g_strdup ("repos_updates");
			_g_free0 (self->priv->current_packages_list_name);
			self->priv->current_packages_list_name = _tmp27_;
			_tmp28_ = g_ptr_array_new_full ((guint) 0, NULL);
			pkgs = _tmp28_;
			_tmp29_ = self->priv->repos_updates;
			{
				GPtrArray* pkg_collection = NULL;
				guint pkg_index = 0U;
				pkg_collection = _tmp29_;
				for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
					PamacAlpmPackage* pkg = NULL;
					pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
					{
						GHashTable* _tmp30_;
						PamacAlpmPackage* _tmp31_;
						const gchar* _tmp32_;
						const gchar* _tmp33_;
						_tmp30_ = pamac_temporary_ignorepkgs;
						_tmp31_ = pkg;
						_tmp32_ = pamac_package_get_name ((PamacPackage*) _tmp31_);
						_tmp33_ = _tmp32_;
						if (!g_hash_table_contains (_tmp30_, _tmp33_)) {
							GPtrArray* _tmp34_;
							PamacAlpmPackage* _tmp35_;
							_tmp34_ = pkgs;
							_tmp35_ = pkg;
							g_ptr_array_add (_tmp34_, _tmp35_);
						}
					}
				}
			}
			_tmp37_ = self->view_stack;
			_tmp38_ = gtk_stack_get_visible_child_name (_tmp37_);
			_tmp39_ = _tmp38_;
			if (g_strcmp0 (_tmp39_, "updates") == 0) {
				const gchar* _tmp40_;
				_tmp40_ = self->priv->current_packages_list_name;
				_tmp36_ = g_strcmp0 (_tmp40_, "repos_updates") == 0;
			} else {
				_tmp36_ = FALSE;
			}
			if (_tmp36_) {
				HdyViewSwitcherTitle* _tmp41_;
				GPtrArray* _tmp42_;
				_tmp41_ = self->view_stack_switcher;
				hdy_view_switcher_title_set_title (_tmp41_, g_dgettext (NULL, "Repositories"));
				_tmp42_ = pkgs;
				pamac_manager_window_populate_packages_list (self, _tmp42_);
			} else {
				GdkWindow* _tmp43_;
				_tmp43_ = gtk_widget_get_window ((GtkWidget*) self);
				gdk_window_set_cursor (_tmp43_, NULL);
			}
			_tmp44_ = pkgs;
			_tmp45_ = vala_g_ptr_array_get_length (_tmp44_);
			_tmp46_ = _tmp45_;
			if (_tmp46_ > 0) {
				GtkButton* _tmp47_;
				_tmp47_ = self->priv->ignore_all_button;
				gtk_widget_set_visible ((GtkWidget*) _tmp47_, TRUE);
			}
			_g_ptr_array_unref0 (pkgs);
			break;
		}
		case 2:
		case 3:
		case 4:
		{
			PamacSimpleRow* simple_row = NULL;
			PamacSimpleRow* _tmp48_;
			PamacSimpleRow* _tmp49_;
			const gchar* title = NULL;
			PamacSimpleRow* _tmp51_;
			const gchar* _tmp52_;
			const gchar* _tmp53_;
			const gchar* _tmp54_;
			_tmp48_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (row) ? ((PamacSimpleRow*) row) : NULL);
			simple_row = _tmp48_;
			_tmp49_ = simple_row;
			if (_tmp49_ == NULL) {
				GdkWindow* _tmp50_;
				_tmp50_ = gtk_widget_get_window ((GtkWidget*) self);
				gdk_window_set_cursor (_tmp50_, NULL);
				_g_object_unref0 (simple_row);
				break;
			}
			_tmp51_ = simple_row;
			_tmp52_ = pamac_simple_row_get_title (_tmp51_);
			_tmp53_ = _tmp52_;
			title = _tmp53_;
			_tmp54_ = title;
			if (g_strcmp0 (_tmp54_, g_dgettext (NULL, "AUR")) == 0) {
				gchar* _tmp55_;
				GPtrArray* pkgs = NULL;
				GPtrArray* _tmp56_;
				GPtrArray* _tmp57_;
				gboolean _tmp64_ = FALSE;
				GtkStack* _tmp65_;
				const gchar* _tmp66_;
				const gchar* _tmp67_;
				GPtrArray* _tmp72_;
				gint _tmp73_;
				gint _tmp74_;
				_tmp55_ = g_strdup ("aur_updates");
				_g_free0 (self->priv->current_packages_list_name);
				self->priv->current_packages_list_name = _tmp55_;
				_tmp56_ = g_ptr_array_new_full ((guint) 0, NULL);
				pkgs = _tmp56_;
				_tmp57_ = self->priv->aur_updates;
				{
					GPtrArray* pkg_collection = NULL;
					guint pkg_index = 0U;
					pkg_collection = _tmp57_;
					for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
						PamacAURPackage* pkg = NULL;
						pkg = (PamacAURPackage*) g_ptr_array_index (pkg_collection, pkg_index);
						{
							GHashTable* _tmp58_;
							PamacAURPackage* _tmp59_;
							const gchar* _tmp60_;
							const gchar* _tmp61_;
							_tmp58_ = pamac_temporary_ignorepkgs;
							_tmp59_ = pkg;
							_tmp60_ = pamac_package_get_name ((PamacPackage*) _tmp59_);
							_tmp61_ = _tmp60_;
							if (!g_hash_table_contains (_tmp58_, _tmp61_)) {
								GPtrArray* _tmp62_;
								PamacAURPackage* _tmp63_;
								_tmp62_ = pkgs;
								_tmp63_ = pkg;
								g_ptr_array_add (_tmp62_, _tmp63_);
							}
						}
					}
				}
				_tmp65_ = self->view_stack;
				_tmp66_ = gtk_stack_get_visible_child_name (_tmp65_);
				_tmp67_ = _tmp66_;
				if (g_strcmp0 (_tmp67_, "updates") == 0) {
					const gchar* _tmp68_;
					_tmp68_ = self->priv->current_packages_list_name;
					_tmp64_ = g_strcmp0 (_tmp68_, "aur_updates") == 0;
				} else {
					_tmp64_ = FALSE;
				}
				if (_tmp64_) {
					HdyViewSwitcherTitle* _tmp69_;
					GPtrArray* _tmp70_;
					_tmp69_ = self->view_stack_switcher;
					hdy_view_switcher_title_set_title (_tmp69_, g_dgettext (NULL, "AUR"));
					_tmp70_ = pkgs;
					pamac_manager_window_populate_aur_list (self, _tmp70_);
				} else {
					GdkWindow* _tmp71_;
					_tmp71_ = gtk_widget_get_window ((GtkWidget*) self);
					gdk_window_set_cursor (_tmp71_, NULL);
				}
				_tmp72_ = pkgs;
				_tmp73_ = vala_g_ptr_array_get_length (_tmp72_);
				_tmp74_ = _tmp73_;
				if (_tmp74_ > 0) {
					GtkButton* _tmp75_;
					_tmp75_ = self->priv->ignore_all_button;
					gtk_widget_set_visible ((GtkWidget*) _tmp75_, TRUE);
				}
				_g_ptr_array_unref0 (pkgs);
			} else {
				const gchar* _tmp76_;
				_tmp76_ = title;
				if (g_strcmp0 (_tmp76_, g_dgettext (NULL, "Flatpak")) == 0) {
					gchar* _tmp77_;
					GPtrArray* pkgs = NULL;
					GPtrArray* _tmp78_;
					GPtrArray* _tmp79_;
					gboolean _tmp86_ = FALSE;
					GtkStack* _tmp87_;
					const gchar* _tmp88_;
					const gchar* _tmp89_;
					GPtrArray* _tmp94_;
					gint _tmp95_;
					gint _tmp96_;
					_tmp77_ = g_strdup ("flatpak_updates");
					_g_free0 (self->priv->current_packages_list_name);
					self->priv->current_packages_list_name = _tmp77_;
					_tmp78_ = g_ptr_array_new_full ((guint) 0, NULL);
					pkgs = _tmp78_;
					_tmp79_ = self->priv->flatpak_updates;
					{
						GPtrArray* pkg_collection = NULL;
						guint pkg_index = 0U;
						pkg_collection = _tmp79_;
						for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
							PamacFlatpakPackage* pkg = NULL;
							pkg = (PamacFlatpakPackage*) g_ptr_array_index (pkg_collection, pkg_index);
							{
								GHashTable* _tmp80_;
								PamacFlatpakPackage* _tmp81_;
								const gchar* _tmp82_;
								const gchar* _tmp83_;
								_tmp80_ = pamac_temporary_ignorepkgs;
								_tmp81_ = pkg;
								_tmp82_ = pamac_package_get_name ((PamacPackage*) _tmp81_);
								_tmp83_ = _tmp82_;
								if (!g_hash_table_contains (_tmp80_, _tmp83_)) {
									GPtrArray* _tmp84_;
									PamacFlatpakPackage* _tmp85_;
									_tmp84_ = pkgs;
									_tmp85_ = pkg;
									g_ptr_array_add (_tmp84_, _tmp85_);
								}
							}
						}
					}
					_tmp87_ = self->view_stack;
					_tmp88_ = gtk_stack_get_visible_child_name (_tmp87_);
					_tmp89_ = _tmp88_;
					if (g_strcmp0 (_tmp89_, "updates") == 0) {
						const gchar* _tmp90_;
						_tmp90_ = self->priv->current_packages_list_name;
						_tmp86_ = g_strcmp0 (_tmp90_, "flatpak_updates") == 0;
					} else {
						_tmp86_ = FALSE;
					}
					if (_tmp86_) {
						HdyViewSwitcherTitle* _tmp91_;
						GPtrArray* _tmp92_;
						_tmp91_ = self->view_stack_switcher;
						hdy_view_switcher_title_set_title (_tmp91_, g_dgettext (NULL, "Flatpak"));
						_tmp92_ = pkgs;
						pamac_manager_window_populate_packages_list (self, _tmp92_);
					} else {
						GdkWindow* _tmp93_;
						_tmp93_ = gtk_widget_get_window ((GtkWidget*) self);
						gdk_window_set_cursor (_tmp93_, NULL);
					}
					_tmp94_ = pkgs;
					_tmp95_ = vala_g_ptr_array_get_length (_tmp94_);
					_tmp96_ = _tmp95_;
					if (_tmp96_ > 0) {
						GtkButton* _tmp97_;
						_tmp97_ = self->priv->ignore_all_button;
						gtk_widget_set_visible ((GtkWidget*) _tmp97_, TRUE);
					}
					_g_ptr_array_unref0 (pkgs);
				} else {
					const gchar* _tmp98_;
					_tmp98_ = title;
					if (g_strcmp0 (_tmp98_, g_dgettext (NULL, "Ignored")) == 0) {
						gchar* _tmp99_;
						GPtrArray* pkgs = NULL;
						GPtrArray* _tmp100_;
						GPtrArray* _tmp101_;
						GPtrArray* _tmp108_;
						GPtrArray* _tmp115_;
						gboolean _tmp122_ = FALSE;
						GtkStack* _tmp123_;
						const gchar* _tmp124_;
						const gchar* _tmp125_;
						GtkButton* _tmp138_;
						_tmp99_ = g_strdup ("ignored_updates");
						_g_free0 (self->priv->current_packages_list_name);
						self->priv->current_packages_list_name = _tmp99_;
						_tmp100_ = g_ptr_array_new_full ((guint) 0, NULL);
						pkgs = _tmp100_;
						_tmp101_ = self->priv->repos_updates;
						{
							GPtrArray* pkg_collection = NULL;
							guint pkg_index = 0U;
							pkg_collection = _tmp101_;
							for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
								PamacAlpmPackage* pkg = NULL;
								pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
								{
									GHashTable* _tmp102_;
									PamacAlpmPackage* _tmp103_;
									const gchar* _tmp104_;
									const gchar* _tmp105_;
									_tmp102_ = pamac_temporary_ignorepkgs;
									_tmp103_ = pkg;
									_tmp104_ = pamac_package_get_name ((PamacPackage*) _tmp103_);
									_tmp105_ = _tmp104_;
									if (g_hash_table_contains (_tmp102_, _tmp105_)) {
										GPtrArray* _tmp106_;
										PamacAlpmPackage* _tmp107_;
										_tmp106_ = pkgs;
										_tmp107_ = pkg;
										g_ptr_array_add (_tmp106_, (PamacPackage*) _tmp107_);
									}
								}
							}
						}
						_tmp108_ = self->priv->aur_updates;
						{
							GPtrArray* pkg_collection = NULL;
							guint pkg_index = 0U;
							pkg_collection = _tmp108_;
							for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
								PamacAURPackage* pkg = NULL;
								pkg = (PamacAURPackage*) g_ptr_array_index (pkg_collection, pkg_index);
								{
									GHashTable* _tmp109_;
									PamacAURPackage* _tmp110_;
									const gchar* _tmp111_;
									const gchar* _tmp112_;
									_tmp109_ = pamac_temporary_ignorepkgs;
									_tmp110_ = pkg;
									_tmp111_ = pamac_package_get_name ((PamacPackage*) _tmp110_);
									_tmp112_ = _tmp111_;
									if (g_hash_table_contains (_tmp109_, _tmp112_)) {
										GPtrArray* _tmp113_;
										PamacAURPackage* _tmp114_;
										_tmp113_ = pkgs;
										_tmp114_ = pkg;
										g_ptr_array_add (_tmp113_, (PamacPackage*) _tmp114_);
									}
								}
							}
						}
						_tmp115_ = self->priv->flatpak_updates;
						{
							GPtrArray* pkg_collection = NULL;
							guint pkg_index = 0U;
							pkg_collection = _tmp115_;
							for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
								PamacFlatpakPackage* pkg = NULL;
								pkg = (PamacFlatpakPackage*) g_ptr_array_index (pkg_collection, pkg_index);
								{
									GHashTable* _tmp116_;
									PamacFlatpakPackage* _tmp117_;
									const gchar* _tmp118_;
									const gchar* _tmp119_;
									_tmp116_ = pamac_temporary_ignorepkgs;
									_tmp117_ = pkg;
									_tmp118_ = pamac_package_get_name ((PamacPackage*) _tmp117_);
									_tmp119_ = _tmp118_;
									if (g_hash_table_contains (_tmp116_, _tmp119_)) {
										GPtrArray* _tmp120_;
										PamacFlatpakPackage* _tmp121_;
										_tmp120_ = pkgs;
										_tmp121_ = pkg;
										g_ptr_array_add (_tmp120_, (PamacPackage*) _tmp121_);
									}
								}
							}
						}
						_tmp123_ = self->view_stack;
						_tmp124_ = gtk_stack_get_visible_child_name (_tmp123_);
						_tmp125_ = _tmp124_;
						if (g_strcmp0 (_tmp125_, "updates") == 0) {
							const gchar* _tmp126_;
							_tmp126_ = self->priv->current_packages_list_name;
							_tmp122_ = g_strcmp0 (_tmp126_, "ignored_updates") == 0;
						} else {
							_tmp122_ = FALSE;
						}
						if (_tmp122_) {
							GPtrArray* _tmp127_;
							gint _tmp128_;
							gint _tmp129_;
							_tmp127_ = pkgs;
							_tmp128_ = vala_g_ptr_array_get_length (_tmp127_);
							_tmp129_ = _tmp128_;
							if (_tmp129_ > 0) {
								HdyViewSwitcherTitle* _tmp130_;
								GPtrArray* _tmp131_;
								_tmp130_ = self->view_stack_switcher;
								hdy_view_switcher_title_set_title (_tmp130_, g_dgettext (NULL, "Ignored"));
								_tmp131_ = pkgs;
								pamac_manager_window_populate_packages_list (self, _tmp131_);
							} else {
								GtkListBox* _tmp132_;
								GtkListBox* _tmp133_;
								GtkListBoxRow* _tmp134_;
								GtkListBox* _tmp135_;
								GtkListBoxRow* _tmp136_;
								_tmp132_ = self->priv->updates_listbox;
								_tmp133_ = self->priv->updates_listbox;
								_tmp134_ = gtk_list_box_get_row_at_index (_tmp133_, 0);
								gtk_list_box_select_row (_tmp132_, _tmp134_);
								_tmp135_ = self->priv->updates_listbox;
								_tmp136_ = gtk_list_box_get_selected_row (_tmp135_);
								pamac_manager_window_on_updates_listbox_row_activated (self, _tmp136_);
							}
						} else {
							GdkWindow* _tmp137_;
							_tmp137_ = gtk_widget_get_window ((GtkWidget*) self);
							gdk_window_set_cursor (_tmp137_, NULL);
						}
						_tmp138_ = self->priv->ignore_all_button;
						gtk_widget_set_visible ((GtkWidget*) _tmp138_, FALSE);
						_g_ptr_array_unref0 (pkgs);
					}
				}
			}
			_g_object_unref0 (simple_row);
			break;
		}
		default:
		{
			break;
		}
	}
	_tmp139_ = self->priv->install_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp139_, FALSE);
	_tmp140_ = self->priv->remove_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp140_, FALSE);
	_tmp142_ = self->browse_flap;
	_tmp143_ = hdy_flap_get_folded (_tmp142_);
	_tmp144_ = _tmp143_;
	if (_tmp144_) {
		HdyFlap* _tmp145_;
		gboolean _tmp146_;
		gboolean _tmp147_;
		_tmp145_ = self->browse_flap;
		_tmp146_ = hdy_flap_get_reveal_flap (_tmp145_);
		_tmp147_ = _tmp146_;
		_tmp141_ = _tmp147_;
	} else {
		_tmp141_ = FALSE;
	}
	if (_tmp141_) {
		HdyFlap* _tmp148_;
		_tmp148_ = self->browse_flap;
		hdy_flap_set_reveal_flap (_tmp148_, FALSE);
	}
}

static void
_pamac_manager_window_on_updates_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                   GtkListBoxRow* row,
                                                                                   gpointer self)
{
	pamac_manager_window_on_updates_listbox_row_activated ((PamacManagerWindow*) self, row);
}

static Block24Data*
block24_data_ref (Block24Data* _data24_)
{
	g_atomic_int_inc (&_data24_->_ref_count_);
	return _data24_;
}

static void
block24_data_unref (void * _userdata_)
{
	Block24Data* _data24_;
	_data24_ = (Block24Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data24_->self;
		_g_object_unref0 (self);
		g_slice_free (Block24Data, _data24_);
	}
}

static void
__lambda28_ (Block24Data* _data24_,
             GObject* obj,
             GAsyncResult* res)
{
	PamacManagerWindow* self;
	GPtrArray* pkgs = NULL;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GtkStack* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	self = _data24_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_repo_pkgs_finish ((PamacDatabase*) _tmp0_, res);
	pkgs = _tmp1_;
	_tmp3_ = self->view_stack;
	_tmp4_ = gtk_stack_get_visible_child_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "browse") == 0) {
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp6_ = self->priv->current_packages_list_name;
		_tmp7_ = _data24_->repo;
		_tmp8_ = g_strdup_printf ("repo_%s", _tmp7_);
		_tmp9_ = _tmp8_;
		_tmp2_ = g_strcmp0 (_tmp6_, _tmp9_) == 0;
		_g_free0 (_tmp9_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		HdyViewSwitcherTitle* _tmp10_;
		const gchar* _tmp11_;
		GPtrArray* _tmp12_;
		_tmp10_ = self->view_stack_switcher;
		_tmp11_ = _data24_->repo;
		hdy_view_switcher_title_set_title (_tmp10_, _tmp11_);
		_tmp12_ = pkgs;
		pamac_manager_window_populate_packages_list (self, _tmp12_);
	} else {
		GdkWindow* _tmp13_;
		_tmp13_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp13_, NULL);
	}
	_g_ptr_array_unref0 (pkgs);
}

static void
___lambda28__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda28_ (self, source_object, res);
	block24_data_unref (self);
}

static void
pamac_manager_window_on_repos_listbox_row_activated (PamacManagerWindow* self,
                                                     GtkListBoxRow* row)
{
	Block24Data* _data24_;
	PamacSimpleRow* simple_row = NULL;
	PamacSimpleRow* _tmp2_;
	PamacSimpleRow* _tmp3_;
	GdkWindow* _tmp4_;
	GdkDisplay* _tmp5_;
	GdkCursor* _tmp6_;
	GdkCursor* _tmp7_;
	PamacSimpleRow* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	PamacDatabaseGtk* _tmp13_;
	const gchar* _tmp14_;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	GtkButton* _tmp17_;
	gboolean _tmp18_ = FALSE;
	HdyFlap* _tmp19_;
	gboolean _tmp20_;
	gboolean _tmp21_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_data24_ = g_slice_new0 (Block24Data);
	_data24_->_ref_count_ = 1;
	_data24_->self = g_object_ref (self);
	if (PAMAC_IS_BACK_ROW (row)) {
		GtkListBox* _tmp0_;
		GtkStack* _tmp1_;
		_tmp0_ = self->priv->filters_listbox;
		gtk_list_box_select_row (_tmp0_, NULL);
		_tmp1_ = self->priv->browse_stack;
		gtk_stack_set_visible_child_name (_tmp1_, "filters");
		block24_data_unref (_data24_);
		_data24_ = NULL;
		return;
	}
	_tmp2_ = _g_object_ref0 (PAMAC_IS_SIMPLE_ROW (row) ? ((PamacSimpleRow*) row) : NULL);
	simple_row = _tmp2_;
	_tmp3_ = simple_row;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (simple_row);
		block24_data_unref (_data24_);
		_data24_ = NULL;
		return;
	}
	_tmp4_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp5_ = gdk_display_get_default ();
	_tmp6_ = gdk_cursor_new_for_display (_tmp5_, GDK_WATCH);
	_tmp7_ = _tmp6_;
	gdk_window_set_cursor (_tmp4_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = simple_row;
	_tmp9_ = pamac_simple_row_get_title (_tmp8_);
	_tmp10_ = _tmp9_;
	_data24_->repo = _tmp10_;
	_tmp11_ = _data24_->repo;
	_tmp12_ = g_strdup_printf ("repo_%s", _tmp11_);
	_g_free0 (self->priv->current_packages_list_name);
	self->priv->current_packages_list_name = _tmp12_;
	_tmp13_ = self->priv->_database;
	_tmp14_ = _data24_->repo;
	pamac_database_get_repo_pkgs_async ((PamacDatabase*) _tmp13_, _tmp14_, ___lambda28__gasync_ready_callback, block24_data_ref (_data24_));
	_tmp15_ = self->priv->install_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp15_, FALSE);
	_tmp16_ = self->priv->remove_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp16_, FALSE);
	_tmp17_ = self->priv->ignore_all_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp17_, FALSE);
	_tmp19_ = self->browse_flap;
	_tmp20_ = hdy_flap_get_folded (_tmp19_);
	_tmp21_ = _tmp20_;
	if (_tmp21_) {
		HdyFlap* _tmp22_;
		gboolean _tmp23_;
		gboolean _tmp24_;
		_tmp22_ = self->browse_flap;
		_tmp23_ = hdy_flap_get_reveal_flap (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp18_ = _tmp24_;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		HdyFlap* _tmp25_;
		_tmp25_ = self->browse_flap;
		hdy_flap_set_reveal_flap (_tmp25_, FALSE);
	}
	_g_object_unref0 (simple_row);
	block24_data_unref (_data24_);
	_data24_ = NULL;
}

static void
_pamac_manager_window_on_repos_listbox_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                 GtkListBoxRow* row,
                                                                                 gpointer self)
{
	pamac_manager_window_on_repos_listbox_row_activated ((PamacManagerWindow*) self, row);
}

static void
pamac_manager_window_on_main_stack_visible_child_changed (PamacManagerWindow* self)
{
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GQuark _tmp5_ = 0U;
	static GQuark _tmp4_label0 = 0;
	static GQuark _tmp4_label1 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->main_stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_);
	if (_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("browse")))) {
		switch (0) {
			default:
			{
				PamacTransactionGtk* _tmp6_;
				GtkTextView* _tmp7_;
				GtkTextBuffer* _tmp8_;
				GtkTextBuffer* _tmp9_;
				_tmp6_ = self->transaction;
				_tmp7_ = _tmp6_->details_textview;
				_tmp8_ = gtk_text_view_get_buffer (_tmp7_);
				_tmp9_ = _tmp8_;
				if (gtk_text_buffer_get_char_count (_tmp9_) > 0) {
					GtkButton* _tmp10_;
					_tmp10_ = self->details_button;
					gtk_widget_set_sensitive ((GtkWidget*) _tmp10_, TRUE);
				}
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("term")))) {
		switch (0) {
			default:
			{
				GtkSearchEntry* _tmp11_;
				HdyViewSwitcherTitle* _tmp12_;
				GtkButton* _tmp13_;
				GtkButton* _tmp14_;
				GtkButton* _tmp15_;
				GtkButton* _tmp16_;
				GtkStyleContext* _tmp17_;
				GtkButton* _tmp18_;
				_tmp11_ = self->search_entry;
				gtk_widget_set_visible ((GtkWidget*) _tmp11_, FALSE);
				_tmp12_ = self->view_stack_switcher;
				gtk_widget_set_visible ((GtkWidget*) _tmp12_, FALSE);
				_tmp13_ = self->button_back;
				gtk_widget_set_visible ((GtkWidget*) _tmp13_, TRUE);
				_tmp14_ = self->search_button;
				gtk_widget_set_visible ((GtkWidget*) _tmp14_, FALSE);
				_tmp15_ = self->details_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp15_, FALSE);
				_tmp16_ = self->details_button;
				_tmp17_ = gtk_widget_get_style_context ((GtkWidget*) _tmp16_);
				gtk_style_context_remove_class (_tmp17_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
				_tmp18_ = self->details_button;
				gtk_button_set_relief (_tmp18_, GTK_RELIEF_NONE);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				break;
			}
		}
	}
}

static void
pamac_manager_window_on_view_stack_visible_child_changed (PamacManagerWindow* self)
{
	g_return_if_fail (self != NULL);
	pamac_manager_window_refresh_packages_list (self);
}

static void
pamac_manager_window_on_packages_leaflet_folded_changed (PamacManagerWindow* self)
{
	HdyLeaflet* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->packages_leaflet;
	_tmp1_ = hdy_leaflet_get_folded (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkToggleButton* _tmp3_;
		_tmp3_ = self->priv->reveal_details_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp3_, FALSE);
	} else {
		gboolean _tmp4_ = FALSE;
		HdyFlap* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = self->browse_flap;
		_tmp6_ = gtk_widget_get_visible ((GtkWidget*) _tmp5_);
		_tmp7_ = _tmp6_;
		if (_tmp7_ == TRUE) {
			GtkBox* _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp10_;
			_tmp8_ = self->main_details_box;
			_tmp9_ = gtk_widget_get_visible ((GtkWidget*) _tmp8_);
			_tmp10_ = _tmp9_;
			_tmp4_ = _tmp10_ == TRUE;
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			gboolean _tmp11_;
			HdyLeaflet* _tmp15_;
			GtkStack* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			_tmp11_ = self->priv->_mobile;
			if (_tmp11_) {
				GtkToggleButton* _tmp12_;
				GtkBox* _tmp13_;
				_tmp12_ = self->priv->reveal_details_button;
				gtk_widget_set_visible ((GtkWidget*) _tmp12_, FALSE);
				_tmp13_ = self->main_details_box;
				gtk_widget_set_visible ((GtkWidget*) _tmp13_, FALSE);
			} else {
				GtkToggleButton* _tmp14_;
				_tmp14_ = self->priv->reveal_details_button;
				gtk_widget_set_visible ((GtkWidget*) _tmp14_, TRUE);
				pamac_manager_window_set_adaptative_details (self, FALSE);
			}
			_tmp15_ = self->packages_leaflet;
			hdy_leaflet_set_visible_child_name (_tmp15_, "list");
			_tmp16_ = self->view_stack;
			_tmp17_ = gtk_stack_get_visible_child_name (_tmp16_);
			_tmp18_ = _tmp17_;
			if (g_strcmp0 (_tmp18_, "search") == 0) {
				GtkSearchEntry* _tmp19_;
				_tmp19_ = self->search_entry;
				gtk_widget_set_visible ((GtkWidget*) _tmp19_, TRUE);
			} else {
				GtkStack* _tmp20_;
				const gchar* _tmp21_;
				const gchar* _tmp22_;
				_tmp20_ = self->view_stack;
				_tmp21_ = gtk_stack_get_visible_child_name (_tmp20_);
				_tmp22_ = _tmp21_;
				if (g_strcmp0 (_tmp22_, "updates") == 0) {
					HdyViewSwitcherTitle* _tmp23_;
					GtkButton* _tmp24_;
					GtkButton* _tmp25_;
					_tmp23_ = self->view_stack_switcher;
					gtk_widget_set_visible ((GtkWidget*) _tmp23_, TRUE);
					_tmp24_ = self->button_back;
					gtk_widget_set_visible ((GtkWidget*) _tmp24_, FALSE);
					_tmp25_ = self->search_button;
					gtk_widget_set_visible ((GtkWidget*) _tmp25_, FALSE);
				} else {
					HdyViewSwitcherTitle* _tmp26_;
					GtkButton* _tmp27_;
					GtkButton* _tmp28_;
					_tmp26_ = self->view_stack_switcher;
					gtk_widget_set_visible ((GtkWidget*) _tmp26_, TRUE);
					_tmp27_ = self->button_back;
					gtk_widget_set_visible ((GtkWidget*) _tmp27_, FALSE);
					_tmp28_ = self->search_button;
					gtk_widget_set_visible ((GtkWidget*) _tmp28_, TRUE);
				}
			}
		} else {
			gboolean _tmp29_;
			_tmp29_ = self->priv->_mobile;
			if (!_tmp29_) {
				GtkToggleButton* _tmp30_;
				_tmp30_ = self->priv->reveal_details_button;
				gtk_widget_set_visible ((GtkWidget*) _tmp30_, TRUE);
			}
		}
	}
}

void
pamac_manager_window_set_adaptative_details (PamacManagerWindow* self,
                                             gboolean enabled)
{
	g_return_if_fail (self != NULL);
	if (enabled) {
		GtkBox* _tmp0_;
		_tmp0_ = self->main_details_box;
		gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	} else {
		GtkBox* _tmp1_;
		_tmp1_ = self->main_details_box;
		gtk_widget_set_hexpand ((GtkWidget*) _tmp1_, FALSE);
	}
}

static void
pamac_manager_window_on_menu_button_toggled (PamacManagerWindow* self)
{
	GtkMenuButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->menu_button;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GSimpleAction* _tmp3_;
		GSimpleAction* _tmp4_;
		GSimpleAction* _tmp5_;
		_tmp3_ = self->priv->preferences_action;
		g_simple_action_set_enabled (_tmp3_, !self->transaction_running);
		_tmp4_ = self->priv->refresh_action;
		g_simple_action_set_enabled (_tmp4_, !self->transaction_running);
		_tmp5_ = self->priv->install_local_action;
		g_simple_action_set_enabled (_tmp5_, !self->transaction_running);
	}
}

static void
_pamac_manager_window_on_menu_button_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                        gpointer self)
{
	pamac_manager_window_on_menu_button_toggled ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_details_button_clicked (PamacManagerWindow* self)
{
	GtkStack* _tmp0_;
	g_return_if_fail (self != NULL);
	self->important_details = FALSE;
	_tmp0_ = self->main_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "term");
}

static void
_pamac_manager_window_on_details_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self)
{
	pamac_manager_window_on_details_button_clicked ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_get_category_pkgs_data_free (gpointer _data)
{
	PamacManagerWindowGetCategoryPkgsData* _data_;
	_data_ = _data;
	_g_free0 (_data_->category);
	_g_ptr_array_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacManagerWindowGetCategoryPkgsData, _data_);
}

static void
pamac_manager_window_get_category_pkgs (PamacManagerWindow* self,
                                        const gchar* category,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	PamacManagerWindowGetCategoryPkgsData* _data_;
	PamacManagerWindow* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (category != NULL);
	_data_ = g_slice_new0 (PamacManagerWindowGetCategoryPkgsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_manager_window_get_category_pkgs_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (category);
	_g_free0 (_data_->category);
	_data_->category = _tmp1_;
	pamac_manager_window_get_category_pkgs_co (_data_);
}

static GPtrArray*
pamac_manager_window_get_category_pkgs_finish (PamacManagerWindow* self,
                                               GAsyncResult* _res_)
{
	GPtrArray* result;
	PamacManagerWindowGetCategoryPkgsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static Block25Data*
block25_data_ref (Block25Data* _data25_)
{
	g_atomic_int_inc (&_data25_->_ref_count_);
	return _data25_;
}

static void
block25_data_unref (void * _userdata_)
{
	Block25Data* _data25_;
	_data25_ = (Block25Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data25_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data25_->self;
		_g_ptr_array_unref0 (_data25_->flatpaks);
		_g_ptr_array_unref0 (_data25_->snaps);
		_g_ptr_array_unref0 (_data25_->pkgs);
		_g_object_unref0 (self);
		g_slice_free (Block25Data, _data25_);
	}
}

static void
pamac_manager_window_get_category_pkgs_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	PamacManagerWindowGetCategoryPkgsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_manager_window_get_category_pkgs_co (_data_);
}

static void
__lambda11_ (Block25Data* _data25_,
             GObject* obj,
             GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data25_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_category_pkgs_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data25_->pkgs);
	_data25_->pkgs = _tmp1_;
	pamac_manager_window_get_category_pkgs_co (_data25_->_async_data_);
}

static void
___lambda11__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda11_ (self, source_object, res);
	block25_data_unref (self);
}

static void
___lambda12_ (Block25Data* _data25_,
              GObject* obj,
              GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data25_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_category_snaps_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data25_->snaps);
	_data25_->snaps = _tmp1_;
	pamac_manager_window_get_category_pkgs_co (_data25_->_async_data_);
}

static void
____lambda12__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda12_ (self, source_object, res);
	block25_data_unref (self);
}

static void
___lambda13_ (Block25Data* _data25_,
              GObject* obj,
              GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	GPtrArray* _tmp1_;
	self = _data25_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_category_flatpaks_finish ((PamacDatabase*) _tmp0_, res);
	_g_ptr_array_unref0 (_data25_->flatpaks);
	_data25_->flatpaks = _tmp1_;
	pamac_manager_window_get_category_pkgs_co (_data25_->_async_data_);
}

static void
____lambda13__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda13_ (self, source_object, res);
	block25_data_unref (self);
}

static gboolean
pamac_manager_window_get_category_pkgs_co (PamacManagerWindowGetCategoryPkgsData* _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;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data25_ = g_slice_new0 (Block25Data);
	_data_->_data25_->_ref_count_ = 1;
	_data_->_data25_->self = g_object_ref (_data_->self);
	_data_->_data25_->_async_data_ = _data_;
	if (g_strcmp0 (_data_->category, "Pending") == 0) {
		_data_->_state_ = 1;
		pamac_manager_window_get_pending_pkgs (_data_->self, pamac_manager_window_get_category_pkgs_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp0_ = pamac_manager_window_get_pending_pkgs_finish (_data_->self, _data_->_res_);
		_data_->result = _data_->_tmp0_;
		block25_data_unref (_data_->_data25_);
		_data_->_data25_ = 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_->_tmp1_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data25_->pkgs = _data_->_tmp1_;
	_data_->_tmp2_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data25_->snaps = _data_->_tmp2_;
	_data_->_tmp3_ = g_ptr_array_new_full ((guint) 0, NULL);
	_data_->_data25_->flatpaks = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->self->priv->_database;
	pamac_database_get_category_pkgs_async ((PamacDatabase*) _data_->_tmp4_, _data_->category, ___lambda11__gasync_ready_callback, block25_data_ref (_data_->_data25_));
	_data_->_tmp5_ = _data_->self->priv->_database;
	_data_->_tmp6_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = pamac_config_get_enable_snap (_data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	if (_data_->_tmp9_) {
		_data_->_tmp10_ = _data_->self->priv->_database;
		pamac_database_get_category_snaps_async ((PamacDatabase*) _data_->_tmp10_, _data_->category, ____lambda12__gasync_ready_callback, block25_data_ref (_data_->_data25_));
	}
	_data_->_tmp11_ = _data_->self->priv->_database;
	_data_->_tmp12_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp11_);
	_data_->_tmp13_ = _data_->_tmp12_;
	_data_->_tmp14_ = pamac_config_get_enable_flatpak (_data_->_tmp13_);
	_data_->_tmp15_ = _data_->_tmp14_;
	if (_data_->_tmp15_) {
		_data_->_tmp16_ = _data_->self->priv->_database;
		pamac_database_get_category_flatpaks_async ((PamacDatabase*) _data_->_tmp16_, _data_->category, ____lambda13__gasync_ready_callback, block25_data_ref (_data_->_data25_));
	}
	_data_->_state_ = 2;
	return FALSE;
	_state_2:
	;
	_data_->_tmp17_ = _data_->self->priv->_database;
	_data_->_tmp18_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp17_);
	_data_->_tmp19_ = _data_->_tmp18_;
	_data_->_tmp20_ = pamac_config_get_enable_snap (_data_->_tmp19_);
	_data_->_tmp21_ = _data_->_tmp20_;
	if (_data_->_tmp21_) {
		_data_->_state_ = 3;
		return FALSE;
		_state_3:
		;
	}
	_data_->_tmp22_ = _data_->self->priv->_database;
	_data_->_tmp23_ = pamac_database_get_config ((PamacDatabase*) _data_->_tmp22_);
	_data_->_tmp24_ = _data_->_tmp23_;
	_data_->_tmp25_ = pamac_config_get_enable_flatpak (_data_->_tmp24_);
	_data_->_tmp26_ = _data_->_tmp25_;
	if (_data_->_tmp26_) {
		_data_->_state_ = 4;
		return FALSE;
		_state_4:
		;
	}
	_data_->_tmp27_ = _data_->_data25_->pkgs;
	_data_->_tmp28_ = _data_->_data25_->snaps;
	g_ptr_array_extend (_data_->_tmp27_, _data_->_tmp28_, NULL, NULL);
	_data_->_tmp29_ = _data_->_data25_->pkgs;
	_data_->_tmp30_ = _data_->_data25_->flatpaks;
	g_ptr_array_extend (_data_->_tmp29_, _data_->_tmp30_, NULL, NULL);
	_data_->_tmp31_ = _data_->_data25_->pkgs;
	_data_->_tmp32_ = _g_ptr_array_ref0 (_data_->_tmp31_);
	_data_->result = _data_->_tmp32_;
	block25_data_unref (_data_->_data25_);
	_data_->_data25_ = 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
____lambda83_ (PamacManagerWindow* self)
{
	pamac_manager_window_run_transaction (self, FALSE);
}

static void
_____lambda83__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda83_ ((PamacManagerWindow*) self);
	g_object_unref (self);
}

static void
pamac_manager_window_on_apply_button_clicked (PamacManagerWindow* self)
{
	GtkButton* _tmp0_;
	GtkStack* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->details_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, TRUE);
	_tmp1_ = self->view_stack;
	_tmp2_ = gtk_stack_get_visible_child_name (_tmp1_);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp3_, "updates") == 0) {
		pamac_manager_window_run_sysupgrade (self, FALSE, TRUE);
	} else {
		gboolean _tmp4_ = FALSE;
		HdyLeaflet* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = self->packages_leaflet;
		_tmp6_ = hdy_leaflet_get_visible_child_name (_tmp5_);
		_tmp7_ = _tmp6_;
		if (g_strcmp0 (_tmp7_, "details") == 0) {
			GtkStack* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			_tmp8_ = self->priv->properties_stack;
			_tmp9_ = gtk_stack_get_visible_child_name (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp4_ = g_strcmp0 (_tmp10_, "build_files") == 0;
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			PamacTransactionGtk* _tmp11_;
			PamacPackage* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			_tmp11_ = self->transaction;
			_tmp12_ = self->priv->current_package_displayed;
			_tmp13_ = pamac_package_get_name (_tmp12_);
			_tmp14_ = _tmp13_;
			pamac_transaction_gtk_save_build_files_async (_tmp11_, _tmp14_, _____lambda83__gasync_ready_callback, g_object_ref (self));
		} else {
			pamac_manager_window_run_transaction (self, FALSE);
		}
	}
}

static void
_pamac_manager_window_on_apply_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	pamac_manager_window_on_apply_button_clicked ((PamacManagerWindow*) self);
}

static void
__lambda61_ (PamacManagerWindow* self,
             GObject* obj,
             GAsyncResult* res)
{
	gboolean success = FALSE;
	PamacTransactionGtk* _tmp0_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->transaction;
	success = pamac_transaction_run_finish ((PamacTransaction*) _tmp0_, res);
	pamac_manager_window_on_transaction_finished (self, success);
}

static void
___lambda61__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda61_ ((PamacManagerWindow*) self, source_object, res);
	g_object_unref (self);
}

static void
pamac_manager_window_run_transaction (PamacManagerWindow* self,
                                      gboolean no_confirm_upgrade)
{
	PamacTransactionGtk* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GHashTable* _tmp36_;
	GList* _tmp37_;
	GHashTable* _tmp47_;
	GList* _tmp48_;
	GHashTable* _tmp58_;
	GList* _tmp59_;
	GHashTable* _tmp69_;
	GList* _tmp70_;
	PamacTransactionGtk* _tmp80_;
	PamacTransactionGtk* _tmp81_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->transaction;
	pamac_transaction_gtk_set_no_confirm_upgrade (_tmp0_, no_confirm_upgrade);
	self->transaction_running = TRUE;
	_tmp1_ = self->apply_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, FALSE);
	_tmp2_ = self->priv->cancel_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE);
	{
		GHashTableIter _name_it = {0};
		GHashTable* _tmp3_;
		GHashTableIter _tmp4_ = {0};
		const gchar* name = NULL;
		_tmp3_ = pamac_to_install;
		g_hash_table_iter_init (&_tmp4_, _tmp3_);
		_name_it = _tmp4_;
		while (TRUE) {
			gconstpointer _tmp5_;
			const gchar* _tmp6_;
			PamacTransactionGtk* _tmp7_;
			const gchar* _tmp8_;
			GHashTable* _tmp9_;
			const gchar* _tmp10_;
			gchar* _tmp11_;
			_tmp5_ = _vala_hash_set_next_value (&_name_it);
			name = (const gchar*) _tmp5_;
			_tmp6_ = name;
			if (!(_tmp6_ != NULL)) {
				break;
			}
			_tmp7_ = self->transaction;
			_tmp8_ = name;
			pamac_transaction_add_pkg_to_install ((PamacTransaction*) _tmp7_, _tmp8_);
			_tmp9_ = self->priv->previous_to_install;
			_tmp10_ = name;
			_tmp11_ = g_strdup (_tmp10_);
			g_hash_table_add (_tmp9_, _tmp11_);
		}
	}
	{
		GHashTableIter _name_it = {0};
		GHashTable* _tmp12_;
		GHashTableIter _tmp13_ = {0};
		const gchar* name = NULL;
		_tmp12_ = pamac_to_remove;
		g_hash_table_iter_init (&_tmp13_, _tmp12_);
		_name_it = _tmp13_;
		while (TRUE) {
			gconstpointer _tmp14_;
			const gchar* _tmp15_;
			PamacTransactionGtk* _tmp16_;
			const gchar* _tmp17_;
			GHashTable* _tmp18_;
			const gchar* _tmp19_;
			gchar* _tmp20_;
			_tmp14_ = _vala_hash_set_next_value (&_name_it);
			name = (const gchar*) _tmp14_;
			_tmp15_ = name;
			if (!(_tmp15_ != NULL)) {
				break;
			}
			_tmp16_ = self->transaction;
			_tmp17_ = name;
			pamac_transaction_add_pkg_to_remove ((PamacTransaction*) _tmp16_, _tmp17_);
			_tmp18_ = self->priv->previous_to_remove;
			_tmp19_ = name;
			_tmp20_ = g_strdup (_tmp19_);
			g_hash_table_add (_tmp18_, _tmp20_);
		}
	}
	{
		GHashTableIter _path_it = {0};
		GHashTable* _tmp21_;
		GHashTableIter _tmp22_ = {0};
		const gchar* path = NULL;
		_tmp21_ = pamac_to_load;
		g_hash_table_iter_init (&_tmp22_, _tmp21_);
		_path_it = _tmp22_;
		while (TRUE) {
			gconstpointer _tmp23_;
			const gchar* _tmp24_;
			PamacTransactionGtk* _tmp25_;
			const gchar* _tmp26_;
			_tmp23_ = _vala_hash_set_next_value (&_path_it);
			path = (const gchar*) _tmp23_;
			_tmp24_ = path;
			if (!(_tmp24_ != NULL)) {
				break;
			}
			_tmp25_ = self->transaction;
			_tmp26_ = path;
			pamac_transaction_add_path_to_load ((PamacTransaction*) _tmp25_, _tmp26_);
		}
	}
	{
		GHashTableIter _name_it = {0};
		GHashTable* _tmp27_;
		GHashTableIter _tmp28_ = {0};
		const gchar* name = NULL;
		_tmp27_ = pamac_to_build;
		g_hash_table_iter_init (&_tmp28_, _tmp27_);
		_name_it = _tmp28_;
		while (TRUE) {
			gconstpointer _tmp29_;
			const gchar* _tmp30_;
			PamacTransactionGtk* _tmp31_;
			const gchar* _tmp32_;
			GHashTable* _tmp33_;
			const gchar* _tmp34_;
			gchar* _tmp35_;
			_tmp29_ = _vala_hash_set_next_value (&_name_it);
			name = (const gchar*) _tmp29_;
			_tmp30_ = name;
			if (!(_tmp30_ != NULL)) {
				break;
			}
			_tmp31_ = self->transaction;
			_tmp32_ = name;
			pamac_transaction_add_pkg_to_build ((PamacTransaction*) _tmp31_, _tmp32_, TRUE, TRUE);
			_tmp33_ = self->priv->previous_to_build;
			_tmp34_ = name;
			_tmp35_ = g_strdup (_tmp34_);
			g_hash_table_add (_tmp33_, _tmp35_);
		}
	}
	_tmp36_ = pamac_snap_to_install;
	_tmp37_ = g_hash_table_get_values (_tmp36_);
	{
		GList* pkg_collection = NULL;
		GList* pkg_it = NULL;
		pkg_collection = _tmp37_;
		for (pkg_it = pkg_collection; pkg_it != NULL; pkg_it = pkg_it->next) {
			PamacSnapPackage* pkg = NULL;
			pkg = (PamacSnapPackage*) pkg_it->data;
			{
				PamacTransactionGtk* _tmp38_;
				PamacSnapPackage* _tmp39_;
				GHashTable* _tmp40_;
				PamacSnapPackage* _tmp41_;
				const gchar* _tmp42_;
				const gchar* _tmp43_;
				gchar* _tmp44_;
				PamacSnapPackage* _tmp45_;
				PamacSnapPackage* _tmp46_;
				_tmp38_ = self->transaction;
				_tmp39_ = pkg;
				pamac_transaction_add_snap_to_install ((PamacTransaction*) _tmp38_, _tmp39_);
				_tmp40_ = self->priv->previous_snap_to_install;
				_tmp41_ = pkg;
				_tmp42_ = pamac_package_get_name ((PamacPackage*) _tmp41_);
				_tmp43_ = _tmp42_;
				_tmp44_ = g_strdup (_tmp43_);
				_tmp45_ = pkg;
				_tmp46_ = _g_object_ref0 (_tmp45_);
				g_hash_table_insert (_tmp40_, _tmp44_, _tmp46_);
			}
		}
		(pkg_collection == NULL) ? NULL : (pkg_collection = (g_list_free (pkg_collection), NULL));
	}
	_tmp47_ = pamac_snap_to_remove;
	_tmp48_ = g_hash_table_get_values (_tmp47_);
	{
		GList* pkg_collection = NULL;
		GList* pkg_it = NULL;
		pkg_collection = _tmp48_;
		for (pkg_it = pkg_collection; pkg_it != NULL; pkg_it = pkg_it->next) {
			PamacSnapPackage* pkg = NULL;
			pkg = (PamacSnapPackage*) pkg_it->data;
			{
				PamacTransactionGtk* _tmp49_;
				PamacSnapPackage* _tmp50_;
				GHashTable* _tmp51_;
				PamacSnapPackage* _tmp52_;
				const gchar* _tmp53_;
				const gchar* _tmp54_;
				gchar* _tmp55_;
				PamacSnapPackage* _tmp56_;
				PamacSnapPackage* _tmp57_;
				_tmp49_ = self->transaction;
				_tmp50_ = pkg;
				pamac_transaction_add_snap_to_remove ((PamacTransaction*) _tmp49_, _tmp50_);
				_tmp51_ = self->priv->previous_snap_to_remove;
				_tmp52_ = pkg;
				_tmp53_ = pamac_package_get_name ((PamacPackage*) _tmp52_);
				_tmp54_ = _tmp53_;
				_tmp55_ = g_strdup (_tmp54_);
				_tmp56_ = pkg;
				_tmp57_ = _g_object_ref0 (_tmp56_);
				g_hash_table_insert (_tmp51_, _tmp55_, _tmp57_);
			}
		}
		(pkg_collection == NULL) ? NULL : (pkg_collection = (g_list_free (pkg_collection), NULL));
	}
	_tmp58_ = pamac_flatpak_to_install;
	_tmp59_ = g_hash_table_get_values (_tmp58_);
	{
		GList* pkg_collection = NULL;
		GList* pkg_it = NULL;
		pkg_collection = _tmp59_;
		for (pkg_it = pkg_collection; pkg_it != NULL; pkg_it = pkg_it->next) {
			PamacFlatpakPackage* pkg = NULL;
			pkg = (PamacFlatpakPackage*) pkg_it->data;
			{
				PamacTransactionGtk* _tmp60_;
				PamacFlatpakPackage* _tmp61_;
				GHashTable* _tmp62_;
				PamacFlatpakPackage* _tmp63_;
				const gchar* _tmp64_;
				const gchar* _tmp65_;
				gchar* _tmp66_;
				PamacFlatpakPackage* _tmp67_;
				PamacFlatpakPackage* _tmp68_;
				_tmp60_ = self->transaction;
				_tmp61_ = pkg;
				pamac_transaction_add_flatpak_to_install ((PamacTransaction*) _tmp60_, _tmp61_);
				_tmp62_ = self->priv->previous_flatpak_to_install;
				_tmp63_ = pkg;
				_tmp64_ = pamac_package_get_id ((PamacPackage*) _tmp63_);
				_tmp65_ = _tmp64_;
				_tmp66_ = g_strdup (_tmp65_);
				_tmp67_ = pkg;
				_tmp68_ = _g_object_ref0 (_tmp67_);
				g_hash_table_insert (_tmp62_, _tmp66_, _tmp68_);
			}
		}
		(pkg_collection == NULL) ? NULL : (pkg_collection = (g_list_free (pkg_collection), NULL));
	}
	_tmp69_ = pamac_flatpak_to_remove;
	_tmp70_ = g_hash_table_get_values (_tmp69_);
	{
		GList* pkg_collection = NULL;
		GList* pkg_it = NULL;
		pkg_collection = _tmp70_;
		for (pkg_it = pkg_collection; pkg_it != NULL; pkg_it = pkg_it->next) {
			PamacFlatpakPackage* pkg = NULL;
			pkg = (PamacFlatpakPackage*) pkg_it->data;
			{
				PamacTransactionGtk* _tmp71_;
				PamacFlatpakPackage* _tmp72_;
				GHashTable* _tmp73_;
				PamacFlatpakPackage* _tmp74_;
				const gchar* _tmp75_;
				const gchar* _tmp76_;
				gchar* _tmp77_;
				PamacFlatpakPackage* _tmp78_;
				PamacFlatpakPackage* _tmp79_;
				_tmp71_ = self->transaction;
				_tmp72_ = pkg;
				pamac_transaction_add_flatpak_to_remove ((PamacTransaction*) _tmp71_, _tmp72_);
				_tmp73_ = self->priv->previous_flatpak_to_remove;
				_tmp74_ = pkg;
				_tmp75_ = pamac_package_get_id ((PamacPackage*) _tmp74_);
				_tmp76_ = _tmp75_;
				_tmp77_ = g_strdup (_tmp76_);
				_tmp78_ = pkg;
				_tmp79_ = _g_object_ref0 (_tmp78_);
				g_hash_table_insert (_tmp73_, _tmp77_, _tmp79_);
			}
		}
		(pkg_collection == NULL) ? NULL : (pkg_collection = (g_list_free (pkg_collection), NULL));
	}
	pamac_manager_window_clear_lists (self);
	_tmp80_ = self->transaction;
	pamac_transaction_set_install_if_needed ((PamacTransaction*) _tmp80_, FALSE);
	_tmp81_ = self->transaction;
	pamac_transaction_run_async ((PamacTransaction*) _tmp81_, ___lambda61__gasync_ready_callback, g_object_ref (self));
}

static void
pamac_manager_window_run_sysupgrade (PamacManagerWindow* self,
                                     gboolean force_refresh,
                                     gboolean no_confirm_upgrade)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GPtrArray* _tmp15_;
	g_return_if_fail (self != NULL);
	if (force_refresh) {
		_tmp1_ = TRUE;
	} else {
		GPtrArray* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->repos_updates;
		_tmp3_ = vala_g_ptr_array_get_length (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp1_ = _tmp4_ > 0;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		GPtrArray* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		_tmp5_ = self->priv->aur_updates;
		_tmp6_ = vala_g_ptr_array_get_length (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp0_ = _tmp7_ > 0;
	}
	if (_tmp0_) {
		PamacTransactionGtk* _tmp14_;
		{
			GHashTableIter _name_it = {0};
			GHashTable* _tmp8_;
			GHashTableIter _tmp9_ = {0};
			const gchar* name = NULL;
			_tmp8_ = pamac_temporary_ignorepkgs;
			g_hash_table_iter_init (&_tmp9_, _tmp8_);
			_name_it = _tmp9_;
			while (TRUE) {
				gconstpointer _tmp10_;
				const gchar* _tmp11_;
				PamacTransactionGtk* _tmp12_;
				const gchar* _tmp13_;
				_tmp10_ = _vala_hash_set_next_value (&_name_it);
				name = (const gchar*) _tmp10_;
				_tmp11_ = name;
				if (!(_tmp11_ != NULL)) {
					break;
				}
				_tmp12_ = self->transaction;
				_tmp13_ = name;
				pamac_transaction_add_temporary_ignore_pkg ((PamacTransaction*) _tmp12_, _tmp13_);
			}
		}
		_tmp14_ = self->transaction;
		pamac_transaction_add_pkgs_to_upgrade ((PamacTransaction*) _tmp14_, force_refresh);
	}
	_tmp15_ = self->priv->flatpak_updates;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp15_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacFlatpakPackage* pkg = NULL;
			pkg = (PamacFlatpakPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GHashTable* _tmp16_;
				PamacFlatpakPackage* _tmp17_;
				const gchar* _tmp18_;
				const gchar* _tmp19_;
				_tmp16_ = pamac_temporary_ignorepkgs;
				_tmp17_ = pkg;
				_tmp18_ = pamac_package_get_name ((PamacPackage*) _tmp17_);
				_tmp19_ = _tmp18_;
				if (!g_hash_table_contains (_tmp16_, _tmp19_)) {
					PamacTransactionGtk* _tmp20_;
					PamacFlatpakPackage* _tmp21_;
					_tmp20_ = self->transaction;
					_tmp21_ = pkg;
					pamac_transaction_add_flatpak_to_upgrade ((PamacTransaction*) _tmp20_, _tmp21_);
				}
			}
		}
	}
	pamac_manager_window_run_transaction (self, no_confirm_upgrade);
}

static void
pamac_manager_window_on_cancel_button_clicked (PamacManagerWindow* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->waiting) {
		PamacTransactionGtk* _tmp0_;
		PamacTransactionGtk* _tmp1_;
		self->priv->waiting = FALSE;
		_tmp0_ = self->transaction;
		pamac_transaction_cancel ((PamacTransaction*) _tmp0_);
		_tmp1_ = self->transaction;
		pamac_transaction_gtk_stop_progressbar_pulse (_tmp1_);
		pamac_manager_window_set_pending_operations (self);
	} else {
		if (self->transaction_running) {
			PamacTransactionGtk* _tmp2_;
			self->transaction_running = FALSE;
			_tmp2_ = self->transaction;
			pamac_transaction_cancel ((PamacTransaction*) _tmp2_);
		} else {
			GtkToggleButton* _tmp3_;
			gboolean _tmp4_;
			gboolean _tmp5_;
			pamac_manager_window_clear_lists (self);
			pamac_manager_window_set_pending_operations (self);
			pamac_manager_window_refresh_listbox_buttons (self);
			_tmp3_ = self->priv->install_togglebutton;
			_tmp4_ = gtk_toggle_button_get_active (_tmp3_);
			_tmp5_ = _tmp4_;
			if (_tmp5_) {
				GtkToggleButton* _tmp6_;
				_tmp6_ = self->priv->install_togglebutton;
				gtk_toggle_button_set_active (_tmp6_, FALSE);
			} else {
				GtkToggleButton* _tmp7_;
				gboolean _tmp8_;
				gboolean _tmp9_;
				_tmp7_ = self->priv->remove_togglebutton;
				_tmp8_ = gtk_toggle_button_get_active (_tmp7_);
				_tmp9_ = _tmp8_;
				if (_tmp9_) {
					GtkToggleButton* _tmp10_;
					_tmp10_ = self->priv->remove_togglebutton;
					gtk_toggle_button_set_active (_tmp10_, FALSE);
				} else {
					GtkToggleButton* _tmp11_;
					gboolean _tmp12_;
					gboolean _tmp13_;
					_tmp11_ = self->priv->build_togglebutton;
					_tmp12_ = gtk_toggle_button_get_active (_tmp11_);
					_tmp13_ = _tmp12_;
					if (_tmp13_) {
						GtkToggleButton* _tmp14_;
						_tmp14_ = self->priv->build_togglebutton;
						gtk_toggle_button_set_active (_tmp14_, FALSE);
					} else {
						GtkToggleButton* _tmp15_;
						gboolean _tmp16_;
						gboolean _tmp17_;
						_tmp15_ = self->priv->reinstall_togglebutton;
						_tmp16_ = gtk_toggle_button_get_active (_tmp15_);
						_tmp17_ = _tmp16_;
						if (_tmp17_) {
							GtkToggleButton* _tmp18_;
							_tmp18_ = self->priv->reinstall_togglebutton;
							gtk_toggle_button_set_active (_tmp18_, FALSE);
						}
					}
				}
			}
		}
	}
}

static void
_pamac_manager_window_on_cancel_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self)
{
	pamac_manager_window_on_cancel_button_clicked ((PamacManagerWindow*) self);
}

static void
pamac_manager_window_on_refresh_button_clicked (PamacManagerWindow* self)
{
	g_return_if_fail (self != NULL);
	pamac_manager_window_refresh_updates (self, TRUE);
}

static void
_pamac_manager_window_on_refresh_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self)
{
	pamac_manager_window_on_refresh_button_clicked ((PamacManagerWindow*) self);
}

static Block26Data*
block26_data_ref (Block26Data* _data26_)
{
	g_atomic_int_inc (&_data26_->_ref_count_);
	return _data26_;
}

static void
block26_data_unref (void * _userdata_)
{
	Block26Data* _data26_;
	_data26_ = (Block26Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
		PamacManagerWindow* self;
		self = _data26_->self;
		_g_object_unref0 (self);
		g_slice_free (Block26Data, _data26_);
	}
}

static void
__lambda49_ (Block26Data* _data26_,
             GObject* obj,
             GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	PamacConfig* _tmp1_;
	PamacConfig* _tmp2_;
	PamacUpdates* updates = NULL;
	PamacDatabaseGtk* _tmp3_;
	PamacUpdates* _tmp4_;
	GPtrArray* _tmp5_;
	PamacUpdates* _tmp6_;
	GPtrArray* _tmp7_;
	GPtrArray* _tmp8_;
	PamacUpdates* _tmp12_;
	GPtrArray* _tmp13_;
	GPtrArray* _tmp14_;
	GPtrArray* _tmp23_;
	PamacUpdates* _tmp24_;
	GPtrArray* _tmp25_;
	GPtrArray* _tmp26_;
	PamacUpdates* _tmp30_;
	GPtrArray* _tmp31_;
	GPtrArray* _tmp32_;
	GPtrArray* _tmp41_;
	PamacUpdates* _tmp42_;
	GPtrArray* _tmp43_;
	GPtrArray* _tmp44_;
	GtkStack* _tmp48_;
	const gchar* _tmp49_;
	const gchar* _tmp50_;
	self = _data26_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_config ((PamacDatabase*) _tmp0_);
	_tmp2_ = _tmp1_;
	pamac_config_set_check_aur_updates (_tmp2_, _data26_->check_aur_updates_backup);
	_tmp3_ = self->priv->_database;
	_tmp4_ = pamac_database_get_updates_finish ((PamacDatabase*) _tmp3_, res);
	updates = _tmp4_;
	_tmp5_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->repos_updates);
	self->priv->repos_updates = _tmp5_;
	_tmp6_ = updates;
	_tmp7_ = pamac_updates_get_repos_updates (_tmp6_);
	_tmp8_ = _tmp7_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp8_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAlpmPackage* pkg = NULL;
			pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp9_;
				PamacAlpmPackage* _tmp10_;
				PamacAlpmPackage* _tmp11_;
				_tmp9_ = self->priv->repos_updates;
				_tmp10_ = pkg;
				_tmp11_ = _g_object_ref0 (_tmp10_);
				g_ptr_array_add (_tmp9_, _tmp11_);
			}
		}
	}
	_tmp12_ = updates;
	_tmp13_ = pamac_updates_get_ignored_repos_updates (_tmp12_);
	_tmp14_ = _tmp13_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp14_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAlpmPackage* pkg = NULL;
			pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp15_;
				PamacAlpmPackage* _tmp16_;
				PamacAlpmPackage* _tmp17_;
				GHashTable* _tmp18_;
				PamacAlpmPackage* _tmp19_;
				const gchar* _tmp20_;
				const gchar* _tmp21_;
				gchar* _tmp22_;
				_tmp15_ = self->priv->repos_updates;
				_tmp16_ = pkg;
				_tmp17_ = _g_object_ref0 (_tmp16_);
				g_ptr_array_add (_tmp15_, _tmp17_);
				_tmp18_ = pamac_temporary_ignorepkgs;
				_tmp19_ = pkg;
				_tmp20_ = pamac_package_get_name ((PamacPackage*) _tmp19_);
				_tmp21_ = _tmp20_;
				_tmp22_ = g_strdup (_tmp21_);
				g_hash_table_add (_tmp18_, _tmp22_);
			}
		}
	}
	_tmp23_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->aur_updates);
	self->priv->aur_updates = _tmp23_;
	_tmp24_ = updates;
	_tmp25_ = pamac_updates_get_aur_updates (_tmp24_);
	_tmp26_ = _tmp25_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp26_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAURPackage* pkg = NULL;
			pkg = (PamacAURPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp27_;
				PamacAURPackage* _tmp28_;
				PamacAURPackage* _tmp29_;
				_tmp27_ = self->priv->aur_updates;
				_tmp28_ = pkg;
				_tmp29_ = _g_object_ref0 (_tmp28_);
				g_ptr_array_add (_tmp27_, _tmp29_);
			}
		}
	}
	_tmp30_ = updates;
	_tmp31_ = pamac_updates_get_ignored_aur_updates (_tmp30_);
	_tmp32_ = _tmp31_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp32_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAURPackage* pkg = NULL;
			pkg = (PamacAURPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp33_;
				PamacAURPackage* _tmp34_;
				PamacAURPackage* _tmp35_;
				GHashTable* _tmp36_;
				PamacAURPackage* _tmp37_;
				const gchar* _tmp38_;
				const gchar* _tmp39_;
				gchar* _tmp40_;
				_tmp33_ = self->priv->aur_updates;
				_tmp34_ = pkg;
				_tmp35_ = _g_object_ref0 (_tmp34_);
				g_ptr_array_add (_tmp33_, _tmp35_);
				_tmp36_ = pamac_temporary_ignorepkgs;
				_tmp37_ = pkg;
				_tmp38_ = pamac_package_get_name ((PamacPackage*) _tmp37_);
				_tmp39_ = _tmp38_;
				_tmp40_ = g_strdup (_tmp39_);
				g_hash_table_add (_tmp36_, _tmp40_);
			}
		}
	}
	_tmp41_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->flatpak_updates);
	self->priv->flatpak_updates = _tmp41_;
	_tmp42_ = updates;
	_tmp43_ = pamac_updates_get_flatpak_updates (_tmp42_);
	_tmp44_ = _tmp43_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp44_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacFlatpakPackage* pkg = NULL;
			pkg = (PamacFlatpakPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp45_;
				PamacFlatpakPackage* _tmp46_;
				PamacFlatpakPackage* _tmp47_;
				_tmp45_ = self->priv->flatpak_updates;
				_tmp46_ = pkg;
				_tmp47_ = _g_object_ref0 (_tmp46_);
				g_ptr_array_add (_tmp45_, _tmp47_);
			}
		}
	}
	self->priv->updates_checked = TRUE;
	_tmp48_ = self->view_stack;
	_tmp49_ = gtk_stack_get_visible_child_name (_tmp48_);
	_tmp50_ = _tmp49_;
	if (g_strcmp0 (_tmp50_, "updates") == 0) {
		pamac_manager_window_populate_updates (self);
	} else {
		GdkWindow* _tmp51_;
		_tmp51_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp51_, NULL);
	}
	_g_object_unref0 (updates);
}

static void
___lambda49__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda49_ (self, source_object, res);
	block26_data_unref (self);
}

static void
___lambda48_ (Block26Data* _data26_)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	self = _data26_->self;
	_tmp0_ = self->priv->_database;
	pamac_database_get_updates_async ((PamacDatabase*) _tmp0_, ___lambda49__gasync_ready_callback, block26_data_ref (_data26_));
}

static void
____lambda48__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda48_ (self);
	block26_data_unref (self);
}

static void
___lambda50_ (Block26Data* _data26_,
              GObject* obj,
              GAsyncResult* res)
{
	PamacManagerWindow* self;
	PamacDatabaseGtk* _tmp0_;
	PamacConfig* _tmp1_;
	PamacConfig* _tmp2_;
	PamacUpdates* updates = NULL;
	PamacDatabaseGtk* _tmp3_;
	PamacUpdates* _tmp4_;
	GPtrArray* _tmp5_;
	PamacUpdates* _tmp6_;
	GPtrArray* _tmp7_;
	GPtrArray* _tmp8_;
	PamacUpdates* _tmp12_;
	GPtrArray* _tmp13_;
	GPtrArray* _tmp14_;
	GPtrArray* _tmp23_;
	PamacUpdates* _tmp24_;
	GPtrArray* _tmp25_;
	GPtrArray* _tmp26_;
	PamacUpdates* _tmp30_;
	GPtrArray* _tmp31_;
	GPtrArray* _tmp32_;
	GPtrArray* _tmp41_;
	PamacUpdates* _tmp42_;
	GPtrArray* _tmp43_;
	GPtrArray* _tmp44_;
	GtkStack* _tmp48_;
	const gchar* _tmp49_;
	const gchar* _tmp50_;
	self = _data26_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_database;
	_tmp1_ = pamac_database_get_config ((PamacDatabase*) _tmp0_);
	_tmp2_ = _tmp1_;
	pamac_config_set_check_aur_updates (_tmp2_, _data26_->check_aur_updates_backup);
	_tmp3_ = self->priv->_database;
	_tmp4_ = pamac_database_get_updates_finish ((PamacDatabase*) _tmp3_, res);
	updates = _tmp4_;
	_tmp5_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->repos_updates);
	self->priv->repos_updates = _tmp5_;
	_tmp6_ = updates;
	_tmp7_ = pamac_updates_get_repos_updates (_tmp6_);
	_tmp8_ = _tmp7_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp8_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAlpmPackage* pkg = NULL;
			pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp9_;
				PamacAlpmPackage* _tmp10_;
				PamacAlpmPackage* _tmp11_;
				_tmp9_ = self->priv->repos_updates;
				_tmp10_ = pkg;
				_tmp11_ = _g_object_ref0 (_tmp10_);
				g_ptr_array_add (_tmp9_, _tmp11_);
			}
		}
	}
	_tmp12_ = updates;
	_tmp13_ = pamac_updates_get_ignored_repos_updates (_tmp12_);
	_tmp14_ = _tmp13_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp14_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAlpmPackage* pkg = NULL;
			pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp15_;
				PamacAlpmPackage* _tmp16_;
				PamacAlpmPackage* _tmp17_;
				GHashTable* _tmp18_;
				PamacAlpmPackage* _tmp19_;
				const gchar* _tmp20_;
				const gchar* _tmp21_;
				gchar* _tmp22_;
				_tmp15_ = self->priv->repos_updates;
				_tmp16_ = pkg;
				_tmp17_ = _g_object_ref0 (_tmp16_);
				g_ptr_array_add (_tmp15_, _tmp17_);
				_tmp18_ = pamac_temporary_ignorepkgs;
				_tmp19_ = pkg;
				_tmp20_ = pamac_package_get_name ((PamacPackage*) _tmp19_);
				_tmp21_ = _tmp20_;
				_tmp22_ = g_strdup (_tmp21_);
				g_hash_table_add (_tmp18_, _tmp22_);
			}
		}
	}
	_tmp23_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->aur_updates);
	self->priv->aur_updates = _tmp23_;
	_tmp24_ = updates;
	_tmp25_ = pamac_updates_get_aur_updates (_tmp24_);
	_tmp26_ = _tmp25_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp26_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAURPackage* pkg = NULL;
			pkg = (PamacAURPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp27_;
				PamacAURPackage* _tmp28_;
				PamacAURPackage* _tmp29_;
				_tmp27_ = self->priv->aur_updates;
				_tmp28_ = pkg;
				_tmp29_ = _g_object_ref0 (_tmp28_);
				g_ptr_array_add (_tmp27_, _tmp29_);
			}
		}
	}
	_tmp30_ = updates;
	_tmp31_ = pamac_updates_get_ignored_aur_updates (_tmp30_);
	_tmp32_ = _tmp31_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp32_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacAURPackage* pkg = NULL;
			pkg = (PamacAURPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp33_;
				PamacAURPackage* _tmp34_;
				PamacAURPackage* _tmp35_;
				GHashTable* _tmp36_;
				PamacAURPackage* _tmp37_;
				const gchar* _tmp38_;
				const gchar* _tmp39_;
				gchar* _tmp40_;
				_tmp33_ = self->priv->aur_updates;
				_tmp34_ = pkg;
				_tmp35_ = _g_object_ref0 (_tmp34_);
				g_ptr_array_add (_tmp33_, _tmp35_);
				_tmp36_ = pamac_temporary_ignorepkgs;
				_tmp37_ = pkg;
				_tmp38_ = pamac_package_get_name ((PamacPackage*) _tmp37_);
				_tmp39_ = _tmp38_;
				_tmp40_ = g_strdup (_tmp39_);
				g_hash_table_add (_tmp36_, _tmp40_);
			}
		}
	}
	_tmp41_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_g_ptr_array_unref0 (self->priv->flatpak_updates);
	self->priv->flatpak_updates = _tmp41_;
	_tmp42_ = updates;
	_tmp43_ = pamac_updates_get_flatpak_updates (_tmp42_);
	_tmp44_ = _tmp43_;
	{
		GPtrArray* pkg_collection = NULL;
		guint pkg_index = 0U;
		pkg_collection = _tmp44_;
		for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
			PamacFlatpakPackage* pkg = NULL;
			pkg = (PamacFlatpakPackage*) g_ptr_array_index (pkg_collection, pkg_index);
			{
				GPtrArray* _tmp45_;
				PamacFlatpakPackage* _tmp46_;
				PamacFlatpakPackage* _tmp47_;
				_tmp45_ = self->priv->flatpak_updates;
				_tmp46_ = pkg;
				_tmp47_ = _g_object_ref0 (_tmp46_);
				g_ptr_array_add (_tmp45_, _tmp47_);
			}
		}
	}
	self->priv->updates_checked = TRUE;
	_tmp48_ = self->view_stack;
	_tmp49_ = gtk_stack_get_visible_child_name (_tmp48_);
	_tmp50_ = _tmp49_;
	if (g_strcmp0 (_tmp50_, "updates") == 0) {
		pamac_manager_window_populate_updates (self);
	} else {
		GdkWindow* _tmp51_;
		_tmp51_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp51_, NULL);
	}
	_g_object_unref0 (updates);
}

static void
____lambda50__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda50_ (self, source_object, res);
	block26_data_unref (self);
}

static void
pamac_manager_window_refresh_updates (PamacManagerWindow* self,
                                      gboolean refresh_dbs)
{
	Block26Data* _data26_;
	GtkStack* _tmp0_;
	GdkWindow* _tmp1_;
	GdkDisplay* _tmp2_;
	GdkCursor* _tmp3_;
	GdkCursor* _tmp4_;
	PamacDatabaseGtk* _tmp5_;
	PamacConfig* _tmp6_;
	PamacConfig* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_ = FALSE;
	PamacDatabaseGtk* _tmp14_;
	PamacConfig* _tmp15_;
	PamacConfig* _tmp16_;
	g_return_if_fail (self != NULL);
	_data26_ = g_slice_new0 (Block26Data);
	_data26_->_ref_count_ = 1;
	_data26_->self = g_object_ref (self);
	_tmp0_ = self->priv->packages_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "checking");
	_tmp1_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp2_ = gdk_display_get_default ();
	_tmp3_ = gdk_cursor_new_for_display (_tmp2_, GDK_WATCH);
	_tmp4_ = _tmp3_;
	gdk_window_set_cursor (_tmp1_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = self->priv->_database;
	_tmp6_ = pamac_database_get_config ((PamacDatabase*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = pamac_config_get_check_aur_updates (_tmp7_);
	_tmp9_ = _tmp8_;
	_data26_->check_aur_updates_backup = _tmp9_;
	if (_data26_->check_aur_updates_backup) {
		PamacLocalConfig* _tmp11_;
		gboolean _tmp12_;
		gboolean _tmp13_;
		_tmp11_ = self->local_config;
		_tmp12_ = pamac_local_config_get_software_mode (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp10_ = !_tmp13_;
	} else {
		_tmp10_ = FALSE;
	}
	_tmp14_ = self->priv->_database;
	_tmp15_ = pamac_database_get_config ((PamacDatabase*) _tmp14_);
	_tmp16_ = _tmp15_;
	pamac_config_set_check_aur_updates (_tmp16_, _tmp10_);
	if (refresh_dbs) {
		PamacTransactionGtk* _tmp17_;
		_tmp17_ = self->transaction;
		pamac_transaction_refresh_dbs_async ((PamacTransaction*) _tmp17_, ____lambda48__gasync_ready_callback, block26_data_ref (_data26_));
	} else {
		PamacDatabaseGtk* _tmp18_;
		_tmp18_ = self->priv->_database;
		pamac_database_get_updates_async ((PamacDatabase*) _tmp18_, ____lambda50__gasync_ready_callback, block26_data_ref (_data26_));
	}
	block26_data_unref (_data26_);
	_data26_ = NULL;
}

static void
pamac_manager_window_on_get_updates_progress (PamacManagerWindow* self,
                                              guint percent)
{
	GtkLabel* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->checking_label;
	_tmp1_ = g_strdup_printf ("<big><b>%s %u %</b></big>", g_dgettext (NULL, "Checking for Updates"), percent);
	_tmp2_ = _tmp1_;
	gtk_label_set_markup (_tmp0_, _tmp2_);
	_g_free0 (_tmp2_);
}

static void
pamac_manager_window_populate_updates (PamacManagerWindow* self)
{
	GHashTable* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	GPtrArray* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pamac_to_update;
	g_hash_table_remove_all (_tmp0_);
	_tmp3_ = self->priv->repos_updates;
	_tmp4_ = vala_g_ptr_array_get_length (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == 0) {
		GPtrArray* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp6_ = self->priv->aur_updates;
		_tmp7_ = vala_g_ptr_array_get_length (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp2_ = _tmp8_ == 0;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GPtrArray* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp9_ = self->priv->flatpak_updates;
		_tmp10_ = vala_g_ptr_array_get_length (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp1_ = _tmp11_ == 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		HdyViewSwitcherTitle* _tmp12_;
		GtkStack* _tmp13_;
		GDateTime* last_refresh_time = NULL;
		PamacDatabaseGtk* _tmp14_;
		GDateTime* _tmp15_;
		GDateTime* _tmp16_;
		GtkButton* _tmp34_;
		GtkButton* _tmp35_;
		GtkButton* _tmp36_;
		GdkWindow* _tmp37_;
		pamac_manager_window_show_sidebar (self, FALSE);
		_tmp12_ = self->view_stack_switcher;
		hdy_view_switcher_title_set_title (_tmp12_, g_dgettext (NULL, "Updates"));
		_tmp13_ = self->priv->packages_stack;
		gtk_stack_set_visible_child_name (_tmp13_, "updated");
		_tmp14_ = self->priv->_database;
		_tmp15_ = pamac_database_get_last_refresh_time ((PamacDatabase*) _tmp14_);
		last_refresh_time = _tmp15_;
		_tmp16_ = last_refresh_time;
		if (_tmp16_ == NULL) {
			GtkLabel* _tmp17_;
			_tmp17_ = self->priv->last_refresh_label;
			gtk_label_set_label (_tmp17_, "");
		} else {
			gint64 elasped_time = 0LL;
			GDateTime* _tmp18_;
			gint64 elasped_day = 0LL;
			gchar* time_format = NULL;
			GtkLabel* _tmp28_;
			const gchar* _tmp29_;
			gchar* _tmp30_;
			gchar* _tmp31_;
			gchar* _tmp32_;
			gchar* _tmp33_;
			_tmp18_ = last_refresh_time;
			elasped_time = g_date_time_to_unix (_tmp18_);
			elasped_day = elasped_time / G_TIME_SPAN_DAY;
			if (elasped_day < ((gint64) 1)) {
				GDateTime* now = NULL;
				GDateTime* _tmp19_;
				GDateTime* _tmp20_;
				GDateTime* _tmp21_;
				_tmp19_ = g_date_time_new_now_local ();
				now = _tmp19_;
				_tmp20_ = last_refresh_time;
				_tmp21_ = now;
				if (g_date_time_get_day_of_week (_tmp20_) == g_date_time_get_day_of_week (_tmp21_)) {
					GDateTime* _tmp22_;
					gchar* _tmp23_;
					_tmp22_ = last_refresh_time;
					_tmp23_ = g_date_time_format (_tmp22_, "%X");
					_g_free0 (time_format);
					time_format = _tmp23_;
				} else {
					GDateTime* _tmp24_;
					gchar* _tmp25_;
					_tmp24_ = last_refresh_time;
					_tmp25_ = g_date_time_format (_tmp24_, "%c");
					_g_free0 (time_format);
					time_format = _tmp25_;
				}
				_g_date_time_unref0 (now);
			} else {
				GDateTime* _tmp26_;
				gchar* _tmp27_;
				_tmp26_ = last_refresh_time;
				_tmp27_ = g_date_time_format (_tmp26_, "%x");
				_g_free0 (time_format);
				time_format = _tmp27_;
			}
			_tmp28_ = self->priv->last_refresh_label;
			_tmp29_ = time_format;
			_tmp30_ = g_strdup_printf ("%s : %s", g_dgettext (NULL, "Last refresh"), _tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = g_strdup_printf ("<span foreground='grey'>%s</span>", _tmp31_);
			_tmp33_ = _tmp32_;
			gtk_label_set_markup (_tmp28_, _tmp33_);
			_g_free0 (_tmp33_);
			_g_free0 (_tmp31_);
			_g_free0 (time_format);
		}
		_tmp34_ = self->priv->install_all_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp34_, FALSE);
		_tmp35_ = self->priv->remove_all_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp35_, FALSE);
		_tmp36_ = self->priv->ignore_all_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp36_, FALSE);
		_tmp37_ = gtk_widget_get_window ((GtkWidget*) self);
		gdk_window_set_cursor (_tmp37_, NULL);
		_g_date_time_unref0 (last_refresh_time);
	} else {
		GPtrArray* _tmp38_;
		gint _tmp39_;
		gint _tmp40_;
		GPtrArray* _tmp53_;
		gint _tmp54_;
		gint _tmp55_;
		GPtrArray* _tmp68_;
		gint _tmp69_;
		gint _tmp70_;
		PamacSimpleRow* _tmp83_;
		GHashTable* _tmp84_;
		guint _tmp85_;
		guint _tmp86_;
		PamacLocalConfig* _tmp87_;
		gboolean _tmp88_;
		gboolean _tmp89_;
		GtkListBox* _tmp90_;
		GtkListBoxRow* _tmp91_;
		_tmp38_ = self->priv->repos_updates;
		_tmp39_ = vala_g_ptr_array_get_length (_tmp38_);
		_tmp40_ = _tmp39_;
		if (_tmp40_ > 0) {
			GPtrArray* _tmp41_;
			PamacSimpleRow* _tmp51_;
			_tmp41_ = self->priv->repos_updates;
			{
				GPtrArray* pkg_collection = NULL;
				guint pkg_index = 0U;
				pkg_collection = _tmp41_;
				for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
					PamacAlpmPackage* pkg = NULL;
					pkg = (PamacAlpmPackage*) g_ptr_array_index (pkg_collection, pkg_index);
					{
						GHashTable* _tmp42_;
						PamacAlpmPackage* _tmp43_;
						const gchar* _tmp44_;
						const gchar* _tmp45_;
						_tmp42_ = pamac_temporary_ignorepkgs;
						_tmp43_ = pkg;
						_tmp44_ = pamac_package_get_name ((PamacPackage*) _tmp43_);
						_tmp45_ = _tmp44_;
						if (!g_hash_table_contains (_tmp42_, _tmp45_)) {
							GHashTable* _tmp46_;
							PamacAlpmPackage* _tmp47_;
							const gchar* _tmp48_;
							const gchar* _tmp49_;
							gchar* _tmp50_;
							_tmp46_ = pamac_to_update;
							_tmp47_ = pkg;
							_tmp48_ = pamac_package_get_name ((PamacPackage*) _tmp47_);
							_tmp49_ = _tmp48_;
							_tmp50_ = g_strdup (_tmp49_);
							g_hash_table_add (_tmp46_, _tmp50_);
						}
					}
				}
			}
			_tmp51_ = self->priv->updates_repos_row;
			gtk_widget_set_visible ((GtkWidget*) _tmp51_, TRUE);
		} else {
			PamacSimpleRow* _tmp52_;
			_tmp52_ = self->priv->updates_repos_row;
			gtk_widget_set_visible ((GtkWidget*) _tmp52_, FALSE);
		}
		_tmp53_ = self->priv->aur_updates;
		_tmp54_ = vala_g_ptr_array_get_length (_tmp53_);
		_tmp55_ = _tmp54_;
		if (_tmp55_ > 0) {
			GPtrArray* _tmp56_;
			PamacSimpleRow* _tmp66_;
			_tmp56_ = self->priv->aur_updates;
			{
				GPtrArray* pkg_collection = NULL;
				guint pkg_index = 0U;
				pkg_collection = _tmp56_;
				for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
					PamacAURPackage* pkg = NULL;
					pkg = (PamacAURPackage*) g_ptr_array_index (pkg_collection, pkg_index);
					{
						GHashTable* _tmp57_;
						PamacAURPackage* _tmp58_;
						const gchar* _tmp59_;
						const gchar* _tmp60_;
						_tmp57_ = pamac_temporary_ignorepkgs;
						_tmp58_ = pkg;
						_tmp59_ = pamac_package_get_name ((PamacPackage*) _tmp58_);
						_tmp60_ = _tmp59_;
						if (!g_hash_table_contains (_tmp57_, _tmp60_)) {
							GHashTable* _tmp61_;
							PamacAURPackage* _tmp62_;
							const gchar* _tmp63_;
							const gchar* _tmp64_;
							gchar* _tmp65_;
							_tmp61_ = pamac_to_update;
							_tmp62_ = pkg;
							_tmp63_ = pamac_package_get_name ((PamacPackage*) _tmp62_);
							_tmp64_ = _tmp63_;
							_tmp65_ = g_strdup (_tmp64_);
							g_hash_table_add (_tmp61_, _tmp65_);
						}
					}
				}
			}
			_tmp66_ = self->priv->updates_aur_row;
			gtk_widget_set_visible ((GtkWidget*) _tmp66_, TRUE);
		} else {
			PamacSimpleRow* _tmp67_;
			_tmp67_ = self->priv->updates_aur_row;
			gtk_widget_set_visible ((GtkWidget*) _tmp67_, FALSE);
		}
		_tmp68_ = self->priv->flatpak_updates;
		_tmp69_ = vala_g_ptr_array_get_length (_tmp68_);
		_tmp70_ = _tmp69_;
		if (_tmp70_ > 0) {
			GPtrArray* _tmp71_;
			PamacSimpleRow* _tmp81_;
			_tmp71_ = self->priv->flatpak_updates;
			{
				GPtrArray* pkg_collection = NULL;
				guint pkg_index = 0U;
				pkg_collection = _tmp71_;
				for (pkg_index = 0; pkg_index < pkg_collection->len; pkg_index = pkg_index + 1) {
					PamacFlatpakPackage* pkg = NULL;
					pkg = (PamacFlatpakPackage*) g_ptr_array_index (pkg_collection, pkg_index);
					{
						GHashTable* _tmp72_;
						PamacFlatpakPackage* _tmp73_;
						const gchar* _tmp74_;
						const gchar* _tmp75_;
						_tmp72_ = pamac_temporary_ignorepkgs;
						_tmp73_ = pkg;
						_tmp74_ = pamac_package_get_name ((PamacPackage*) _tmp73_);
						_tmp75_ = _tmp74_;
						if (!g_hash_table_contains (_tmp72_, _tmp75_)) {
							GHashTable* _tmp76_;
							PamacFlatpakPackage* _tmp77_;
							const gchar* _tmp78_;
							const gchar* _tmp79_;
							gchar* _tmp80_;
							_tmp76_ = pamac_to_update;
							_tmp77_ = pkg;
							_tmp78_ = pamac_package_get_name ((PamacPackage*) _tmp77_);
							_tmp79_ = _tmp78_;
							_tmp80_ = g_strdup (_tmp79_);
							g_hash_table_add (_tmp76_, _tmp80_);
						}
					}
				}
			}
			_tmp81_ = self->priv->updates_flatpak_row;
			gtk_widget_set_visible ((GtkWidget*) _tmp81_, TRUE);
		} else {
			PamacSimpleRow* _tmp82_;
			_tmp82_ = self->priv->updates_flatpak_row;
			gtk_widget_set_visible ((GtkWidget*) _tmp82_, FALSE);
		}
		_tmp83_ = self->priv->updates_ignored_row;
		_tmp84_ = pamac_temporary_ignorepkgs;
		_tmp85_ = g_hash_table_size (_tmp84_);
		_tmp86_ = _tmp85_;
		gtk_widget_set_visible ((GtkWidget*) _tmp83_, _tmp86_ > ((guint) 0));
		_tmp87_ = self->local_config;
		_tmp88_ = pamac_local_config_get_software_mode (_tmp87_);
		_tmp89_ = _tmp88_;
		pamac_manager_window_show_sidebar (self, !_tmp89_);
		_tmp90_ = self->priv->updates_listbox;
		_tmp91_ = gtk_list_box_get_selected_row (_tmp90_);
		pamac_manager_window_on_updates_listbox_row_activated (self, _tmp91_);
		pamac_manager_window_set_pending_operations (self);
	}
}

static void
pamac_manager_window_on_start_waiting (PamacManagerWindow* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->waiting = TRUE;
	_tmp0_ = self->priv->cancel_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, TRUE);
}

static void
pamac_manager_window_on_stop_waiting (PamacManagerWindow* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->waiting = FALSE;
	_tmp0_ = self->priv->cancel_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, FALSE);
}

static void
pamac_manager_window_on_start_preparing (PamacManagerWindow* self)
{
	GdkWindow* _tmp0_;
	GdkDisplay* _tmp1_;
	GdkCursor* _tmp2_;
	GdkCursor* _tmp3_;
	GtkButton* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp1_ = gdk_display_get_default ();
	_tmp2_ = gdk_cursor_new_for_display (_tmp1_, GDK_WATCH);
	_tmp3_ = _tmp2_;
	gdk_window_set_cursor (_tmp0_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->priv->cancel_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, FALSE);
}

static void
pamac_manager_window_on_stop_preparing (PamacManagerWindow* self)
{
	GtkButton* _tmp0_;
	GdkWindow* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->cancel_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = gtk_widget_get_window ((GtkWidget*) self);
	gdk_window_set_cursor (_tmp1_, NULL);
}

static void
pamac_manager_window_on_start_downloading (PamacManagerWindow* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->cancel_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, TRUE);
}

static void
pamac_manager_window_on_stop_downloading (PamacManagerWindow* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->cancel_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, FALSE);
}

static void
pamac_manager_window_on_start_building (PamacManagerWindow* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->cancel_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, TRUE);
}

static void
pamac_manager_window_on_stop_building (PamacManagerWindow* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->cancel_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, FALSE);
}

static void
pamac_manager_window_on_important_details_outpout (PamacManagerWindow* self,
                                                   gboolean must_show)
{
	g_return_if_fail (self != NULL);
	if (must_show) {
		GtkStack* _tmp0_;
		_tmp0_ = self->main_stack;
		gtk_stack_set_visible_child_name (_tmp0_, "term");
	} else {
		GtkStack* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp1_ = self->main_stack;
		_tmp2_ = gtk_stack_get_visible_child_name (_tmp1_);
		_tmp3_ = _tmp2_;
		if (g_strcmp0 (_tmp3_, "term") != 0) {
			GtkButton* _tmp4_;
			GtkButton* _tmp5_;
			GtkStyleContext* _tmp6_;
			self->important_details = TRUE;
			_tmp4_ = self->details_button;
			gtk_button_set_relief (_tmp4_, GTK_RELIEF_NONE);
			_tmp5_ = self->details_button;
			_tmp6_ = gtk_widget_get_style_context ((GtkWidget*) _tmp5_);
			gtk_style_context_add_class (_tmp6_, GTK_STYLE_CLASS_SUGGESTED_ACTION);
		}
	}
}

static gboolean
__lambda62_ (PamacManagerWindow* self)
{
	GtkRevealer* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->notification_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	self->priv->in_app_notification_timeout_id = (guint) 0;
	result = FALSE;
	return result;
}

static gboolean
___lambda62__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda62_ ((PamacManagerWindow*) self);
	return result;
}

static void
pamac_manager_window_show_in_app_notification (PamacManagerWindow* self,
                                               const gchar* message)
{
	GtkLabel* _tmp0_;
	GtkRevealer* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (message != NULL);
	if (self->priv->in_app_notification_timeout_id != ((guint) 0)) {
		g_source_remove (self->priv->in_app_notification_timeout_id);
		self->priv->in_app_notification_timeout_id = (guint) 0;
	}
	_tmp0_ = self->priv->notification_label;
	gtk_label_set_label (_tmp0_, message);
	_tmp1_ = self->priv->notification_revealer;
	gtk_revealer_set_reveal_child (_tmp1_, TRUE);
	self->priv->in_app_notification_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 3000, ___lambda62__gsource_func, g_object_ref (self), g_object_unref);
}

static void
pamac_manager_window_close_in_app_notification (PamacManagerWindow* self)
{
	GtkRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->notification_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	g_source_remove (self->priv->in_app_notification_timeout_id);
	self->priv->in_app_notification_timeout_id = (guint) 0;
}

static void
pamac_manager_window_on_transaction_finished (PamacManagerWindow* self,
                                              gboolean success)
{
	PamacTransactionGtk* _tmp84_;
	PamacTransactionGtk* _tmp85_;
	PamacTransactionGtk* _tmp86_;
	GtkStack* _tmp87_;
	const gchar* _tmp88_;
	const gchar* _tmp89_;
	g_return_if_fail (self != NULL);
	if (success) {
		gboolean _tmp0_;
		gboolean _tmp1_;
		PamacTransactionGtk* _tmp3_;
		g_object_get ((GtkWindow*) self, "is-active", &_tmp0_, NULL);
		_tmp1_ = _tmp0_;
		if (_tmp1_) {
			pamac_manager_window_show_in_app_notification (self, g_dgettext (NULL, "Transaction successfully finished"));
		} else {
			PamacTransactionGtk* _tmp2_;
			_tmp2_ = self->transaction;
			pamac_transaction_gtk_show_notification (_tmp2_, g_dgettext (NULL, "Transaction successfully finished"));
		}
		_tmp3_ = self->transaction;
		pamac_transaction_gtk_show_warnings (_tmp3_, TRUE);
	} else {
		PamacTransactionGtk* _tmp4_;
		GHashTable* _tmp32_;
		GList* _tmp33_;
		GHashTable* _tmp45_;
		GList* _tmp46_;
		GHashTable* _tmp58_;
		GList* _tmp59_;
		GHashTable* _tmp71_;
		GList* _tmp72_;
		_tmp4_ = self->transaction;
		pamac_transaction_gtk_clear_warnings (_tmp4_);
		{
			GHashTableIter _name_it = {0};
			GHashTable* _tmp5_;
			GHashTableIter _tmp6_ = {0};
			const gchar* name = NULL;
			_tmp5_ = self->priv->previous_to_install;
			g_hash_table_iter_init (&_tmp6_, _tmp5_);
			_name_it = _tmp6_;
			while (TRUE) {
				gconstpointer _tmp7_;
				const gchar* _tmp8_;
				PamacDatabaseGtk* _tmp9_;
				const gchar* _tmp10_;
				_tmp7_ = _vala_hash_set_next_value (&_name_it);
				name = (const gchar*) _tmp7_;
				_tmp8_ = name;
				if (!(_tmp8_ != NULL)) {
					break;
				}
				_tmp9_ = self->priv->_database;
				_tmp10_ = name;
				if (!pamac_database_is_installed_pkg ((PamacDatabase*) _tmp9_, _tmp10_)) {
					GHashTable* _tmp11_;
					const gchar* _tmp12_;
					gchar* _tmp13_;
					_tmp11_ = pamac_to_install;
					_tmp12_ = name;
					_tmp13_ = g_strdup (_tmp12_);
					g_hash_table_add (_tmp11_, _tmp13_);
				}
			}
		}
		{
			GHashTableIter _name_it = {0};
			GHashTable* _tmp14_;
			GHashTableIter _tmp15_ = {0};
			const gchar* name = NULL;
			_tmp14_ = self->priv->previous_to_remove;
			g_hash_table_iter_init (&_tmp15_, _tmp14_);
			_name_it = _tmp15_;
			while (TRUE) {
				gconstpointer _tmp16_;
				const gchar* _tmp17_;
				PamacDatabaseGtk* _tmp18_;
				const gchar* _tmp19_;
				_tmp16_ = _vala_hash_set_next_value (&_name_it);
				name = (const gchar*) _tmp16_;
				_tmp17_ = name;
				if (!(_tmp17_ != NULL)) {
					break;
				}
				_tmp18_ = self->priv->_database;
				_tmp19_ = name;
				if (pamac_database_is_installed_pkg ((PamacDatabase*) _tmp18_, _tmp19_)) {
					GHashTable* _tmp20_;
					const gchar* _tmp21_;
					gchar* _tmp22_;
					_tmp20_ = pamac_to_remove;
					_tmp21_ = name;
					_tmp22_ = g_strdup (_tmp21_);
					g_hash_table_add (_tmp20_, _tmp22_);
				}
			}
		}
		{
			GHashTableIter _name_it = {0};
			GHashTable* _tmp23_;
			GHashTableIter _tmp24_ = {0};
			const gchar* name = NULL;
			_tmp23_ = self->priv->previous_to_build;
			g_hash_table_iter_init (&_tmp24_, _tmp23_);
			_name_it = _tmp24_;
			while (TRUE) {
				gconstpointer _tmp25_;
				const gchar* _tmp26_;
				PamacDatabaseGtk* _tmp27_;
				const gchar* _tmp28_;
				_tmp25_ = _vala_hash_set_next_value (&_name_it);
				name = (const gchar*) _tmp25_;
				_tmp26_ = name;
				if (!(_tmp26_ != NULL)) {
					break;
				}
				_tmp27_ = self->priv->_database;
				_tmp28_ = name;
				if (!pamac_database_is_installed_pkg ((PamacDatabase*) _tmp27_, _tmp28_)) {
					GHashTable* _tmp29_;
					const gchar* _tmp30_;
					gchar* _tmp31_;
					_tmp29_ = pamac_to_build;
					_tmp30_ = name;
					_tmp31_ = g_strdup (_tmp30_);
					g_hash_table_add (_tmp29_, _tmp31_);
				}
			}
		}
		_tmp32_ = self->priv->previous_snap_to_install;
		_tmp33_ = g_hash_table_get_values (_tmp32_);
		{
			GList* pkg_collection = NULL;
			GList* pkg_it = NULL;
			pkg_collection = _tmp33_;
			for (pkg_it = pkg_collection; pkg_it != NULL; pkg_it = pkg_it->next) {
				PamacSnapPackage* pkg = NULL;
				pkg = (PamacSnapPackage*) pkg_it->data;
				{
					PamacDatabaseGtk* _tmp34_;
					PamacSnapPackage* _tmp35_;
					const gchar* _tmp36_;
					const gchar* _tmp37_;
					_tmp34_ = self->priv->_database;
					_tmp35_ = pkg;
					_tmp36_ = pamac_package_get_name ((PamacPackage*) _tmp35_);
					_tmp37_ = _tmp36_;
					if (!pamac_database_is_installed_snap ((PamacDatabase*) _tmp34_, _tmp37_)) {
						GHashTable* _tmp38_;
						PamacSnapPackage* _tmp39_;
						const gchar* _tmp40_;
						const gchar* _tmp41_;
						gchar* _tmp42_;
						PamacSnapPackage* _tmp43_;
						PamacSnapPackage* _tmp44_;
						_tmp38_ = pamac_snap_to_install;
						_tmp39_ = pkg;
						_tmp40_ = pamac_package_get_name ((PamacPackage*) _tmp39_);
						_tmp41_ = _tmp40_;
						_tmp42_ = g_strdup (_tmp41_);
						_tmp43_ = pkg;
						_tmp44_ = _g_object_ref0 (_tmp43_);
						g_hash_table_insert (_tmp38_, _tmp42_, _tmp44_);
					}
				}
			}
			(pkg_collection == NULL) ? NULL : (pkg_collection = (g_list_free (pkg_collection), NULL));
		}
		_tmp45_ = self->priv->previous_snap_to_remove;
		_tmp46_ = g_hash_table_get_values (_tmp45_);
		{
			GList* pkg_collection = NULL;
			GList* pkg_it = NULL;
			pkg_collection = _tmp46_;
			for (pkg_it = pkg_collection; pkg_it != NULL; pkg_it = pkg_it->next) {
				PamacSnapPackage* pkg = NULL;
				pkg = (PamacSnapPackage*) pkg_it->data;
				{
					PamacDatabaseGtk* _tmp47_;
					PamacSnapPackage* _tmp48_;
					const gchar* _tmp49_;
					const gchar* _tmp50_;
					_tmp47_ = self->priv->_database;
					_tmp48_ = pkg;
					_tmp49_ = pamac_package_get_name ((PamacPackage*) _tmp48_);
					_tmp50_ = _tmp49_;
					if (pamac_database_is_installed_snap ((PamacDatabase*) _tmp47_, _tmp50_)) {
						GHashTable* _tmp51_;
						PamacSnapPackage* _tmp52_;
						const gchar* _tmp53_;
						const gchar* _tmp54_;
						gchar* _tmp55_;
						PamacSnapPackage* _tmp56_;
						PamacSnapPackage* _tmp57_;
						_tmp51_ = pamac_snap_to_remove;
						_tmp52_ = pkg;
						_tmp53_ = pamac_package_get_name ((PamacPackage*) _tmp52_);
						_tmp54_ = _tmp53_;
						_tmp55_ = g_strdup (_tmp54_);
						_tmp56_ = pkg;
						_tmp57_ = _g_object_ref0 (_tmp56_);
						g_hash_table_insert (_tmp51_, _tmp55_, _tmp57_);
					}
				}
			}
			(pkg_collection == NULL) ? NULL : (pkg_collection = (g_list_free (pkg_collection), NULL));
		}
		_tmp58_ = self->priv->previous_flatpak_to_install;
		_tmp59_ = g_hash_table_get_values (_tmp58_);
		{
			GList* pkg_collection = NULL;
			GList* pkg_it = NULL;
			pkg_collection = _tmp59_;
			for (pkg_it = pkg_collection; pkg_it != NULL; pkg_it = pkg_it->next) {
				PamacFlatpakPackage* pkg = NULL;
				pkg = (PamacFlatpakPackage*) pkg_it->data;
				{
					PamacDatabaseGtk* _tmp60_;
					PamacFlatpakPackage* _tmp61_;
					const gchar* _tmp62_;
					const gchar* _tmp63_;
					_tmp60_ = self->priv->_database;
					_tmp61_ = pkg;
					_tmp62_ = pamac_package_get_id ((PamacPackage*) _tmp61_);
					_tmp63_ = _tmp62_;
					if (!pamac_database_is_installed_flatpak ((PamacDatabase*) _tmp60_, _tmp63_)) {
						GHashTable* _tmp64_;
						PamacFlatpakPackage* _tmp65_;
						const gchar* _tmp66_;
						const gchar* _tmp67_;
						gchar* _tmp68_;
						PamacFlatpakPackage* _tmp69_;
						PamacFlatpakPackage* _tmp70_;
						_tmp64_ = pamac_flatpak_to_install;
						_tmp65_ = pkg;
						_tmp66_ = pamac_package_get_id ((PamacPackage*) _tmp65_);
						_tmp67_ = _tmp66_;
						_tmp68_ = g_strdup (_tmp67_);
						_tmp69_ = pkg;
						_tmp70_ = _g_object_ref0 (_tmp69_);
						g_hash_table_insert (_tmp64_, _tmp68_, _tmp70_);
					}
				}
			}
			(pkg_collection == NULL) ? NULL : (pkg_collection = (g_list_free (pkg_collection), NULL));
		}
		_tmp71_ = self->priv->previous_flatpak_to_remove;
		_tmp72_ = g_hash_table_get_values (_tmp71_);
		{
			GList* pkg_collection = NULL;
			GList* pkg_it = NULL;
			pkg_collection = _tmp72_;
			for (pkg_it = pkg_collection; pkg_it != NULL; pkg_it = pkg_it->next) {
				PamacFlatpakPackage* pkg = NULL;
				pkg = (PamacFlatpakPackage*) pkg_it->data;
				{
					PamacDatabaseGtk* _tmp73_;
					PamacFlatpakPackage* _tmp74_;
					const gchar* _tmp75_;
					const gchar* _tmp76_;
					_tmp73_ = self->priv->_database;
					_tmp74_ = pkg;
					_tmp75_ = pamac_package_get_id ((PamacPackage*) _tmp74_);
					_tmp76_ = _tmp75_;
					if (pamac_database_is_installed_flatpak ((PamacDatabase*) _tmp73_, _tmp76_)) {
						GHashTable* _tmp77_;
						PamacFlatpakPackage* _tmp78_;
						const gchar* _tmp79_;
						const gchar* _tmp80_;
						gchar* _tmp81_;
						PamacFlatpakPackage* _tmp82_;
						PamacFlatpakPackage* _tmp83_;
						_tmp77_ = pamac_flatpak_to_remove;
						_tmp78_ = pkg;
						_tmp79_ = pamac_package_get_id ((PamacPackage*) _tmp78_);
						_tmp80_ = _tmp79_;
						_tmp81_ = g_strdup (_tmp80_);
						_tmp82_ = pkg;
						_tmp83_ = _g_object_ref0 (_tmp82_);
						g_hash_table_insert (_tmp77_, _tmp81_, _tmp83_);
					}
				}
			}
			(pkg_collection == NULL) ? NULL : (pkg_collection = (g_list_free (pkg_collection), NULL));
		}
	}
	_tmp84_ = self->transaction;
	pamac_transaction_gtk_reset_progress_box (_tmp84_);
	_tmp85_ = self->transaction;
	pamac_transaction_gtk_show_details (_tmp85_, "");
	_tmp86_ = self->transaction;
	pamac_transaction_gtk_transaction_summary_remove_all (_tmp86_);
	pamac_manager_window_clear_previous_lists (self);
	_tmp87_ = self->main_stack;
	_tmp88_ = gtk_stack_get_visible_child_name (_tmp87_);
	_tmp89_ = _tmp88_;
	if (g_strcmp0 (_tmp89_, "term") == 0) {
		GtkButton* _tmp90_;
		_tmp90_ = self->button_back;
		gtk_widget_set_visible ((GtkWidget*) _tmp90_, TRUE);
	}
	self->transaction_running = FALSE;
	self->generate_mirrors_list = FALSE;
	pamac_manager_window_refresh_details (self);
	self->priv->scroll_to_top = FALSE;
	self->priv->updates_checked = FALSE;
	pamac_manager_window_refresh_packages_list (self);
}

PamacDatabaseGtk*
pamac_manager_window_get_database (PamacManagerWindow* self)
{
	PamacDatabaseGtk* result;
	PamacDatabaseGtk* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_database;
	result = _tmp0_;
	return result;
}

static void
pamac_manager_window_set_database (PamacManagerWindow* self,
                                   PamacDatabaseGtk* value)
{
	PamacDatabaseGtk* old_value;
	g_return_if_fail (self != NULL);
	old_value = pamac_manager_window_get_database (self);
	if (old_value != value) {
		PamacDatabaseGtk* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_database);
		self->priv->_database = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pamac_manager_window_properties[PAMAC_MANAGER_WINDOW_DATABASE_PROPERTY]);
	}
}

gboolean
pamac_manager_window_get_mobile (PamacManagerWindow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_mobile;
	return result;
}

static void
pamac_manager_window_set_mobile (PamacManagerWindow* self,
                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pamac_manager_window_get_mobile (self);
	if (old_value != value) {
		self->priv->_mobile = value;
		g_object_notify_by_pspec ((GObject *) self, pamac_manager_window_properties[PAMAC_MANAGER_WINDOW_MOBILE_PROPERTY]);
	}
}

gboolean
pamac_manager_window_get_enable_aur (PamacManagerWindow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_enable_aur;
	return result;
}

static void
pamac_manager_window_set_enable_aur (PamacManagerWindow* self,
                                     gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pamac_manager_window_get_enable_aur (self);
	if (old_value != value) {
		self->priv->_enable_aur = value;
		g_object_notify_by_pspec ((GObject *) self, pamac_manager_window_properties[PAMAC_MANAGER_WINDOW_ENABLE_AUR_PROPERTY]);
	}
}

static void
pamac_manager_window_class_init (PamacManagerWindowClass * klass,
                                 gpointer klass_data)
{
	pamac_manager_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PamacManagerWindow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_pamac_manager_window_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_pamac_manager_window_set_property;
	G_OBJECT_CLASS (klass)->finalize = pamac_manager_window_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_MANAGER_WINDOW_DATABASE_PROPERTY, pamac_manager_window_properties[PAMAC_MANAGER_WINDOW_DATABASE_PROPERTY] = g_param_spec_object ("database", "database", "database", PAMAC_TYPE_DATABASE_GTK, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_MANAGER_WINDOW_MOBILE_PROPERTY, pamac_manager_window_properties[PAMAC_MANAGER_WINDOW_MOBILE_PROPERTY] = g_param_spec_boolean ("mobile", "mobile", "mobile", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_MANAGER_WINDOW_ENABLE_AUR_PROPERTY, pamac_manager_window_properties[PAMAC_MANAGER_WINDOW_ENABLE_AUR_PROPERTY] = g_param_spec_boolean ("enable-aur", "enable-aur", "enable-aur", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/manjaro/pamac/manager/manager_window.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "headerbar", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, headerbar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "menu_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, menu_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_stack", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, main_stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_back", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, button_back));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "packages_leaflet", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, packages_leaflet));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "packages_listbox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, packages_listbox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "notification_revealer", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, notification_revealer));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "notification_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, notification_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "notification_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, notification_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_button", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, search_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_entry", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, search_entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "reveal_sidebar_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, reveal_sidebar_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "reveal_details_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, reveal_details_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "browse_head_box_scrolledwindow", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, browse_head_box_scrolledwindow));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sortby_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, sortby_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "browse_flap", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, browse_flap));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "filters_listbox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, filters_listbox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "categories_listbox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, categories_listbox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "groups_listbox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, groups_listbox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "repos_listbox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, repos_listbox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "installed_listbox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, installed_listbox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_listbox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, search_listbox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "updates_listbox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, updates_listbox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "view_stack", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, view_stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "view_stack_switcher", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, view_stack_switcher));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "packages_stack", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, packages_stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "browse_stack", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, browse_stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "remove_all_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, remove_all_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "install_all_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, install_all_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "ignore_all_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, ignore_all_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sortby_combobox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, sortby_combobox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "packages_scrolledwindow", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, packages_scrolledwindow));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "updated_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, updated_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "last_refresh_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, last_refresh_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "no_item_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, no_item_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "checking_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, checking_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_details_box", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, main_details_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "details_scrolledwindow", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, details_scrolledwindow));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "properties_stack", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, properties_stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "properties_stack_switcher", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, properties_stack_switcher));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "files_scrolledwindow", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, files_scrolledwindow));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "build_files_box", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, build_files_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "deps_box", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, deps_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "details_grid", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, details_grid));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "name_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, name_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "app_image", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, app_image));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "screenshots_box", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, screenshots_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "screenshots_carousel", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, screenshots_carousel));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "previous_screenshot_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, previous_screenshot_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "next_screenshot_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, next_screenshot_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "desc_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, desc_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "long_desc_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, long_desc_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "link_label", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, link_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "launch_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, launch_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "remove_togglebutton", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, remove_togglebutton));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "reinstall_togglebutton", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, reinstall_togglebutton));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "install_togglebutton", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, install_togglebutton));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "build_togglebutton", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, build_togglebutton));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "files_textview", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, files_textview));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "transaction_infobox", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, transaction_infobox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "details_button", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, details_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "apply_button", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, apply_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cancel_button", FALSE, PamacManagerWindow_private_offset + G_STRUCT_OFFSET (PamacManagerWindowPrivate, cancel_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "infobox_revealer", FALSE, G_STRUCT_OFFSET (PamacManagerWindow, infobox_revealer));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_window_delete_event", G_CALLBACK(_pamac_manager_window_on_window_delete_event_gtk_widget_delete_event));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_next_screenshot_button_clicked", G_CALLBACK(_pamac_manager_window_on_next_screenshot_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_previous_screenshot_button_clicked", G_CALLBACK(_pamac_manager_window_on_previous_screenshot_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_screenshots_carousel_page_changed", G_CALLBACK(_pamac_manager_window_on_screenshots_carousel_page_changed_hdy_carousel_page_changed));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_launch_button_clicked", G_CALLBACK(_pamac_manager_window_on_launch_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_install_togglebutton_toggled", G_CALLBACK(_pamac_manager_window_on_install_togglebutton_toggled_gtk_toggle_button_toggled));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_build_togglebutton_toggled", G_CALLBACK(_pamac_manager_window_on_build_togglebutton_toggled_gtk_toggle_button_toggled));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_reset_files_button_clicked", G_CALLBACK(_pamac_manager_window_on_reset_files_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_remove_togglebutton_toggled", G_CALLBACK(_pamac_manager_window_on_remove_togglebutton_toggled_gtk_toggle_button_toggled));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_reinstall_togglebutton_toggled", G_CALLBACK(_pamac_manager_window_on_reinstall_togglebutton_toggled_gtk_toggle_button_toggled));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_packages_listbox_row_activated", G_CALLBACK(_pamac_manager_window_on_packages_listbox_row_activated_gtk_flow_box_child_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_remove_all_button_clicked", G_CALLBACK(_pamac_manager_window_on_remove_all_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_install_all_button_clicked", G_CALLBACK(_pamac_manager_window_on_install_all_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_ignore_all_button_clicked", G_CALLBACK(_pamac_manager_window_on_ignore_all_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_entry_activated", G_CALLBACK(_pamac_manager_window_on_search_entry_activated_gtk_entry_activate));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_entry_changed", G_CALLBACK(_pamac_manager_window_on_search_entry_changed_gtk_editable_changed));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_sortby_combobox_changed", G_CALLBACK(_pamac_manager_window_on_sortby_combobox_changed_gtk_combo_box_changed));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_filters_listbox_row_activated", G_CALLBACK(_pamac_manager_window_on_filters_listbox_row_activated_gtk_list_box_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_categories_listbox_row_activated", G_CALLBACK(_pamac_manager_window_on_categories_listbox_row_activated_gtk_list_box_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_groups_listbox_row_activated", G_CALLBACK(_pamac_manager_window_on_groups_listbox_row_activated_gtk_list_box_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_installed_listbox_row_activated", G_CALLBACK(_pamac_manager_window_on_installed_listbox_row_activated_gtk_list_box_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_listbox_row_activated", G_CALLBACK(_pamac_manager_window_on_search_listbox_row_activated_gtk_list_box_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_updates_listbox_row_activated", G_CALLBACK(_pamac_manager_window_on_updates_listbox_row_activated_gtk_list_box_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_repos_listbox_row_activated", G_CALLBACK(_pamac_manager_window_on_repos_listbox_row_activated_gtk_list_box_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_menu_button_toggled", G_CALLBACK(_pamac_manager_window_on_menu_button_toggled_gtk_toggle_button_toggled));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_details_button_clicked", G_CALLBACK(_pamac_manager_window_on_details_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_apply_button_clicked", G_CALLBACK(_pamac_manager_window_on_apply_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_cancel_button_clicked", G_CALLBACK(_pamac_manager_window_on_cancel_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_refresh_button_clicked", G_CALLBACK(_pamac_manager_window_on_refresh_button_clicked_gtk_button_clicked));
}

static void
pamac_manager_window_instance_init (PamacManagerWindow * self,
                                    gpointer klass)
{
	self->priv = pamac_manager_window_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
pamac_manager_window_finalize (GObject * obj)
{
	PamacManagerWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PAMAC_TYPE_MANAGER_WINDOW, PamacManagerWindow);
	_g_object_unref0 (self->priv->icon_theme);
	_g_object_unref0 (self->priv->package_icon);
	(self->display_package_queue == NULL) ? NULL : (self->display_package_queue = (_g_queue_free__g_object_unref0_ (self->display_package_queue), NULL));
	_g_object_unref0 (self->priv->current_package_displayed);
	_g_free0 (self->priv->current_launchable);
	_g_free0 (self->priv->current_files);
	_g_free0 (self->priv->current_build_files);
	_g_hash_table_unref0 (self->priv->previous_to_install);
	_g_hash_table_unref0 (self->priv->previous_to_remove);
	_g_hash_table_unref0 (self->priv->previous_to_build);
	_g_object_unref0 (self->transaction);
	_g_object_unref0 (self->priv->_database);
	_g_object_unref0 (self->local_config);
	_g_ptr_array_unref0 (self->priv->repos_updates);
	_g_ptr_array_unref0 (self->priv->aur_updates);
	_g_ptr_array_unref0 (self->priv->flatpak_updates);
	_g_object_unref0 (self->priv->categories_backrow);
	_g_object_unref0 (self->priv->filters_pending_row);
	_g_object_unref0 (self->priv->filters_pending_row_separator);
	_g_object_unref0 (self->priv->categories_pending_row);
	_g_object_unref0 (self->priv->categories_pending_row_separator);
	_g_object_unref0 (self->priv->installed_snap_row);
	_g_object_unref0 (self->priv->installed_flatpak_row);
	_g_object_unref0 (self->priv->search_aur_row);
	_g_object_unref0 (self->priv->search_snap_row);
	_g_object_unref0 (self->priv->search_flatpak_row);
	_g_object_unref0 (self->priv->updates_repos_row);
	_g_object_unref0 (self->priv->updates_aur_row);
	_g_object_unref0 (self->priv->updates_flatpak_row);
	_g_object_unref0 (self->priv->updates_ignored_row);
	_g_free0 (self->priv->previous_view_stack_visible_child_name);
	_g_free0 (self->priv->current_packages_list_name);
	_g_ptr_array_unref0 (self->priv->current_packages_list);
	_g_ptr_array_unref0 (self->priv->current_screenshots);
	_g_hash_table_unref0 (self->priv->previous_snap_to_install);
	_g_hash_table_unref0 (self->priv->previous_snap_to_remove);
	_g_hash_table_unref0 (self->priv->previous_flatpak_to_install);
	_g_hash_table_unref0 (self->priv->previous_flatpak_to_remove);
	_g_object_unref0 (self->priv->preferences_window);
	_g_object_unref0 (self->priv->preferences_action);
	_g_object_unref0 (self->priv->refresh_action);
	_g_object_unref0 (self->priv->install_local_action);
	G_OBJECT_CLASS (pamac_manager_window_parent_class)->finalize (obj);
}

static GType
pamac_manager_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PamacManagerWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pamac_manager_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PamacManagerWindow), 0, (GInstanceInitFunc) pamac_manager_window_instance_init, NULL };
	GType pamac_manager_window_type_id;
	pamac_manager_window_type_id = g_type_register_static (hdy_application_window_get_type (), "PamacManagerWindow", &g_define_type_info, 0);
	PamacManagerWindow_private_offset = g_type_add_instance_private (pamac_manager_window_type_id, sizeof (PamacManagerWindowPrivate));
	return pamac_manager_window_type_id;
}

GType
pamac_manager_window_get_type (void)
{
	static volatile gsize pamac_manager_window_type_id__once = 0;
	if (g_once_init_enter (&pamac_manager_window_type_id__once)) {
		GType pamac_manager_window_type_id;
		pamac_manager_window_type_id = pamac_manager_window_get_type_once ();
		g_once_init_leave (&pamac_manager_window_type_id__once, pamac_manager_window_type_id);
	}
	return pamac_manager_window_type_id__once;
}

static void
_vala_pamac_manager_window_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	PamacManagerWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PAMAC_TYPE_MANAGER_WINDOW, PamacManagerWindow);
	switch (property_id) {
		case PAMAC_MANAGER_WINDOW_DATABASE_PROPERTY:
		g_value_set_object (value, pamac_manager_window_get_database (self));
		break;
		case PAMAC_MANAGER_WINDOW_MOBILE_PROPERTY:
		g_value_set_boolean (value, pamac_manager_window_get_mobile (self));
		break;
		case PAMAC_MANAGER_WINDOW_ENABLE_AUR_PROPERTY:
		g_value_set_boolean (value, pamac_manager_window_get_enable_aur (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_pamac_manager_window_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	PamacManagerWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PAMAC_TYPE_MANAGER_WINDOW, PamacManagerWindow);
	switch (property_id) {
		case PAMAC_MANAGER_WINDOW_DATABASE_PROPERTY:
		pamac_manager_window_set_database (self, g_value_get_object (value));
		break;
		case PAMAC_MANAGER_WINDOW_MOBILE_PROPERTY:
		pamac_manager_window_set_mobile (self, g_value_get_boolean (value));
		break;
		case PAMAC_MANAGER_WINDOW_ENABLE_AUR_PROPERTY:
		pamac_manager_window_set_enable_aur (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

