/* FontList.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from FontList.vala, do not modify */

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

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <pango/pango.h>
#include "font-manager.h"
#include <json-glib/json-glib.h>
#include <gio/gio.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include <cairo-gobject.h>

#define search_tip _ ("Case insensitive search of family names.\n" \
"\n" \
"Start search using %s to filter based on filepath.\n" \
"Start search using %s to filter based on characters.")
#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 FONT_MANAGER_TYPE_LIST_ITEM_ROW (font_manager_list_item_row_get_type ())
#define FONT_MANAGER_LIST_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_LIST_ITEM_ROW, FontManagerListItemRow))
#define FONT_MANAGER_LIST_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_LIST_ITEM_ROW, FontManagerListItemRowClass))
#define FONT_MANAGER_IS_LIST_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_LIST_ITEM_ROW))
#define FONT_MANAGER_IS_LIST_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_LIST_ITEM_ROW))
#define FONT_MANAGER_LIST_ITEM_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_LIST_ITEM_ROW, FontManagerListItemRowClass))

typedef struct _FontManagerListItemRow FontManagerListItemRow;
typedef struct _FontManagerListItemRowClass FontManagerListItemRowClass;
typedef struct _FontManagerListItemRowPrivate FontManagerListItemRowPrivate;

#define FONT_MANAGER_TYPE_FONT_LIST_ROW (font_manager_font_list_row_get_type ())
#define FONT_MANAGER_FONT_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_FONT_LIST_ROW, FontManagerFontListRow))
#define FONT_MANAGER_FONT_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_FONT_LIST_ROW, FontManagerFontListRowClass))
#define FONT_MANAGER_IS_FONT_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_FONT_LIST_ROW))
#define FONT_MANAGER_IS_FONT_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_FONT_LIST_ROW))
#define FONT_MANAGER_FONT_LIST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_FONT_LIST_ROW, FontManagerFontListRowClass))

typedef struct _FontManagerFontListRow FontManagerFontListRow;
typedef struct _FontManagerFontListRowClass FontManagerFontListRowClass;
typedef struct _FontManagerFontListRowPrivate FontManagerFontListRowPrivate;
enum  {
	FONT_MANAGER_FONT_LIST_ROW_0_PROPERTY,
	FONT_MANAGER_FONT_LIST_ROW_NUM_PROPERTIES
};
static GParamSpec* font_manager_font_list_row_properties[FONT_MANAGER_FONT_LIST_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _pango_attr_list_unref0(var) ((var == NULL) ? NULL : (var = (pango_attr_list_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))

#define FONT_MANAGER_TYPE_FONT_LIST_BASE (font_manager_font_list_base_get_type ())
#define FONT_MANAGER_FONT_LIST_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_FONT_LIST_BASE, FontManagerFontListBase))
#define FONT_MANAGER_FONT_LIST_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_FONT_LIST_BASE, FontManagerFontListBaseClass))
#define FONT_MANAGER_IS_FONT_LIST_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_FONT_LIST_BASE))
#define FONT_MANAGER_IS_FONT_LIST_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_FONT_LIST_BASE))
#define FONT_MANAGER_FONT_LIST_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_FONT_LIST_BASE, FontManagerFontListBaseClass))

typedef struct _FontManagerFontListBase FontManagerFontListBase;
typedef struct _FontManagerFontListBaseClass FontManagerFontListBaseClass;
typedef struct _FontManagerFontListBasePrivate FontManagerFontListBasePrivate;

#define FONT_MANAGER_TYPE_CACHEABLE (font_manager_cacheable_get_type ())
#define FONT_MANAGER_CACHEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_CACHEABLE, FontManagerCacheable))
#define FONT_MANAGER_CACHEABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_CACHEABLE, FontManagerCacheableClass))
#define FONT_MANAGER_IS_CACHEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_CACHEABLE))
#define FONT_MANAGER_IS_CACHEABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_CACHEABLE))
#define FONT_MANAGER_CACHEABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_CACHEABLE, FontManagerCacheableClass))

typedef struct _FontManagerCacheable FontManagerCacheable;
typedef struct _FontManagerCacheableClass FontManagerCacheableClass;

#define FONT_MANAGER_TYPE_FONT_LIST_FILTER (font_manager_font_list_filter_get_type ())
#define FONT_MANAGER_FONT_LIST_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilter))
#define FONT_MANAGER_FONT_LIST_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilterClass))
#define FONT_MANAGER_IS_FONT_LIST_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_FONT_LIST_FILTER))
#define FONT_MANAGER_IS_FONT_LIST_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_FONT_LIST_FILTER))
#define FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilterClass))

typedef struct _FontManagerFontListFilter FontManagerFontListFilter;
typedef struct _FontManagerFontListFilterClass FontManagerFontListFilterClass;

#define FONT_MANAGER_TYPE_BASE_FONT_MODEL (font_manager_base_font_model_get_type ())
#define FONT_MANAGER_BASE_FONT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_BASE_FONT_MODEL, FontManagerBaseFontModel))
#define FONT_MANAGER_BASE_FONT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_BASE_FONT_MODEL, FontManagerBaseFontModelClass))
#define FONT_MANAGER_IS_BASE_FONT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_BASE_FONT_MODEL))
#define FONT_MANAGER_IS_BASE_FONT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_BASE_FONT_MODEL))
#define FONT_MANAGER_BASE_FONT_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_BASE_FONT_MODEL, FontManagerBaseFontModelClass))

typedef struct _FontManagerBaseFontModel FontManagerBaseFontModel;
typedef struct _FontManagerBaseFontModelClass FontManagerBaseFontModelClass;
enum  {
	FONT_MANAGER_FONT_LIST_BASE_0_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_AVAILABLE_FONTS_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_DISABLED_FAMILIES_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_FILTER_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_MODEL_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_SELECTION_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_LIST_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_SEARCH_ENTRY_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTION_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTIONS_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEM_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEMS_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_SELECTED_CHILDREN_PROPERTY,
	FONT_MANAGER_FONT_LIST_BASE_NUM_PROPERTIES
};
static GParamSpec* font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_NUM_PROPERTIES];
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
#define _gtk_bitset_unref0(var) ((var == NULL) ? NULL : (var = (gtk_bitset_unref (var), NULL)))
enum  {
	FONT_MANAGER_FONT_LIST_BASE_ACTIVATED_SIGNAL,
	FONT_MANAGER_FONT_LIST_BASE_SELECTION_CHANGED_SIGNAL,
	FONT_MANAGER_FONT_LIST_BASE_NUM_SIGNALS
};
static guint font_manager_font_list_base_signals[FONT_MANAGER_FONT_LIST_BASE_NUM_SIGNALS] = {0};

#define FONT_MANAGER_TYPE_FONT_LIST_CONTROLS (font_manager_font_list_controls_get_type ())
#define FONT_MANAGER_FONT_LIST_CONTROLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_FONT_LIST_CONTROLS, FontManagerFontListControls))
#define FONT_MANAGER_FONT_LIST_CONTROLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_FONT_LIST_CONTROLS, FontManagerFontListControlsClass))
#define FONT_MANAGER_IS_FONT_LIST_CONTROLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_FONT_LIST_CONTROLS))
#define FONT_MANAGER_IS_FONT_LIST_CONTROLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_FONT_LIST_CONTROLS))
#define FONT_MANAGER_FONT_LIST_CONTROLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_FONT_LIST_CONTROLS, FontManagerFontListControlsClass))

typedef struct _FontManagerFontListControls FontManagerFontListControls;
typedef struct _FontManagerFontListControlsClass FontManagerFontListControlsClass;
typedef struct _FontManagerFontListControlsPrivate FontManagerFontListControlsPrivate;
enum  {
	FONT_MANAGER_FONT_LIST_CONTROLS_0_PROPERTY,
	FONT_MANAGER_FONT_LIST_CONTROLS_REMOVE_BUTTON_PROPERTY,
	FONT_MANAGER_FONT_LIST_CONTROLS_EXPANDER_PROPERTY,
	FONT_MANAGER_FONT_LIST_CONTROLS_SEARCH_PROPERTY,
	FONT_MANAGER_FONT_LIST_CONTROLS_NUM_PROPERTIES
};
static GParamSpec* font_manager_font_list_controls_properties[FONT_MANAGER_FONT_LIST_CONTROLS_NUM_PROPERTIES];
enum  {
	FONT_MANAGER_FONT_LIST_CONTROLS_EXPANDER_ACTIVATED_SIGNAL,
	FONT_MANAGER_FONT_LIST_CONTROLS_REMOVE_CLICKED_SIGNAL,
	FONT_MANAGER_FONT_LIST_CONTROLS_NUM_SIGNALS
};
static guint font_manager_font_list_controls_signals[FONT_MANAGER_FONT_LIST_CONTROLS_NUM_SIGNALS] = {0};

#define FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW (font_manager_base_font_list_view_get_type ())
#define FONT_MANAGER_BASE_FONT_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, FontManagerBaseFontListView))
#define FONT_MANAGER_BASE_FONT_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, FontManagerBaseFontListViewClass))
#define FONT_MANAGER_IS_BASE_FONT_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW))
#define FONT_MANAGER_IS_BASE_FONT_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW))
#define FONT_MANAGER_BASE_FONT_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, FontManagerBaseFontListViewClass))

typedef struct _FontManagerBaseFontListView FontManagerBaseFontListView;
typedef struct _FontManagerBaseFontListViewClass FontManagerBaseFontListViewClass;
typedef struct _FontManagerBaseFontListViewPrivate FontManagerBaseFontListViewPrivate;
enum  {
	FONT_MANAGER_BASE_FONT_LIST_VIEW_0_PROPERTY,
	FONT_MANAGER_BASE_FONT_LIST_VIEW_NUM_PROPERTIES
};
static GParamSpec* font_manager_base_font_list_view_properties[FONT_MANAGER_BASE_FONT_LIST_VIEW_NUM_PROPERTIES];

#define FONT_MANAGER_TYPE_FONT_MODEL (font_manager_font_model_get_type ())
#define FONT_MANAGER_FONT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_FONT_MODEL, FontManagerFontModel))
#define FONT_MANAGER_FONT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_FONT_MODEL, FontManagerFontModelClass))
#define FONT_MANAGER_IS_FONT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_FONT_MODEL))
#define FONT_MANAGER_IS_FONT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_FONT_MODEL))
#define FONT_MANAGER_FONT_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_FONT_MODEL, FontManagerFontModelClass))

typedef struct _FontManagerFontModel FontManagerFontModel;
typedef struct _FontManagerFontModelClass FontManagerFontModelClass;

#define FONT_MANAGER_TYPE_FONT_LIST_VIEW (font_manager_font_list_view_get_type ())
#define FONT_MANAGER_FONT_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_FONT_LIST_VIEW, FontManagerFontListView))
#define FONT_MANAGER_FONT_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_FONT_LIST_VIEW, FontManagerFontListViewClass))
#define FONT_MANAGER_IS_FONT_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_FONT_LIST_VIEW))
#define FONT_MANAGER_IS_FONT_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_FONT_LIST_VIEW))
#define FONT_MANAGER_FONT_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_FONT_LIST_VIEW, FontManagerFontListViewClass))

typedef struct _FontManagerFontListView FontManagerFontListView;
typedef struct _FontManagerFontListViewClass FontManagerFontListViewClass;
typedef struct _FontManagerFontListViewPrivate FontManagerFontListViewPrivate;

#define FONT_MANAGER_TYPE_USER_ACTION_MODEL (font_manager_user_action_model_get_type ())
#define FONT_MANAGER_USER_ACTION_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_USER_ACTION_MODEL, FontManagerUserActionModel))
#define FONT_MANAGER_USER_ACTION_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_USER_ACTION_MODEL, FontManagerUserActionModelClass))
#define FONT_MANAGER_IS_USER_ACTION_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_USER_ACTION_MODEL))
#define FONT_MANAGER_IS_USER_ACTION_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_USER_ACTION_MODEL))
#define FONT_MANAGER_USER_ACTION_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_USER_ACTION_MODEL, FontManagerUserActionModelClass))

typedef struct _FontManagerUserActionModel FontManagerUserActionModel;
typedef struct _FontManagerUserActionModelClass FontManagerUserActionModelClass;

#define FONT_MANAGER_TYPE_USER_SOURCE_MODEL (font_manager_user_source_model_get_type ())
#define FONT_MANAGER_USER_SOURCE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_USER_SOURCE_MODEL, FontManagerUserSourceModel))
#define FONT_MANAGER_USER_SOURCE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_USER_SOURCE_MODEL, FontManagerUserSourceModelClass))
#define FONT_MANAGER_IS_USER_SOURCE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_USER_SOURCE_MODEL))
#define FONT_MANAGER_IS_USER_SOURCE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_USER_SOURCE_MODEL))
#define FONT_MANAGER_USER_SOURCE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_USER_SOURCE_MODEL, FontManagerUserSourceModelClass))

typedef struct _FontManagerUserSourceModel FontManagerUserSourceModel;
typedef struct _FontManagerUserSourceModelClass FontManagerUserSourceModelClass;
enum  {
	FONT_MANAGER_FONT_LIST_VIEW_0_PROPERTY,
	FONT_MANAGER_FONT_LIST_VIEW_USER_ACTIONS_PROPERTY,
	FONT_MANAGER_FONT_LIST_VIEW_USER_SOURCES_PROPERTY,
	FONT_MANAGER_FONT_LIST_VIEW_NUM_PROPERTIES
};
static GParamSpec* font_manager_font_list_view_properties[FONT_MANAGER_FONT_LIST_VIEW_NUM_PROPERTIES];
typedef enum  {
	FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_INSTALL,
	FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_COPY,
	FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_SHOW,
	FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_ENABLE,
	FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_DISABLE
} FontManagerFontListViewFontListMenuItem;

#define FONT_MANAGER_FONT_LIST_VIEW_TYPE_FONT_LIST_MENU_ITEM (font_manager_font_list_view_font_list_menu_item_get_type ())

#define FONT_MANAGER_TYPE_MENU_ENTRY (font_manager_menu_entry_get_type ())
typedef struct _FontManagerMenuEntry FontManagerMenuEntry;
#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))

#define FONT_MANAGER_TYPE_COLLECTION (font_manager_collection_get_type ())
#define FONT_MANAGER_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_COLLECTION, FontManagerCollection))
#define FONT_MANAGER_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_COLLECTION, FontManagerCollectionClass))
#define FONT_MANAGER_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_COLLECTION))
#define FONT_MANAGER_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_COLLECTION))
#define FONT_MANAGER_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_COLLECTION, FontManagerCollectionClass))

typedef struct _FontManagerCollection FontManagerCollection;
typedef struct _FontManagerCollectionClass FontManagerCollectionClass;
typedef struct _Block5Data Block5Data;
typedef struct _Block6Data Block6Data;

#define FONT_MANAGER_TYPE_BASE_CONTEXT_MENU (font_manager_base_context_menu_get_type ())
#define FONT_MANAGER_BASE_CONTEXT_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_BASE_CONTEXT_MENU, FontManagerBaseContextMenu))
#define FONT_MANAGER_BASE_CONTEXT_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_BASE_CONTEXT_MENU, FontManagerBaseContextMenuClass))
#define FONT_MANAGER_IS_BASE_CONTEXT_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_BASE_CONTEXT_MENU))
#define FONT_MANAGER_IS_BASE_CONTEXT_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_BASE_CONTEXT_MENU))
#define FONT_MANAGER_BASE_CONTEXT_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_BASE_CONTEXT_MENU, FontManagerBaseContextMenuClass))

typedef struct _FontManagerBaseContextMenu FontManagerBaseContextMenu;
typedef struct _FontManagerBaseContextMenuClass FontManagerBaseContextMenuClass;

#define FONT_MANAGER_TYPE_USER_ACTION (font_manager_user_action_get_type ())
#define FONT_MANAGER_USER_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_USER_ACTION, FontManagerUserAction))
#define FONT_MANAGER_USER_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_USER_ACTION, FontManagerUserActionClass))
#define FONT_MANAGER_IS_USER_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_USER_ACTION))
#define FONT_MANAGER_IS_USER_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_USER_ACTION))
#define FONT_MANAGER_USER_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_USER_ACTION, FontManagerUserActionClass))

typedef struct _FontManagerUserAction FontManagerUserAction;
typedef struct _FontManagerUserActionClass FontManagerUserActionClass;
typedef struct _Block7Data Block7Data;
enum  {
	FONT_MANAGER_FONT_LIST_VIEW_COLLECTION_CHANGED_SIGNAL,
	FONT_MANAGER_FONT_LIST_VIEW_NUM_SIGNALS
};
static guint font_manager_font_list_view_signals[FONT_MANAGER_FONT_LIST_VIEW_NUM_SIGNALS] = {0};

#define FONT_MANAGER_TYPE_REMOVE_LIST_VIEW (font_manager_remove_list_view_get_type ())
#define FONT_MANAGER_REMOVE_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_REMOVE_LIST_VIEW, FontManagerRemoveListView))
#define FONT_MANAGER_REMOVE_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_REMOVE_LIST_VIEW, FontManagerRemoveListViewClass))
#define FONT_MANAGER_IS_REMOVE_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_REMOVE_LIST_VIEW))
#define FONT_MANAGER_IS_REMOVE_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_REMOVE_LIST_VIEW))
#define FONT_MANAGER_REMOVE_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_REMOVE_LIST_VIEW, FontManagerRemoveListViewClass))

typedef struct _FontManagerRemoveListView FontManagerRemoveListView;
typedef struct _FontManagerRemoveListViewClass FontManagerRemoveListViewClass;
typedef struct _FontManagerRemoveListViewPrivate FontManagerRemoveListViewPrivate;
enum  {
	FONT_MANAGER_REMOVE_LIST_VIEW_0_PROPERTY,
	FONT_MANAGER_REMOVE_LIST_VIEW_SELECTED_FILES_PROPERTY,
	FONT_MANAGER_REMOVE_LIST_VIEW_NUM_PROPERTIES
};
static GParamSpec* font_manager_remove_list_view_properties[FONT_MANAGER_REMOVE_LIST_VIEW_NUM_PROPERTIES];
typedef struct _Block8Data Block8Data;

#define FONT_MANAGER_TYPE_CATEGORY (font_manager_category_get_type ())
#define FONT_MANAGER_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_CATEGORY, FontManagerCategory))
#define FONT_MANAGER_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_CATEGORY, FontManagerCategoryClass))
#define FONT_MANAGER_IS_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_CATEGORY))
#define FONT_MANAGER_IS_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_CATEGORY))
#define FONT_MANAGER_CATEGORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_CATEGORY, FontManagerCategoryClass))

typedef struct _FontManagerCategory FontManagerCategory;
typedef struct _FontManagerCategoryClass FontManagerCategoryClass;

#define FONT_MANAGER_TYPE_USER_FONTS (font_manager_user_fonts_get_type ())
#define FONT_MANAGER_USER_FONTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_USER_FONTS, FontManagerUserFonts))
#define FONT_MANAGER_USER_FONTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_USER_FONTS, FontManagerUserFontsClass))
#define FONT_MANAGER_IS_USER_FONTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_USER_FONTS))
#define FONT_MANAGER_IS_USER_FONTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_USER_FONTS))
#define FONT_MANAGER_USER_FONTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_USER_FONTS, FontManagerUserFontsClass))

typedef struct _FontManagerUserFonts FontManagerUserFonts;
typedef struct _FontManagerUserFontsClass FontManagerUserFontsClass;
enum  {
	FONT_MANAGER_REMOVE_LIST_VIEW_CHANGED_SIGNAL,
	FONT_MANAGER_REMOVE_LIST_VIEW_NUM_SIGNALS
};
static guint font_manager_remove_list_view_signals[FONT_MANAGER_REMOVE_LIST_VIEW_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _FontManagerListItemRow {
	GtkBox parent_instance;
	FontManagerListItemRowPrivate * priv;
};

struct _FontManagerListItemRowClass {
	GtkBoxClass parent_class;
	void (*on_item_set) (FontManagerListItemRow* self);
	void (*reset) (FontManagerListItemRow* self);
};

struct _FontManagerFontListRow {
	FontManagerListItemRow parent_instance;
	FontManagerFontListRowPrivate * priv;
};

struct _FontManagerFontListRowClass {
	FontManagerListItemRowClass parent_class;
};

struct _FontManagerFontListRowPrivate {
	gulong signal_id;
	GBinding* state_binding;
	PangoAttrList* attrs;
};

struct _FontManagerFontListBase {
	GtkBox parent_instance;
	FontManagerFontListBasePrivate * priv;
};

struct _FontManagerFontListBaseClass {
	GtkBoxClass parent_class;
	void (*update) (FontManagerFontListBase* self, guint position);
	void (*setup_list_row) (FontManagerFontListBase* self, GtkSignalListItemFactory* factory, GObject* item);
	void (*bind_list_row) (FontManagerFontListBase* self, GtkSignalListItemFactory* factory, GObject* item);
	void (*on_selection_changed) (FontManagerFontListBase* self, guint position, guint n_items);
};

struct _FontManagerFontListBasePrivate {
	JsonArray* _available_fonts;
	FontManagerReject* _disabled_families;
	FontManagerFontListFilter* _filter;
	FontManagerBaseFontModel* _model;
	GtkSelectionModel* _selection;
	GtkListBase* _list;
	GtkSearchEntry* _search_entry;
	guint _current_selection;
	GPtrArray* _current_selections;
	GObject* _selected_item;
	GPtrArray* _selected_items;
	GPtrArray* _selected_children;
	guint search_timeout;
	gchar* previously_selected_family;
};

struct _FontManagerFontListControls {
	GtkBox parent_instance;
	FontManagerFontListControlsPrivate * priv;
};

struct _FontManagerFontListControlsClass {
	GtkBoxClass parent_class;
	void (*on_expander_activated) (FontManagerFontListControls* self, GtkExpander* expander);
};

struct _FontManagerFontListControlsPrivate {
	GtkButton* _remove_button;
	GtkExpander* _expander;
	GtkSearchEntry* _search;
};

struct _FontManagerBaseFontListView {
	FontManagerFontListBase parent_instance;
	FontManagerBaseFontListViewPrivate * priv;
	GtkTreeListModel* treemodel;
	FontManagerFontListControls* controls;
};

struct _FontManagerBaseFontListViewClass {
	FontManagerFontListBaseClass parent_class;
	void (*on_activate) (FontManagerBaseFontListView* self, guint position);
	void (*on_expander_activated) (FontManagerBaseFontListView* self, gboolean expanded);
};

struct _FontManagerFontListView {
	FontManagerBaseFontListView parent_instance;
	FontManagerFontListViewPrivate * priv;
};

struct _FontManagerFontListViewClass {
	FontManagerBaseFontListViewClass parent_class;
};

struct _FontManagerFontListViewPrivate {
	FontManagerUserActionModel* _user_actions;
	FontManagerUserSourceModel* _user_sources;
	guint state_change_timeout;
	gboolean ignore_state_change;
	gboolean show_menu;
	GMenu* menu;
	GArray* menu_items;
	GtkLabel* menu_title;
	GtkPopoverMenu* context_menu;
};

struct _FontManagerMenuEntry {
	gchar* action_name;
	gchar* display_name;
};

struct _Block5Data {
	int _ref_count_;
	FontManagerFontListView* self;
	FontManagerCollection* collection;
	FontManagerStringSet* selected_families;
	guint i;
};

struct _Block6Data {
	int _ref_count_;
	FontManagerFontListView* self;
	gboolean active;
};

struct _Block7Data {
	int _ref_count_;
	FontManagerFontListView* self;
	FontManagerUserAction* entry;
	FontManagerFont* target;
};

struct _FontManagerRemoveListView {
	FontManagerBaseFontListView parent_instance;
	FontManagerRemoveListViewPrivate * priv;
};

struct _FontManagerRemoveListViewClass {
	FontManagerBaseFontListViewClass parent_class;
};

struct _FontManagerRemoveListViewPrivate {
	FontManagerStringSet* _selected_files;
};

struct _Block8Data {
	int _ref_count_;
	FontManagerRemoveListView* self;
	GtkTreeListRow* list_row;
};

static gint FontManagerFontListRow_private_offset;
static gpointer font_manager_font_list_row_parent_class = NULL;
static gint FontManagerFontListBase_private_offset;
static gpointer font_manager_font_list_base_parent_class = NULL;
static gint FontManagerFontListControls_private_offset;
static gpointer font_manager_font_list_controls_parent_class = NULL;
static gpointer font_manager_base_font_list_view_parent_class = NULL;
static gint FontManagerFontListView_private_offset;
static gpointer font_manager_font_list_view_parent_class = NULL;
static gint FontManagerRemoveListView_private_offset;
static gpointer font_manager_remove_list_view_parent_class = NULL;

VALA_EXTERN GType font_manager_list_item_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerListItemRow, g_object_unref)
VALA_EXTERN GType font_manager_font_list_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontListRow, g_object_unref)
VALA_EXTERN void font_manager_list_item_row_reset (FontManagerListItemRow* self);
VALA_EXTERN void font_manager_list_item_row_on_item_set (FontManagerListItemRow* self);
static void font_manager_font_list_row_real_reset (FontManagerListItemRow* base);
VALA_EXTERN GtkCheckButton* font_manager_list_item_row_get_item_state (FontManagerListItemRow* self);
VALA_EXTERN GtkLabel* font_manager_list_item_row_get_item_label (FontManagerListItemRow* self);
VALA_EXTERN GtkInscription* font_manager_list_item_row_get_item_preview (FontManagerListItemRow* self);
VALA_EXTERN GtkLabel* font_manager_list_item_row_get_item_count (FontManagerListItemRow* self);
static void font_manager_font_list_row_real_on_item_set (FontManagerListItemRow* base);
VALA_EXTERN GObject* font_manager_list_item_row_get_item (FontManagerListItemRow* self);
VALA_EXTERN GtkBox* font_manager_list_item_row_get_drag_area (FontManagerListItemRow* self);
VALA_EXTERN GtkImage* font_manager_list_item_row_get_drag_handle (FontManagerListItemRow* self);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
static void __lambda94_ (FontManagerFontListRow* self);
static void ___lambda94__gtk_check_button_toggled (GtkCheckButton* _sender,
                                            gpointer self);
VALA_EXTERN FontManagerFontListRow* font_manager_font_list_row_new (void);
VALA_EXTERN FontManagerFontListRow* font_manager_font_list_row_construct (GType object_type);
VALA_EXTERN FontManagerListItemRow* font_manager_list_item_row_new (void);
VALA_EXTERN FontManagerListItemRow* font_manager_list_item_row_construct (GType object_type);
static GObject * font_manager_font_list_row_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties);
static void font_manager_font_list_row_finalize (GObject * obj);
static GType font_manager_font_list_row_get_type_once (void);
VALA_EXTERN GType font_manager_font_list_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontListBase, g_object_unref)
VALA_EXTERN GType font_manager_cacheable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCacheable, g_object_unref)
VALA_EXTERN GType font_manager_font_list_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontListFilter, g_object_unref)
VALA_EXTERN GType font_manager_base_font_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerBaseFontModel, g_object_unref)
VALA_EXTERN void font_manager_font_list_base_update (FontManagerFontListBase* self,
                                         guint position);
VALA_EXTERN void font_manager_font_list_base_setup_list_row (FontManagerFontListBase* self,
                                                 GtkSignalListItemFactory* factory,
                                                 GObject* item);
VALA_EXTERN void font_manager_font_list_base_bind_list_row (FontManagerFontListBase* self,
                                                GtkSignalListItemFactory* factory,
                                                GObject* item);
VALA_EXTERN void font_manager_font_list_base_on_selection_changed (FontManagerFontListBase* self,
                                                       guint position,
                                                       guint n_items);
VALA_EXTERN void font_manager_font_list_base_select_item (FontManagerFontListBase* self,
                                              guint position);
VALA_EXTERN GtkListBase* font_manager_font_list_base_get_list (FontManagerFontListBase* self);
static void font_manager_font_list_base_real_update (FontManagerFontListBase* self,
                                              guint position);
VALA_EXTERN FontManagerBaseFontModel* font_manager_font_list_base_get_model (FontManagerFontListBase* self);
VALA_EXTERN GtkSearchEntry* font_manager_font_list_base_get_search_entry (FontManagerFontListBase* self);
VALA_EXTERN void font_manager_base_font_model_set_search_term (FontManagerBaseFontModel* self,
                                                   const gchar* value);
VALA_EXTERN void font_manager_base_font_model_update_items (FontManagerBaseFontModel* self);
VALA_EXTERN guint font_manager_base_font_model_get_n_items (FontManagerBaseFontModel* self);
static gboolean _font_manager_font_list_base_queue_update (FontManagerFontListBase* self);
VALA_EXTERN void font_manager_font_list_base_queue_update (FontManagerFontListBase* self);
static gboolean __font_manager_font_list_base_queue_update_gsource_func (gpointer self);
VALA_EXTERN GPtrArray* font_manager_font_list_base_get_selected_items (FontManagerFontListBase* self);
VALA_EXTERN void font_manager_font_list_base_next_match (FontManagerFontListBase* self,
                                             GtkSearchEntry* entry);
VALA_EXTERN guint font_manager_font_list_base_get_current_selection (FontManagerFontListBase* self);
VALA_EXTERN void font_manager_font_list_base_previous_match (FontManagerFontListBase* self,
                                                 GtkSearchEntry* entry);
static void font_manager_font_list_base_real_setup_list_row (FontManagerFontListBase* self,
                                                      GtkSignalListItemFactory* factory,
                                                      GObject* item);
static void font_manager_font_list_base_real_bind_list_row (FontManagerFontListBase* self,
                                                     GtkSignalListItemFactory* factory,
                                                     GObject* item);
static void font_manager_font_list_base_real_on_selection_changed (FontManagerFontListBase* self,
                                                            guint position,
                                                            guint n_items);
VALA_EXTERN void font_manager_font_list_base_set_current_selection (FontManagerFontListBase* self,
                                                        guint value);
VALA_EXTERN void font_manager_font_list_base_set_current_selections (FontManagerFontListBase* self,
                                                         GPtrArray* value);
VALA_EXTERN GtkSelectionModel* font_manager_font_list_base_get_selection (FontManagerFontListBase* self);
VALA_EXTERN GPtrArray* font_manager_font_list_base_get_current_selections (FontManagerFontListBase* self);
static GtkSignalListItemFactory* font_manager_font_list_base_get_factory (FontManagerFontListBase* self);
static void _font_manager_font_list_base_setup_list_row_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                     GObject* object,
                                                                                     gpointer self);
static void _font_manager_font_list_base_bind_list_row_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                   GObject* object,
                                                                                   gpointer self);
VALA_EXTERN FontManagerFontListBase* font_manager_font_list_base_new (void);
VALA_EXTERN FontManagerFontListBase* font_manager_font_list_base_construct (GType object_type);
VALA_EXTERN JsonArray* font_manager_font_list_base_get_available_fonts (FontManagerFontListBase* self);
VALA_EXTERN void font_manager_font_list_base_set_available_fonts (FontManagerFontListBase* self,
                                                      JsonArray* value);
VALA_EXTERN FontManagerReject* font_manager_font_list_base_get_disabled_families (FontManagerFontListBase* self);
VALA_EXTERN void font_manager_font_list_base_set_disabled_families (FontManagerFontListBase* self,
                                                        FontManagerReject* value);
VALA_EXTERN FontManagerFontListFilter* font_manager_font_list_base_get_filter (FontManagerFontListBase* self);
VALA_EXTERN void font_manager_font_list_base_set_filter (FontManagerFontListBase* self,
                                             FontManagerFontListFilter* value);
VALA_EXTERN void font_manager_font_list_base_set_model (FontManagerFontListBase* self,
                                            FontManagerBaseFontModel* value);
VALA_EXTERN void font_manager_font_list_base_set_selection (FontManagerFontListBase* self,
                                                GtkSelectionModel* value);
VALA_EXTERN void font_manager_font_list_base_set_list (FontManagerFontListBase* self,
                                           GtkListBase* value);
VALA_EXTERN void font_manager_font_list_base_set_search_entry (FontManagerFontListBase* self,
                                                   GtkSearchEntry* value);
VALA_EXTERN GObject* font_manager_font_list_base_get_selected_item (FontManagerFontListBase* self);
VALA_EXTERN void font_manager_font_list_base_set_selected_item (FontManagerFontListBase* self,
                                                    GObject* value);
VALA_EXTERN void font_manager_font_list_base_set_selected_items (FontManagerFontListBase* self,
                                                     GPtrArray* value);
VALA_EXTERN GPtrArray* font_manager_font_list_base_get_selected_children (FontManagerFontListBase* self);
VALA_EXTERN void font_manager_font_list_base_set_selected_children (FontManagerFontListBase* self,
                                                        GPtrArray* value);
static GObject * font_manager_font_list_base_constructor (GType type,
                                                   guint n_construct_properties,
                                                   GObjectConstructParam * construct_properties);
static void _font_manager_font_list_base___lambda85_ (FontManagerFontListBase* self);
static void ___lambda86_ (FontManagerFontListBase* self,
                   guint position);
static void ____lambda86__gtk_list_view_activate (GtkListView* _sender,
                                           guint position,
                                           gpointer self);
static void ____lambda87_ (FontManagerFontListBase* self,
                    guint position);
static void _____lambda87__gtk_grid_view_activate (GtkGridView* _sender,
                                            guint position,
                                            gpointer self);
static void __font_manager_font_list_base___lambda85__g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self);
static void _font_manager_font_list_base___lambda88_ (FontManagerFontListBase* self);
static void _font_manager_font_list_base_on_selection_changed_gtk_selection_model_selection_changed (GtkSelectionModel* _sender,
                                                                                              guint position,
                                                                                              guint n_items,
                                                                                              gpointer self);
static void __font_manager_font_list_base___lambda88__g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self);
static void _font_manager_font_list_base___lambda89_ (FontManagerFontListBase* self);
static void __font_manager_font_list_base___lambda89__g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self);
static void _font_manager_font_list_base___lambda90_ (FontManagerFontListBase* self);
static void _font_manager_font_list_base_next_match_gtk_search_entry_activate (GtkSearchEntry* _sender,
                                                                        gpointer self);
static void _font_manager_font_list_base_next_match_gtk_search_entry_next_match (GtkSearchEntry* _sender,
                                                                          gpointer self);
static void _font_manager_font_list_base_previous_match_gtk_search_entry_previous_match (GtkSearchEntry* _sender,
                                                                                  gpointer self);
static void _font_manager_font_list_base_queue_update_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                                gpointer self);
static void __font_manager_font_list_base___lambda90__g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self);
static void _font_manager_font_list_base___lambda91_ (FontManagerFontListBase* self);
static void ___lambda92_ (FontManagerFontListBase* self);
static void ____lambda92__font_manager_string_set_changed (FontManagerStringSet* _sender,
                                                    gpointer self);
static void __font_manager_font_list_base___lambda91__g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self);
static void _font_manager_font_list_base___lambda93_ (FontManagerFontListBase* self);
static void __font_manager_font_list_base___lambda93__g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self);
static void font_manager_font_list_base_finalize (GObject * obj);
static GType font_manager_font_list_base_get_type_once (void);
static void _vala_font_manager_font_list_base_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_font_manager_font_list_base_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);
VALA_EXTERN GType font_manager_font_list_controls_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontListControls, g_object_unref)
VALA_EXTERN void font_manager_font_list_controls_on_expander_activated (FontManagerFontListControls* self,
                                                            GtkExpander* expander);
VALA_EXTERN void font_manager_font_list_controls_on_remove_clicked (FontManagerFontListControls* self);
static void _font_manager_font_list_controls_on_remove_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void font_manager_font_list_controls_real_on_expander_activated (FontManagerFontListControls* self,
                                                                 GtkExpander* expander);
static void _font_manager_font_list_controls_on_expander_activated_gtk_expander_activate (GtkExpander* _sender,
                                                                                   gpointer self);
VALA_EXTERN FontManagerFontListControls* font_manager_font_list_controls_new (void);
VALA_EXTERN FontManagerFontListControls* font_manager_font_list_controls_construct (GType object_type);
VALA_EXTERN GtkButton* font_manager_font_list_controls_get_remove_button (FontManagerFontListControls* self);
VALA_EXTERN GtkExpander* font_manager_font_list_controls_get_expander (FontManagerFontListControls* self);
VALA_EXTERN GtkSearchEntry* font_manager_font_list_controls_get_search (FontManagerFontListControls* self);
static void font_manager_font_list_controls_finalize (GObject * obj);
static GType font_manager_font_list_controls_get_type_once (void);
static void _vala_font_manager_font_list_controls_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
VALA_EXTERN GType font_manager_base_font_list_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerBaseFontListView, g_object_unref)
VALA_EXTERN void font_manager_base_font_list_view_on_activate (FontManagerBaseFontListView* self,
                                                   guint position);
VALA_EXTERN void font_manager_base_font_list_view_on_expander_activated (FontManagerBaseFontListView* self,
                                                             gboolean expanded);
VALA_EXTERN void font_manager_base_font_list_view_focus_search_entry (FontManagerBaseFontListView* self);
static void font_manager_base_font_list_view_real_on_activate (FontManagerBaseFontListView* self,
                                                        guint position);
static void font_manager_base_font_list_view_real_on_expander_activated (FontManagerBaseFontListView* self,
                                                                  gboolean expanded);
static void font_manager_base_font_list_view_real_setup_list_row (FontManagerFontListBase* base,
                                                           GtkSignalListItemFactory* factory,
                                                           GObject* item);
static void font_manager_base_font_list_view_real_bind_list_row (FontManagerFontListBase* base,
                                                          GtkSignalListItemFactory* factory,
                                                          GObject* item);
VALA_EXTERN void font_manager_list_item_row_set_item (FontManagerListItemRow* self,
                                          GObject* value);
static void font_manager_base_font_list_view_real_on_selection_changed (FontManagerFontListBase* base,
                                                                 guint position,
                                                                 guint n_items);
static void _g_object_unref0_ (gpointer var);
VALA_EXTERN FontManagerBaseFontListView* font_manager_base_font_list_view_new (void);
VALA_EXTERN FontManagerBaseFontListView* font_manager_base_font_list_view_construct (GType object_type);
static GObject * font_manager_base_font_list_view_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties);
VALA_EXTERN FontManagerFontModel* font_manager_font_model_new (void);
VALA_EXTERN FontManagerFontModel* font_manager_font_model_construct (GType object_type);
VALA_EXTERN GType font_manager_font_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontModel, g_object_unref)
VALA_EXTERN GListModel* font_manager_font_model_get_child_model (FontManagerFontModel* self,
                                                     GObject* item);
static GListModel* _font_manager_font_model_get_child_model_gtk_tree_list_model_create_model_func (GObject* item,
                                                                                            gpointer self);
static void _font_manager_base_font_list_view_on_expander_activated_font_manager_font_list_controls_expander_activated (FontManagerFontListControls* _sender,
                                                                                                                 gboolean expanded,
                                                                                                                 gpointer self);
static void _font_manager_base_font_list_view_on_activate_gtk_list_view_activate (GtkListView* _sender,
                                                                           guint position,
                                                                           gpointer self);
static void font_manager_base_font_list_view_finalize (GObject * obj);
static GType font_manager_base_font_list_view_get_type_once (void);
VALA_EXTERN GType font_manager_font_list_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontListView, g_object_unref)
VALA_EXTERN GType font_manager_user_action_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerUserActionModel, g_object_unref)
VALA_EXTERN GType font_manager_user_source_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerUserSourceModel, g_object_unref)
static GType font_manager_font_list_view_font_list_menu_item_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
VALA_EXTERN GType font_manager_menu_entry_get_type (void) G_GNUC_CONST ;
VALA_EXTERN FontManagerMenuEntry* font_manager_menu_entry_dup (const FontManagerMenuEntry* self);
VALA_EXTERN void font_manager_menu_entry_free (FontManagerMenuEntry* self);
VALA_EXTERN void font_manager_menu_entry_copy (const FontManagerMenuEntry* self,
                                   FontManagerMenuEntry* dest);
VALA_EXTERN void font_manager_menu_entry_destroy (FontManagerMenuEntry* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (FontManagerMenuEntry, font_manager_menu_entry_destroy)
VALA_EXTERN void font_manager_font_list_view_set_search_term (FontManagerFontListView* self,
                                                  const gchar* needle);
VALA_EXTERN FontManagerFont* font_manager_font_list_view_get_selected_font (FontManagerFontListView* self);
static void font_manager_font_list_view_real_on_activate (FontManagerBaseFontListView* base,
                                                   guint position);
static void __lambda95_ (FontManagerFontListView* self,
                  GObject* i);
static void ___lambda95__gfunc (gconstpointer data,
                         gpointer self);
static void __lambda96_ (FontManagerFontListView* self,
                  guint i);
static void ___lambda96__gfunc (gconstpointer data,
                         gpointer self);
VALA_EXTERN void font_manager_font_list_view_on_remove_clicked (FontManagerFontListView* self);
VALA_EXTERN GType font_manager_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCollection, g_object_unref)
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
static void __lambda97_ (Block5Data* _data5_,
                  GObject* i);
static void ___lambda97__gfunc (gconstpointer data,
                         gpointer self);
VALA_EXTERN void font_manager_collection_remove (FontManagerCollection* self,
                                     FontManagerStringSet* old_families);
static gboolean __lambda98_ (Block5Data* _data5_);
static void font_manager_font_list_view_update_remove_sensitivity (FontManagerFontListView* self);
VALA_EXTERN void font_manager_collection_queue_state_update (FontManagerCollection* self);
static gboolean ___lambda98__gsource_func (gpointer self);
static gchar* font_manager_font_list_view_get_path_to_selected_item (FontManagerFontListView* self);
static void font_manager_font_list_view_set_selected_items_active (FontManagerFontListView* self,
                                                            gboolean active);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static gboolean __lambda99_ (Block6Data* _data6_);
static gboolean ___lambda99__gsource_func (gpointer self);
static void font_manager_font_list_view_enable_selected (FontManagerFontListView* self,
                                                  GtkWidget* widget,
                                                  const gchar* action,
                                                  GVariant* parameter);
static void font_manager_font_list_view_disable_selected (FontManagerFontListView* self,
                                                   GtkWidget* widget,
                                                   const gchar* action,
                                                   GVariant* parameter);
static void font_manager_font_list_view_copy_location (FontManagerFontListView* self,
                                                GtkWidget* widget,
                                                const gchar* action,
                                                GVariant* parameter);
static void font_manager_font_list_view_show_in_folder (FontManagerFontListView* self,
                                                 GtkWidget* widget,
                                                 const gchar* action,
                                                 GVariant* parameter);
static void font_manager_font_list_view_init_context_menu (FontManagerFontListView* self);
static void _vala_GMenuItem_free_function_content_of (gpointer data);
VALA_EXTERN GType font_manager_base_context_menu_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerBaseContextMenu, g_object_unref)
VALA_EXTERN FontManagerBaseContextMenu* font_manager_base_context_menu_new (GtkWidget* parent);
VALA_EXTERN FontManagerBaseContextMenu* font_manager_base_context_menu_construct (GType object_type,
                                                                      GtkWidget* parent);
VALA_EXTERN GtkPopoverMenu* font_manager_base_context_menu_get_popover (FontManagerBaseContextMenu* self);
VALA_EXTERN GtkLabel* font_manager_base_context_menu_get_menu_title (FontManagerBaseContextMenu* self);
VALA_EXTERN GMenu* font_manager_base_context_menu_get_menu (FontManagerBaseContextMenu* self);
static gboolean font_manager_font_list_view_is_sourced (FontManagerFontListView* self,
                                                 FontManagerFont* font);
VALA_EXTERN FontManagerUserSourceModel* font_manager_font_list_view_get_user_sources (FontManagerFontListView* self);
VALA_EXTERN GPtrArray* font_manager_user_source_model_get_items (FontManagerUserSourceModel* self);
static gboolean font_manager_font_list_view_selections_are_sourced (FontManagerFontListView* self);
static void font_manager_font_list_view_update_context_menu (FontManagerFontListView* self);
VALA_EXTERN FontManagerUserActionModel* font_manager_font_list_view_get_user_actions (FontManagerFontListView* self);
VALA_EXTERN guint font_manager_user_action_model_get_size (FontManagerUserActionModel* self);
VALA_EXTERN GType font_manager_user_action_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerUserAction, g_object_unref)
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
VALA_EXTERN FontManagerUserAction* font_manager_user_action_model_get (FontManagerUserActionModel* self,
                                                           guint index);
VALA_EXTERN const gchar* font_manager_user_action_get_action_name (FontManagerUserAction* self);
static void _______lambda100_ (Block7Data* _data7_);
VALA_EXTERN void font_manager_user_action_run (FontManagerUserAction* self,
                                   FontManagerFont* font);
static void ________lambda100__gtk_button_clicked (GtkButton* _sender,
                                            gpointer self);
static void font_manager_font_list_view_on_show_context_menu (FontManagerFontListView* self,
                                                       gint n_press,
                                                       gdouble x,
                                                       gdouble y);
static GdkContentProvider* font_manager_font_list_view_prepare_drag (FontManagerFontListView* self,
                                                              GtkDragSource* source,
                                                              gdouble x,
                                                              gdouble y);
static void font_manager_font_list_view_drag_begin (FontManagerFontListView* self,
                                             GtkDragSource* drag_source,
                                             GdkDrag* drag);
static void font_manager_font_list_view_real_setup_list_row (FontManagerFontListBase* base,
                                                      GtkSignalListItemFactory* factory,
                                                      GObject* item);
static GdkContentProvider* _font_manager_font_list_view_prepare_drag_gtk_drag_source_prepare (GtkDragSource* _sender,
                                                                                       gdouble x,
                                                                                       gdouble y,
                                                                                       gpointer self);
static void _font_manager_font_list_view_drag_begin_gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                                                         GdkDrag* drag,
                                                                         gpointer self);
static void font_manager_font_list_view_real_bind_list_row (FontManagerFontListBase* base,
                                                     GtkSignalListItemFactory* factory,
                                                     GObject* item);
static void font_manager_font_list_view_on_item_state_changed (FontManagerFontListView* self,
                                                        GObject* item);
static void _font_manager_font_list_view_on_item_state_changed_font_manager_list_item_row_item_state_changed (FontManagerListItemRow* _sender,
                                                                                                       GObject* item,
                                                                                                       gpointer self);
static gboolean font_manager_font_list_view_save_item_state_change (FontManagerFontListView* self);
static void font_manager_font_list_view_queue_item_state_update (FontManagerFontListView* self);
static gboolean _font_manager_font_list_view_save_item_state_change_gsource_func (gpointer self);
VALA_EXTERN FontManagerStringSet* font_manager_collection_get_families (FontManagerCollection* self);
VALA_EXTERN void font_manager_set_control_sensitivity (GtkWidget* widget,
                                           gboolean sensitive);
static void font_manager_font_list_view_real_on_selection_changed (FontManagerFontListBase* base,
                                                            guint position,
                                                            guint n_items);
VALA_EXTERN FontManagerFontListView* font_manager_font_list_view_new (void);
VALA_EXTERN FontManagerFontListView* font_manager_font_list_view_construct (GType object_type);
VALA_EXTERN void font_manager_font_list_view_set_user_actions (FontManagerFontListView* self,
                                                   FontManagerUserActionModel* value);
VALA_EXTERN void font_manager_font_list_view_set_user_sources (FontManagerFontListView* self,
                                                   FontManagerUserSourceModel* value);
static GObject * font_manager_font_list_view_constructor (GType type,
                                                   guint n_construct_properties,
                                                   GObjectConstructParam * construct_properties);
static void _font_manager_font_list_view_on_show_context_menu_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                                  gint n_press,
                                                                                  gdouble x,
                                                                                  gdouble y,
                                                                                  gpointer self);
static void _font_manager_font_list_view___lambda101_ (FontManagerFontListView* self);
static gboolean __lambda102_ (FontManagerFontListView* self);
static gboolean ___lambda102__gsource_func (gpointer self);
static void __font_manager_font_list_view___lambda101__g_object_notify (GObject* _sender,
                                                                 GParamSpec* pspec,
                                                                 gpointer self);
static void _font_manager_font_list_view___lambda103_ (FontManagerFontListView* self);
static void _font_manager_font_list_view_queue_item_state_update_font_manager_string_set_changed (FontManagerStringSet* _sender,
                                                                                           gpointer self);
static void __font_manager_font_list_view___lambda103__g_object_notify (GObject* _sender,
                                                                 GParamSpec* pspec,
                                                                 gpointer self);
static void _font_manager_font_list_view_on_remove_clicked_font_manager_font_list_controls_remove_clicked (FontManagerFontListControls* _sender,
                                                                                                    gpointer self);
static void font_manager_font_list_view_finalize (GObject * obj);
static GType font_manager_font_list_view_get_type_once (void);
static void _vala_font_manager_font_list_view_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_font_manager_font_list_view_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);
VALA_EXTERN GType font_manager_remove_list_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerRemoveListView, g_object_unref)
VALA_EXTERN void font_manager_remove_list_view_set_search_entry (FontManagerRemoveListView* self,
                                                     GtkSearchEntry* entry);
static void font_manager_remove_list_view_real_bind_list_row (FontManagerFontListBase* base,
                                                       GtkSignalListItemFactory* factory,
                                                       GObject* item);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static void __lambda203_ (Block8Data* _data8_,
                   GtkCheckButton* c);
static void font_manager_remove_list_view_on_item_state_changed (FontManagerRemoveListView* self,
                                                          GtkTreeListRow* row);
static void ___lambda203__gtk_check_button_toggled (GtkCheckButton* _sender,
                                             gpointer self);
VALA_EXTERN FontManagerStringSet* font_manager_remove_list_view_get_selected_files (FontManagerRemoveListView* self);
VALA_EXTERN FontManagerRemoveListView* font_manager_remove_list_view_new (void);
VALA_EXTERN FontManagerRemoveListView* font_manager_remove_list_view_construct (GType object_type);
VALA_EXTERN void font_manager_remove_list_view_set_selected_files (FontManagerRemoveListView* self,
                                                       FontManagerStringSet* value);
static GObject * font_manager_remove_list_view_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties);
VALA_EXTERN FontManagerUserFonts* font_manager_user_fonts_new (void);
VALA_EXTERN FontManagerUserFonts* font_manager_user_fonts_construct (GType object_type);
VALA_EXTERN GType font_manager_category_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCategory, g_object_unref)
VALA_EXTERN GType font_manager_user_fonts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerUserFonts, g_object_unref)
VALA_EXTERN void font_manager_font_list_filter_update (FontManagerFontListFilter* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN void font_manager_font_list_filter_update_finish (FontManagerFontListFilter* self,
                                                  GAsyncResult* _res_);
static void font_manager_remove_list_view_finalize (GObject * obj);
static GType font_manager_remove_list_view_get_type_once (void);
static void _vala_font_manager_remove_list_view_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_font_manager_remove_list_view_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static const FontManagerMenuEntry FONT_MANAGER_FONT_LIST_VIEW_fontlist_menu_entries[5] = {{"install", N_ ("Install")}, {"copy-location", N_ ("Copy Location")}, {"show-in-folder", N_ ("Show in Folder")}, {"enable-selected", N_ ("Enable selected items")}, {"disable-selected", N_ ("Disable selected items")}};

static inline gpointer
font_manager_font_list_row_get_instance_private (FontManagerFontListRow* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerFontListRow_private_offset);
}

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

static void
font_manager_font_list_row_real_reset (FontManagerListItemRow* base)
{
	FontManagerFontListRow * self;
	GBinding* _tmp0_;
	GtkCheckButton* _tmp5_;
	GtkCheckButton* _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	GtkInscription* _tmp9_;
	GtkInscription* _tmp10_;
	GtkLabel* _tmp11_;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	GtkLabel* _tmp14_;
	self = (FontManagerFontListRow*) base;
	_tmp0_ = self->priv->state_binding;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, G_TYPE_BINDING)) {
		GBinding* _tmp1_;
		GBinding* _tmp2_;
		_tmp1_ = self->priv->state_binding;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		g_binding_unbind (_tmp2_);
	}
	_g_object_unref0 (self->priv->state_binding);
	self->priv->state_binding = NULL;
	if (self->priv->signal_id != ((gulong) 0)) {
		GtkCheckButton* _tmp3_;
		GtkCheckButton* _tmp4_;
		_tmp3_ = font_manager_list_item_row_get_item_state ((FontManagerListItemRow*) self);
		_tmp4_ = _tmp3_;
		g_signal_handler_disconnect (_tmp4_, self->priv->signal_id);
	}
	self->priv->signal_id = (gulong) 0;
	_tmp5_ = font_manager_list_item_row_get_item_state ((FontManagerListItemRow*) self);
	_tmp6_ = _tmp5_;
	g_object_set ((GObject*) _tmp6_, "active", TRUE, "visible", FALSE, "sensitive", TRUE, NULL, NULL);
	_tmp7_ = font_manager_list_item_row_get_item_label ((FontManagerListItemRow*) self);
	_tmp8_ = _tmp7_;
	g_object_set ((GObject*) _tmp8_, "label", "", "attributes", NULL, NULL, NULL);
	_tmp9_ = font_manager_list_item_row_get_item_preview ((FontManagerListItemRow*) self);
	_tmp10_ = _tmp9_;
	g_object_set ((GObject*) _tmp10_, "text", "", "visible", FALSE, NULL, NULL);
	_tmp11_ = font_manager_list_item_row_get_item_count ((FontManagerListItemRow*) self);
	_tmp12_ = _tmp11_;
	gtk_widget_set_visible ((GtkWidget*) _tmp12_, TRUE);
	_tmp13_ = font_manager_list_item_row_get_item_count ((FontManagerListItemRow*) self);
	_tmp14_ = _tmp13_;
	gtk_label_set_label (_tmp14_, "");
	return;
}

static void
_vala_PangoFontDescription_free (PangoFontDescription* self)
{
	g_boxed_free (pango_font_description_get_type (), self);
}

static void
__lambda94_ (FontManagerFontListRow* self)
{
	GtkCheckButton* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = font_manager_list_item_row_get_item_state ((FontManagerListItemRow*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = gtk_check_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		GtkLabel* _tmp4_;
		GtkLabel* _tmp5_;
		_tmp4_ = font_manager_list_item_row_get_item_label ((FontManagerListItemRow*) self);
		_tmp5_ = _tmp4_;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp5_, FONT_MANAGER_STYLE_CLASS_DIM_LABEL);
	} else {
		GtkLabel* _tmp6_;
		GtkLabel* _tmp7_;
		_tmp6_ = font_manager_list_item_row_get_item_label ((FontManagerListItemRow*) self);
		_tmp7_ = _tmp6_;
		gtk_widget_add_css_class ((GtkWidget*) _tmp7_, FONT_MANAGER_STYLE_CLASS_DIM_LABEL);
	}
}

static void
___lambda94__gtk_check_button_toggled (GtkCheckButton* _sender,
                                       gpointer self)
{
	__lambda94_ ((FontManagerFontListRow*) self);
}

static void
font_manager_font_list_row_real_on_item_set (FontManagerListItemRow* base)
{
	FontManagerFontListRow * self;
	GObject* _tmp0_;
	GObject* _tmp1_;
	gboolean root = FALSE;
	GObject* _tmp2_;
	GObject* _tmp3_;
	GBindingFlags flags = 0U;
	GObject* _tmp4_;
	GObject* _tmp5_;
	GtkCheckButton* _tmp6_;
	GtkCheckButton* _tmp7_;
	GBinding* _tmp8_;
	GBinding* _tmp9_;
	GtkCheckButton* _tmp10_;
	GtkCheckButton* _tmp11_;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	GtkBox* _tmp14_;
	GtkBox* _tmp15_;
	GtkImage* _tmp16_;
	GtkImage* _tmp17_;
	gchar* f = NULL;
	gchar* d = NULL;
	gchar* p = NULL;
	GObject* _tmp18_;
	GObject* _tmp19_;
	gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	gchar* _tmp22_ = NULL;
	const gchar* _tmp23_ = NULL;
	gchar* label = NULL;
	gchar* _tmp29_;
	GtkCheckButton* _tmp53_;
	GtkCheckButton* _tmp54_;
	gulong _tmp55_;
	self = (FontManagerFontListRow*) base;
	font_manager_list_item_row_reset ((FontManagerListItemRow*) self);
	_tmp0_ = font_manager_list_item_row_get_item ((FontManagerListItemRow*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		return;
	}
	_tmp2_ = font_manager_list_item_row_get_item ((FontManagerListItemRow*) self);
	_tmp3_ = _tmp2_;
	root = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, font_manager_family_get_type ());
	flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL;
	_tmp4_ = font_manager_list_item_row_get_item ((FontManagerListItemRow*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = font_manager_list_item_row_get_item_state ((FontManagerListItemRow*) self);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_object_bind_property_with_closures (_tmp5_, "active", (GObject*) _tmp7_, "active", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp9_ = _g_object_ref0 (_tmp8_);
	_g_object_unref0 (self->priv->state_binding);
	self->priv->state_binding = _tmp9_;
	_tmp10_ = font_manager_list_item_row_get_item_state ((FontManagerListItemRow*) self);
	_tmp11_ = _tmp10_;
	g_object_set ((GObject*) _tmp11_, "sensitive", root, "visible", root, NULL, NULL);
	_tmp12_ = font_manager_list_item_row_get_item_count ((FontManagerListItemRow*) self);
	_tmp13_ = _tmp12_;
	_tmp14_ = font_manager_list_item_row_get_drag_area ((FontManagerListItemRow*) self);
	_tmp15_ = _tmp14_;
	_tmp16_ = font_manager_list_item_row_get_drag_handle ((FontManagerListItemRow*) self);
	_tmp17_ = _tmp16_;
	gtk_widget_set_visible ((GtkWidget*) _tmp17_, root);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp15_, root);
	gtk_widget_set_visible ((GtkWidget*) _tmp13_, root);
	p = NULL;
	_tmp18_ = font_manager_list_item_row_get_item ((FontManagerListItemRow*) self);
	_tmp19_ = _tmp18_;
	g_object_get (_tmp19_, "family", &_tmp20_, "description", &_tmp21_, "preview-text", &_tmp22_, NULL, NULL);
	_g_free0 (f);
	f = _tmp20_;
	_g_free0 (d);
	d = _tmp21_;
	_g_free0 (p);
	p = _tmp22_;
	if (root) {
		const gchar* _tmp24_;
		_tmp24_ = f;
		_tmp23_ = _tmp24_;
	} else {
		const gchar* _tmp25_ = NULL;
		const gchar* _tmp26_;
		_tmp26_ = p;
		if (_tmp26_ != NULL) {
			const gchar* _tmp27_;
			_tmp27_ = p;
			_tmp25_ = _tmp27_;
		} else {
			const gchar* _tmp28_;
			_tmp28_ = d;
			_tmp25_ = _tmp28_;
		}
		_tmp23_ = _tmp25_;
	}
	_tmp29_ = g_strdup (_tmp23_);
	label = _tmp29_;
	if (root) {
		gint count = 0;
		GObject* _tmp30_;
		GObject* _tmp31_;
		gint64 _tmp32_;
		gint64 _tmp33_;
		gchar* count_label = NULL;
		gchar* _tmp34_;
		GtkLabel* _tmp35_;
		GtkLabel* _tmp36_;
		const gchar* _tmp37_;
		gchar* _tmp38_;
		gchar* _tmp39_;
		GtkLabel* _tmp40_;
		GtkLabel* _tmp41_;
		const gchar* _tmp42_;
		_tmp30_ = font_manager_list_item_row_get_item ((FontManagerListItemRow*) self);
		_tmp31_ = _tmp30_;
		g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, font_manager_family_get_type (), FontManagerFamily), "n-variations", &_tmp32_, NULL);
		_tmp33_ = _tmp32_;
		count = (gint) _tmp33_;
		_tmp34_ = g_strdup (ngettext ("%i Variation ", "%i Variations", (gulong) count));
		count_label = _tmp34_;
		_tmp35_ = font_manager_list_item_row_get_item_count ((FontManagerListItemRow*) self);
		_tmp36_ = _tmp35_;
		_tmp37_ = count_label;
		_tmp38_ = g_strdup_printf (_tmp37_, count);
		_tmp39_ = _tmp38_;
		gtk_label_set_label (_tmp36_, _tmp39_);
		_g_free0 (_tmp39_);
		_tmp40_ = font_manager_list_item_row_get_item_label ((FontManagerListItemRow*) self);
		_tmp41_ = _tmp40_;
		_tmp42_ = label;
		gtk_label_set_text (_tmp41_, _tmp42_);
		_g_free0 (count_label);
	} else {
		PangoFontDescription* font_desc = NULL;
		const gchar* _tmp43_;
		PangoFontDescription* _tmp44_;
		PangoAttrList* _tmp45_;
		PangoFontDescription* _tmp46_;
		PangoAttrFontDesc* _tmp47_;
		GtkInscription* _tmp48_;
		GtkInscription* _tmp49_;
		const gchar* _tmp50_;
		GtkInscription* _tmp51_;
		GtkInscription* _tmp52_;
		_tmp43_ = d;
		_tmp44_ = pango_font_description_from_string (_tmp43_);
		font_desc = _tmp44_;
		_tmp45_ = self->priv->attrs;
		_tmp46_ = font_desc;
		_tmp47_ = (PangoAttrFontDesc*) pango_attr_font_desc_new (_tmp46_);
		pango_attr_list_change (_tmp45_, (PangoAttribute*) _tmp47_);
		_tmp48_ = font_manager_list_item_row_get_item_preview ((FontManagerListItemRow*) self);
		_tmp49_ = _tmp48_;
		_tmp50_ = label;
		gtk_inscription_set_text (_tmp49_, _tmp50_);
		_tmp51_ = font_manager_list_item_row_get_item_preview ((FontManagerListItemRow*) self);
		_tmp52_ = _tmp51_;
		gtk_widget_set_visible ((GtkWidget*) _tmp52_, TRUE);
		__vala_PangoFontDescription_free0 (font_desc);
	}
	_tmp53_ = font_manager_list_item_row_get_item_state ((FontManagerListItemRow*) self);
	_tmp54_ = _tmp53_;
	_tmp55_ = g_signal_connect_object (_tmp54_, "toggled", (GCallback) ___lambda94__gtk_check_button_toggled, self, G_CONNECT_AFTER);
	self->priv->signal_id = _tmp55_;
	_g_free0 (label);
	_g_free0 (p);
	_g_free0 (d);
	_g_free0 (f);
	return;
}

FontManagerFontListRow*
font_manager_font_list_row_construct (GType object_type)
{
	FontManagerFontListRow * self = NULL;
	self = (FontManagerFontListRow*) font_manager_list_item_row_construct (object_type);
	return self;
}

FontManagerFontListRow*
font_manager_font_list_row_new (void)
{
	return font_manager_font_list_row_construct (FONT_MANAGER_TYPE_FONT_LIST_ROW);
}

static GObject *
font_manager_font_list_row_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerFontListRow * self;
	PangoAttrList* _tmp0_;
	PangoAttrList* _tmp1_;
	PangoAttribute* _tmp2_;
	PangoFontDescription* font_desc = NULL;
	PangoFontDescription* _tmp3_;
	PangoAttrList* _tmp4_;
	PangoFontDescription* _tmp5_;
	PangoAttrFontDesc* _tmp6_;
	GtkInscription* _tmp7_;
	GtkInscription* _tmp8_;
	PangoAttrList* _tmp9_;
	parent_class = G_OBJECT_CLASS (font_manager_font_list_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_ROW, FontManagerFontListRow);
	_tmp0_ = pango_attr_list_new ();
	_pango_attr_list_unref0 (self->priv->attrs);
	self->priv->attrs = _tmp0_;
	_tmp1_ = self->priv->attrs;
	_tmp2_ = pango_attr_fallback_new (FALSE);
	pango_attr_list_insert (_tmp1_, _tmp2_);
	_tmp3_ = pango_font_description_from_string ("Sans");
	font_desc = _tmp3_;
	_tmp4_ = self->priv->attrs;
	_tmp5_ = font_desc;
	_tmp6_ = (PangoAttrFontDesc*) pango_attr_font_desc_new (_tmp5_);
	pango_attr_list_insert (_tmp4_, (PangoAttribute*) _tmp6_);
	_tmp7_ = font_manager_list_item_row_get_item_preview ((FontManagerListItemRow*) self);
	_tmp8_ = _tmp7_;
	_tmp9_ = self->priv->attrs;
	gtk_inscription_set_attributes (_tmp8_, _tmp9_);
	__vala_PangoFontDescription_free0 (font_desc);
	return obj;
}

static void
font_manager_font_list_row_class_init (FontManagerFontListRowClass * klass,
                                       gpointer klass_data)
{
	font_manager_font_list_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerFontListRow_private_offset);
	((FontManagerListItemRowClass *) klass)->reset = (void (*) (FontManagerListItemRow*)) font_manager_font_list_row_real_reset;
	((FontManagerListItemRowClass *) klass)->on_item_set = (void (*) (FontManagerListItemRow*)) font_manager_font_list_row_real_on_item_set;
	G_OBJECT_CLASS (klass)->constructor = font_manager_font_list_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_font_list_row_finalize;
}

static void
font_manager_font_list_row_instance_init (FontManagerFontListRow * self,
                                          gpointer klass)
{
	self->priv = font_manager_font_list_row_get_instance_private (self);
	self->priv->signal_id = (gulong) 0;
	self->priv->state_binding = NULL;
	self->priv->attrs = NULL;
}

static void
font_manager_font_list_row_finalize (GObject * obj)
{
	FontManagerFontListRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_ROW, FontManagerFontListRow);
	_g_object_unref0 (self->priv->state_binding);
	_pango_attr_list_unref0 (self->priv->attrs);
	G_OBJECT_CLASS (font_manager_font_list_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_font_list_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerFontListRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_font_list_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerFontListRow), 0, (GInstanceInitFunc) font_manager_font_list_row_instance_init, NULL };
	GType font_manager_font_list_row_type_id;
	font_manager_font_list_row_type_id = g_type_register_static (FONT_MANAGER_TYPE_LIST_ITEM_ROW, "FontManagerFontListRow", &g_define_type_info, 0);
	FontManagerFontListRow_private_offset = g_type_add_instance_private (font_manager_font_list_row_type_id, sizeof (FontManagerFontListRowPrivate));
	return font_manager_font_list_row_type_id;
}

GType
font_manager_font_list_row_get_type (void)
{
	static volatile gsize font_manager_font_list_row_type_id__once = 0;
	if (g_once_init_enter (&font_manager_font_list_row_type_id__once)) {
		GType font_manager_font_list_row_type_id;
		font_manager_font_list_row_type_id = font_manager_font_list_row_get_type_once ();
		g_once_init_leave (&font_manager_font_list_row_type_id__once, font_manager_font_list_row_type_id);
	}
	return font_manager_font_list_row_type_id__once;
}

static inline gpointer
font_manager_font_list_base_get_instance_private (FontManagerFontListBase* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerFontListBase_private_offset);
}

void
font_manager_font_list_base_select_item (FontManagerFontListBase* self,
                                         guint position)
{
	GtkListBase* _tmp0_;
	GtkListBase* _tmp1_;
	GtkListBase* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_list;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->_list;
	gtk_widget_activate_action ((GtkWidget*) _tmp1_, "list.select-item", "(ubb)", position, FALSE, FALSE, NULL);
	_tmp2_ = self->priv->_list;
	gtk_widget_activate_action ((GtkWidget*) _tmp2_, "list.scroll-to-item", "u", position, NULL);
	return;
}

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
font_manager_font_list_base_real_update (FontManagerFontListBase* self,
                                         guint position)
{
	FontManagerBaseFontModel* _tmp0_;
	GtkSearchEntry* _tmp1_;
	FontManagerBaseFontModel* _tmp8_;
	gboolean _tmp9_ = FALSE;
	const gchar* _tmp10_;
	_tmp0_ = self->priv->_model;
	_vala_return_if_fail (_tmp0_ != NULL, "model != null");
	_tmp1_ = self->priv->_search_entry;
	if (_tmp1_ != NULL) {
		FontManagerBaseFontModel* _tmp2_;
		GtkSearchEntry* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp2_ = self->priv->_model;
		_tmp3_ = self->priv->_search_entry;
		_tmp4_ = gtk_editable_get_text ((GtkEditable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = string_strip (_tmp5_);
		_tmp7_ = _tmp6_;
		font_manager_base_font_model_set_search_term (_tmp2_, _tmp7_);
		_g_free0 (_tmp7_);
	}
	_tmp8_ = self->priv->_model;
	font_manager_base_font_model_update_items (_tmp8_);
	_tmp10_ = self->priv->previously_selected_family;
	if (_tmp10_ == NULL) {
		_tmp9_ = TRUE;
	} else {
		_tmp9_ = position != ((guint) 0);
	}
	if (_tmp9_) {
		font_manager_font_list_base_select_item (self, position);
	} else {
		guint n_items = 0U;
		FontManagerBaseFontModel* _tmp11_;
		guint _tmp12_;
		guint _tmp13_;
		_tmp11_ = self->priv->_model;
		_tmp12_ = font_manager_base_font_model_get_n_items (_tmp11_);
		_tmp13_ = _tmp12_;
		n_items = _tmp13_;
		{
			guint i = 0U;
			i = (guint) 0;
			{
				gboolean _tmp14_ = FALSE;
				_tmp14_ = TRUE;
				while (TRUE) {
					FontManagerFamily* family = NULL;
					FontManagerBaseFontModel* _tmp16_;
					GObject* _tmp17_;
					FontManagerFamily* _tmp18_;
					gchar* _tmp19_;
					gchar* _tmp20_;
					gchar* _tmp21_;
					const gchar* _tmp22_;
					gboolean _tmp23_;
					if (!_tmp14_) {
						guint _tmp15_;
						_tmp15_ = i;
						i = _tmp15_ + 1;
					}
					_tmp14_ = FALSE;
					if (!(i < n_items)) {
						break;
					}
					_tmp16_ = self->priv->_model;
					_tmp17_ = g_list_model_get_item ((GListModel*) _tmp16_, i);
					family = G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, font_manager_family_get_type (), FontManagerFamily);
					_tmp18_ = family;
					g_object_get (_tmp18_, "family", &_tmp19_, NULL);
					_tmp20_ = _tmp19_;
					_tmp21_ = _tmp20_;
					_tmp22_ = self->priv->previously_selected_family;
					_tmp23_ = g_strcmp0 (_tmp21_, _tmp22_) == 0;
					_g_free0 (_tmp21_);
					if (_tmp23_) {
						font_manager_font_list_base_select_item (self, i);
						_g_object_unref0 (family);
						return;
					}
					_g_object_unref0 (family);
				}
			}
		}
	}
	font_manager_font_list_base_select_item (self, (guint) 0);
	return;
}

void
font_manager_font_list_base_update (FontManagerFontListBase* self,
                                    guint position)
{
	FontManagerBaseFontModel* _tmp0_;
	FontManagerBaseFontModel* _tmp1_;
	FontManagerFontListBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_tmp0_ = font_manager_font_list_base_get_model (self);
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (_tmp1_ != NULL, "model != null");
	_klass_ = FONT_MANAGER_FONT_LIST_BASE_GET_CLASS (self);
	if (_klass_->update) {
		_klass_->update (self, position);
	}
}

static gboolean
_font_manager_font_list_base_queue_update (FontManagerFontListBase* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	self->priv->search_timeout = (guint) 0;
	font_manager_font_list_base_update (self, (guint) 0);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
__font_manager_font_list_base_queue_update_gsource_func (gpointer self)
{
	gboolean result;
	result = _font_manager_font_list_base_queue_update ((FontManagerFontListBase*) self);
	return result;
}

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

void
font_manager_font_list_base_queue_update (FontManagerFontListBase* self)
{
	gboolean _tmp0_ = FALSE;
	GPtrArray* _tmp1_;
	g_return_if_fail (self != NULL);
	if (self->priv->search_timeout != ((guint) 0)) {
		g_source_remove (self->priv->search_timeout);
	}
	self->priv->search_timeout = g_timeout_add_full (G_PRIORITY_HIGH_IDLE, (guint) 333, __font_manager_font_list_base_queue_update_gsource_func, g_object_ref (self), g_object_unref);
	_tmp1_ = self->priv->_selected_items;
	if (_tmp1_ != NULL) {
		GPtrArray* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->_selected_items;
		_tmp3_ = vala_g_ptr_array_get_length (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ > 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GPtrArray* _tmp5_;
		gconstpointer _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp5_ = self->priv->_selected_items;
		_tmp6_ = g_ptr_array_index (_tmp5_, (guint) 0);
		g_object_get (G_TYPE_CHECK_INSTANCE_CAST ((GObject*) _tmp6_, font_manager_family_get_type (), FontManagerFamily), "family", &_tmp7_, NULL);
		_tmp8_ = _tmp7_;
		_g_free0 (self->priv->previously_selected_family);
		self->priv->previously_selected_family = _tmp8_;
	}
	return;
}

void
font_manager_font_list_base_next_match (FontManagerFontListBase* self,
                                        GtkSearchEntry* entry)
{
	guint _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (entry != NULL);
	_tmp0_ = self->priv->_current_selection;
	font_manager_font_list_base_select_item (self, _tmp0_ + 1);
	return;
}

void
font_manager_font_list_base_previous_match (FontManagerFontListBase* self,
                                            GtkSearchEntry* entry)
{
	guint _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (entry != NULL);
	_tmp0_ = self->priv->_current_selection;
	font_manager_font_list_base_select_item (self, _tmp0_ - 1);
	return;
}

static void
font_manager_font_list_base_real_setup_list_row (FontManagerFontListBase* self,
                                                 GtkSignalListItemFactory* factory,
                                                 GObject* item)
{
	g_return_if_fail (factory != NULL);
	g_return_if_fail (item != NULL);
	g_return_if_reached ();
}

void
font_manager_font_list_base_setup_list_row (FontManagerFontListBase* self,
                                            GtkSignalListItemFactory* factory,
                                            GObject* item)
{
	FontManagerFontListBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_BASE_GET_CLASS (self);
	if (_klass_->setup_list_row) {
		_klass_->setup_list_row (self, factory, item);
	}
}

static void
font_manager_font_list_base_real_bind_list_row (FontManagerFontListBase* self,
                                                GtkSignalListItemFactory* factory,
                                                GObject* item)
{
	g_return_if_fail (factory != NULL);
	g_return_if_fail (item != NULL);
	g_return_if_reached ();
}

void
font_manager_font_list_base_bind_list_row (FontManagerFontListBase* self,
                                           GtkSignalListItemFactory* factory,
                                           GObject* item)
{
	FontManagerFontListBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_BASE_GET_CLASS (self);
	if (_klass_->bind_list_row) {
		_klass_->bind_list_row (self, factory, item);
	}
}

static void
font_manager_font_list_base_real_on_selection_changed (FontManagerFontListBase* self,
                                                       guint position,
                                                       guint n_items)
{
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	GtkBitset* selections = NULL;
	GtkSelectionModel* _tmp2_;
	GtkBitset* _tmp3_;
	GtkBitset* _tmp4_;
	guint val = 0U;
	GtkBitsetIter iter = {0};
	GtkBitset* _tmp5_;
	guint _tmp6_ = 0U;
	gboolean _tmp7_;
	font_manager_font_list_base_set_current_selection (self, GTK_INVALID_LIST_POSITION);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, NULL);
	_tmp1_ = _tmp0_;
	font_manager_font_list_base_set_current_selections (self, _tmp1_);
	_g_ptr_array_unref0 (_tmp1_);
	_tmp2_ = self->priv->_selection;
	_tmp3_ = gtk_selection_model_get_selection (_tmp2_);
	selections = _tmp3_;
	_tmp4_ = selections;
	font_manager_font_list_base_set_current_selection (self, gtk_bitset_get_minimum (_tmp4_));
	memset (&iter, 0, sizeof (GtkBitsetIter));
	_tmp5_ = selections;
	_tmp7_ = gtk_bitset_iter_init_first (&iter, _tmp5_, &_tmp6_);
	val = _tmp6_;
	if (_tmp7_) {
		GPtrArray* _tmp8_;
		_tmp8_ = self->priv->_current_selections;
		g_ptr_array_add (_tmp8_, (gpointer) ((guintptr) val));
		while (TRUE) {
			guint _tmp9_ = 0U;
			gboolean _tmp10_;
			GPtrArray* _tmp11_;
			_tmp10_ = gtk_bitset_iter_next (&iter, &_tmp9_);
			val = _tmp9_;
			if (!_tmp10_) {
				break;
			}
			_tmp11_ = self->priv->_current_selections;
			g_ptr_array_add (_tmp11_, (gpointer) ((guintptr) val));
		}
	}
	_gtk_bitset_unref0 (selections);
	return;
}

void
font_manager_font_list_base_on_selection_changed (FontManagerFontListBase* self,
                                                  guint position,
                                                  guint n_items)
{
	FontManagerFontListBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_BASE_GET_CLASS (self);
	if (_klass_->on_selection_changed) {
		_klass_->on_selection_changed (self, position, n_items);
	}
}

static void
_font_manager_font_list_base_setup_list_row_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                GObject* object,
                                                                                gpointer self)
{
	font_manager_font_list_base_setup_list_row ((FontManagerFontListBase*) self, _sender, object);
}

static void
_font_manager_font_list_base_bind_list_row_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                              GObject* object,
                                                                              gpointer self)
{
	font_manager_font_list_base_bind_list_row ((FontManagerFontListBase*) self, _sender, object);
}

static GtkSignalListItemFactory*
font_manager_font_list_base_get_factory (FontManagerFontListBase* self)
{
	GtkSignalListItemFactory* factory = NULL;
	GtkSignalListItemFactory* _tmp0_;
	GtkSignalListItemFactory* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	factory = _tmp0_;
	g_signal_connect_object (factory, "setup", (GCallback) _font_manager_font_list_base_setup_list_row_gtk_signal_list_item_factory_setup, self, 0);
	g_signal_connect_object (factory, "bind", (GCallback) _font_manager_font_list_base_bind_list_row_gtk_signal_list_item_factory_bind, self, 0);
	result = factory;
	return result;
}

FontManagerFontListBase*
font_manager_font_list_base_construct (GType object_type)
{
	FontManagerFontListBase * self = NULL;
	self = (FontManagerFontListBase*) g_object_new (object_type, NULL);
	return self;
}

FontManagerFontListBase*
font_manager_font_list_base_new (void)
{
	return font_manager_font_list_base_construct (FONT_MANAGER_TYPE_FONT_LIST_BASE);
}

JsonArray*
font_manager_font_list_base_get_available_fonts (FontManagerFontListBase* self)
{
	JsonArray* result;
	JsonArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_available_fonts;
	result = _tmp0_;
	return result;
}

static gpointer
_json_array_ref0 (gpointer self)
{
	return self ? json_array_ref (self) : NULL;
}

void
font_manager_font_list_base_set_available_fonts (FontManagerFontListBase* self,
                                                 JsonArray* value)
{
	JsonArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_available_fonts (self);
	if (old_value != value) {
		JsonArray* _tmp0_;
		_tmp0_ = _json_array_ref0 (value);
		_json_array_unref0 (self->priv->_available_fonts);
		self->priv->_available_fonts = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_AVAILABLE_FONTS_PROPERTY]);
	}
}

FontManagerReject*
font_manager_font_list_base_get_disabled_families (FontManagerFontListBase* self)
{
	FontManagerReject* result;
	FontManagerReject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_disabled_families;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_base_set_disabled_families (FontManagerFontListBase* self,
                                                   FontManagerReject* value)
{
	FontManagerReject* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_disabled_families (self);
	if (old_value != value) {
		FontManagerReject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_disabled_families);
		self->priv->_disabled_families = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_DISABLED_FAMILIES_PROPERTY]);
	}
}

FontManagerFontListFilter*
font_manager_font_list_base_get_filter (FontManagerFontListBase* self)
{
	FontManagerFontListFilter* result;
	FontManagerFontListFilter* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_base_set_filter (FontManagerFontListBase* self,
                                        FontManagerFontListFilter* value)
{
	FontManagerFontListFilter* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_filter (self);
	if (old_value != value) {
		FontManagerFontListFilter* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_filter);
		self->priv->_filter = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_FILTER_PROPERTY]);
	}
}

FontManagerBaseFontModel*
font_manager_font_list_base_get_model (FontManagerFontListBase* self)
{
	FontManagerBaseFontModel* result;
	FontManagerBaseFontModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_base_set_model (FontManagerFontListBase* self,
                                       FontManagerBaseFontModel* value)
{
	FontManagerBaseFontModel* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_model (self);
	if (old_value != value) {
		FontManagerBaseFontModel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_model);
		self->priv->_model = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_MODEL_PROPERTY]);
	}
}

GtkSelectionModel*
font_manager_font_list_base_get_selection (FontManagerFontListBase* self)
{
	GtkSelectionModel* result;
	GtkSelectionModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selection;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_base_set_selection (FontManagerFontListBase* self,
                                           GtkSelectionModel* value)
{
	GtkSelectionModel* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_selection (self);
	if (old_value != value) {
		GtkSelectionModel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_selection);
		self->priv->_selection = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SELECTION_PROPERTY]);
	}
}

GtkListBase*
font_manager_font_list_base_get_list (FontManagerFontListBase* self)
{
	GtkListBase* result;
	GtkListBase* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_list;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_base_set_list (FontManagerFontListBase* self,
                                      GtkListBase* value)
{
	GtkListBase* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_list (self);
	if (old_value != value) {
		GtkListBase* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_list);
		self->priv->_list = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_LIST_PROPERTY]);
	}
}

GtkSearchEntry*
font_manager_font_list_base_get_search_entry (FontManagerFontListBase* self)
{
	GtkSearchEntry* result;
	GtkSearchEntry* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_search_entry;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_base_set_search_entry (FontManagerFontListBase* self,
                                              GtkSearchEntry* value)
{
	GtkSearchEntry* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_search_entry (self);
	if (old_value != value) {
		self->priv->_search_entry = value;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SEARCH_ENTRY_PROPERTY]);
	}
}

guint
font_manager_font_list_base_get_current_selection (FontManagerFontListBase* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_current_selection;
	return result;
}

void
font_manager_font_list_base_set_current_selection (FontManagerFontListBase* self,
                                                   guint value)
{
	guint old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_current_selection (self);
	if (old_value != value) {
		self->priv->_current_selection = value;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTION_PROPERTY]);
	}
}

GPtrArray*
font_manager_font_list_base_get_current_selections (FontManagerFontListBase* self)
{
	GPtrArray* result;
	GPtrArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_current_selections;
	result = _tmp0_;
	return result;
}

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

void
font_manager_font_list_base_set_current_selections (FontManagerFontListBase* self,
                                                    GPtrArray* value)
{
	GPtrArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_current_selections (self);
	if (old_value != value) {
		GPtrArray* _tmp0_;
		_tmp0_ = _g_ptr_array_ref0 (value);
		_g_ptr_array_unref0 (self->priv->_current_selections);
		self->priv->_current_selections = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTIONS_PROPERTY]);
	}
}

GObject*
font_manager_font_list_base_get_selected_item (FontManagerFontListBase* self)
{
	GObject* result;
	GObject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_item;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_base_set_selected_item (FontManagerFontListBase* self,
                                               GObject* value)
{
	GObject* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_selected_item (self);
	if (old_value != value) {
		GObject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_selected_item);
		self->priv->_selected_item = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEM_PROPERTY]);
	}
}

GPtrArray*
font_manager_font_list_base_get_selected_items (FontManagerFontListBase* self)
{
	GPtrArray* result;
	GPtrArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_items;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_base_set_selected_items (FontManagerFontListBase* self,
                                                GPtrArray* value)
{
	GPtrArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_selected_items (self);
	if (old_value != value) {
		GPtrArray* _tmp0_;
		_tmp0_ = _g_ptr_array_ref0 (value);
		_g_ptr_array_unref0 (self->priv->_selected_items);
		self->priv->_selected_items = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEMS_PROPERTY]);
	}
}

GPtrArray*
font_manager_font_list_base_get_selected_children (FontManagerFontListBase* self)
{
	GPtrArray* result;
	GPtrArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_children;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_base_set_selected_children (FontManagerFontListBase* self,
                                                   GPtrArray* value)
{
	GPtrArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_base_get_selected_children (self);
	if (old_value != value) {
		GPtrArray* _tmp0_;
		_tmp0_ = _g_ptr_array_ref0 (value);
		_g_ptr_array_unref0 (self->priv->_selected_children);
		self->priv->_selected_children = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SELECTED_CHILDREN_PROPERTY]);
	}
}

static void
___lambda86_ (FontManagerFontListBase* self,
              guint position)
{
	g_signal_emit (self, font_manager_font_list_base_signals[FONT_MANAGER_FONT_LIST_BASE_ACTIVATED_SIGNAL], 0, position);
}

static void
____lambda86__gtk_list_view_activate (GtkListView* _sender,
                                      guint position,
                                      gpointer self)
{
	___lambda86_ ((FontManagerFontListBase*) self, position);
}

static void
____lambda87_ (FontManagerFontListBase* self,
               guint position)
{
	g_signal_emit (self, font_manager_font_list_base_signals[FONT_MANAGER_FONT_LIST_BASE_ACTIVATED_SIGNAL], 0, position);
}

static void
_____lambda87__gtk_grid_view_activate (GtkGridView* _sender,
                                       guint position,
                                       gpointer self)
{
	____lambda87_ ((FontManagerFontListBase*) self, position);
}

static void
_font_manager_font_list_base___lambda85_ (FontManagerFontListBase* self)
{
	GtkListBase* _tmp0_;
	_tmp0_ = self->priv->_list;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_list_view_get_type ())) {
		GtkListBase* _tmp1_;
		GtkSignalListItemFactory* _tmp2_;
		GtkSignalListItemFactory* _tmp3_;
		GtkListBase* _tmp4_;
		_tmp1_ = self->priv->_list;
		_tmp2_ = font_manager_font_list_base_get_factory (self);
		_tmp3_ = _tmp2_;
		gtk_list_view_set_factory (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_list_view_get_type (), GtkListView), (GtkListItemFactory*) _tmp3_);
		_g_object_unref0 (_tmp3_);
		_tmp4_ = self->priv->_list;
		g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_list_view_get_type (), GtkListView), "activate", (GCallback) ____lambda86__gtk_list_view_activate, self, 0);
	} else {
		GtkListBase* _tmp5_;
		_tmp5_ = self->priv->_list;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, gtk_grid_view_get_type ())) {
			GtkListBase* _tmp6_;
			GtkSignalListItemFactory* _tmp7_;
			GtkSignalListItemFactory* _tmp8_;
			GtkListBase* _tmp9_;
			_tmp6_ = self->priv->_list;
			_tmp7_ = font_manager_font_list_base_get_factory (self);
			_tmp8_ = _tmp7_;
			gtk_grid_view_set_factory (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_grid_view_get_type (), GtkGridView), (GtkListItemFactory*) _tmp8_);
			_g_object_unref0 (_tmp8_);
			_tmp9_ = self->priv->_list;
			g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_grid_view_get_type (), GtkGridView), "activate", (GCallback) _____lambda87__gtk_grid_view_activate, self, 0);
		}
	}
}

static void
__font_manager_font_list_base___lambda85__g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self)
{
	_font_manager_font_list_base___lambda85_ ((FontManagerFontListBase*) self);
}

static void
_font_manager_font_list_base_on_selection_changed_gtk_selection_model_selection_changed (GtkSelectionModel* _sender,
                                                                                         guint position,
                                                                                         guint n_items,
                                                                                         gpointer self)
{
	font_manager_font_list_base_on_selection_changed ((FontManagerFontListBase*) self, position, n_items);
}

static void
_font_manager_font_list_base___lambda88_ (FontManagerFontListBase* self)
{
	GtkSelectionModel* _tmp0_;
	GtkListBase* _tmp1_;
	GtkListBase* _tmp2_;
	GtkListBase* _tmp3_;
	_tmp0_ = self->priv->_selection;
	g_signal_connect_object (_tmp0_, "selection-changed", (GCallback) _font_manager_font_list_base_on_selection_changed_gtk_selection_model_selection_changed, self, 0);
	_tmp1_ = self->priv->_list;
	if (_tmp1_ == NULL) {
		g_warning ("FontList.vala:137: list must be set before selection");
	}
	_tmp2_ = self->priv->_list;
	g_return_if_fail (_tmp2_ != NULL);
	_tmp3_ = self->priv->_list;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_list_view_get_type ())) {
		GtkListBase* _tmp4_;
		GtkSelectionModel* _tmp5_;
		_tmp4_ = self->priv->_list;
		_tmp5_ = self->priv->_selection;
		gtk_list_view_set_model (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_list_view_get_type (), GtkListView), _tmp5_);
	} else {
		GtkListBase* _tmp6_;
		_tmp6_ = self->priv->_list;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, gtk_grid_view_get_type ())) {
			GtkListBase* _tmp7_;
			GtkSelectionModel* _tmp8_;
			_tmp7_ = self->priv->_list;
			_tmp8_ = self->priv->_selection;
			gtk_grid_view_set_model (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_grid_view_get_type (), GtkGridView), _tmp8_);
		}
	}
}

static void
__font_manager_font_list_base___lambda88__g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self)
{
	_font_manager_font_list_base___lambda88_ ((FontManagerFontListBase*) self);
}

static void
_font_manager_font_list_base___lambda89_ (FontManagerFontListBase* self)
{
	GBindingFlags flags = 0U;
	FontManagerBaseFontModel* _tmp0_;
	FontManagerBaseFontModel* _tmp1_;
	flags = G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE;
	_tmp0_ = self->priv->_model;
	g_object_bind_property_with_closures ((GObject*) self, "available-fonts", (GObject*) _tmp0_, "entries", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp1_ = self->priv->_model;
	g_object_bind_property_with_closures ((GObject*) self, "filter", (GObject*) _tmp1_, "filter", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
}

static void
__font_manager_font_list_base___lambda89__g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self)
{
	_font_manager_font_list_base___lambda89_ ((FontManagerFontListBase*) self);
}

static void
_font_manager_font_list_base_next_match_gtk_search_entry_activate (GtkSearchEntry* _sender,
                                                                   gpointer self)
{
	font_manager_font_list_base_next_match ((FontManagerFontListBase*) self, _sender);
}

static void
_font_manager_font_list_base_next_match_gtk_search_entry_next_match (GtkSearchEntry* _sender,
                                                                     gpointer self)
{
	font_manager_font_list_base_next_match ((FontManagerFontListBase*) self, _sender);
}

static void
_font_manager_font_list_base_previous_match_gtk_search_entry_previous_match (GtkSearchEntry* _sender,
                                                                             gpointer self)
{
	font_manager_font_list_base_previous_match ((FontManagerFontListBase*) self, _sender);
}

static void
_font_manager_font_list_base_queue_update_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                           gpointer self)
{
	font_manager_font_list_base_queue_update ((FontManagerFontListBase*) self);
}

static void
_font_manager_font_list_base___lambda90_ (FontManagerFontListBase* self)
{
	GtkSearchEntry* _tmp0_;
	GtkSearchEntry* _tmp1_;
	GtkSearchEntry* _tmp2_;
	GtkSearchEntry* _tmp3_;
	gchar* hint = NULL;
	gchar* _tmp4_;
	GtkSearchEntry* _tmp5_;
	const gchar* _tmp6_;
	GtkSearchEntry* _tmp7_;
	_tmp0_ = self->priv->_search_entry;
	g_signal_connect_object (_tmp0_, "activate", (GCallback) _font_manager_font_list_base_next_match_gtk_search_entry_activate, self, 0);
	_tmp1_ = self->priv->_search_entry;
	g_signal_connect_object (_tmp1_, "next-match", (GCallback) _font_manager_font_list_base_next_match_gtk_search_entry_next_match, self, 0);
	_tmp2_ = self->priv->_search_entry;
	g_signal_connect_object (_tmp2_, "previous-match", (GCallback) _font_manager_font_list_base_previous_match_gtk_search_entry_previous_match, self, 0);
	_tmp3_ = self->priv->_search_entry;
	g_signal_connect_object (_tmp3_, "search-changed", (GCallback) _font_manager_font_list_base_queue_update_gtk_search_entry_search_changed, self, G_CONNECT_AFTER);
	_tmp4_ = g_strdup_printf (search_tip, G_DIR_SEPARATOR_S, G_SEARCHPATH_SEPARATOR_S);
	hint = _tmp4_;
	_tmp5_ = self->priv->_search_entry;
	_tmp6_ = hint;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp5_, _tmp6_);
	_tmp7_ = self->priv->_search_entry;
	gtk_search_entry_set_key_capture_widget (_tmp7_, (GtkWidget*) self);
	_g_free0 (hint);
}

static void
__font_manager_font_list_base___lambda90__g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self)
{
	_font_manager_font_list_base___lambda90_ ((FontManagerFontListBase*) self);
}

static void
___lambda92_ (FontManagerFontListBase* self)
{
	FontManagerBaseFontModel* _tmp0_;
	guint _tmp1_;
	_tmp0_ = self->priv->_model;
	_tmp1_ = self->priv->_current_selection;
	g_list_model_items_changed ((GListModel*) _tmp0_, _tmp1_, (guint) 0, (guint) 0);
}

static void
____lambda92__font_manager_string_set_changed (FontManagerStringSet* _sender,
                                               gpointer self)
{
	___lambda92_ ((FontManagerFontListBase*) self);
}

static void
_font_manager_font_list_base___lambda91_ (FontManagerFontListBase* self)
{
	gboolean _tmp0_ = FALSE;
	FontManagerReject* _tmp1_;
	_tmp1_ = self->priv->_disabled_families;
	if (_tmp1_ != NULL) {
		FontManagerBaseFontModel* _tmp2_;
		_tmp2_ = self->priv->_model;
		_tmp0_ = _tmp2_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		FontManagerReject* _tmp3_;
		_tmp3_ = self->priv->_disabled_families;
		g_signal_connect_object ((FontManagerStringSet*) _tmp3_, "changed", (GCallback) ____lambda92__font_manager_string_set_changed, self, 0);
	}
}

static void
__font_manager_font_list_base___lambda91__g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self)
{
	_font_manager_font_list_base___lambda91_ ((FontManagerFontListBase*) self);
}

static void
_font_manager_font_list_base___lambda93_ (FontManagerFontListBase* self)
{
	font_manager_font_list_base_select_item (self, (guint) 0);
}

static void
__font_manager_font_list_base___lambda93__g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self)
{
	_font_manager_font_list_base___lambda93_ ((FontManagerFontListBase*) self);
}

static GObject *
font_manager_font_list_base_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerFontListBase * self;
	parent_class = G_OBJECT_CLASS (font_manager_font_list_base_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_BASE, FontManagerFontListBase);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
	g_signal_connect_object ((GObject*) self, "notify::list", (GCallback) __font_manager_font_list_base___lambda85__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::selection", (GCallback) __font_manager_font_list_base___lambda88__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::model", (GCallback) __font_manager_font_list_base___lambda89__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::search-entry", (GCallback) __font_manager_font_list_base___lambda90__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::disabled-families", (GCallback) __font_manager_font_list_base___lambda91__g_object_notify, self, G_CONNECT_AFTER);
	g_signal_connect_object ((GObject*) self, "notify::filter", (GCallback) __font_manager_font_list_base___lambda93__g_object_notify, self, G_CONNECT_AFTER);
	return obj;
}

static void
font_manager_font_list_base_class_init (FontManagerFontListBaseClass * klass,
                                        gpointer klass_data)
{
	font_manager_font_list_base_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerFontListBase_private_offset);
	((FontManagerFontListBaseClass *) klass)->update = (void (*) (FontManagerFontListBase*, guint)) font_manager_font_list_base_real_update;
	((FontManagerFontListBaseClass *) klass)->setup_list_row = (void (*) (FontManagerFontListBase*, GtkSignalListItemFactory*, GObject*)) font_manager_font_list_base_real_setup_list_row;
	((FontManagerFontListBaseClass *) klass)->bind_list_row = (void (*) (FontManagerFontListBase*, GtkSignalListItemFactory*, GObject*)) font_manager_font_list_base_real_bind_list_row;
	((FontManagerFontListBaseClass *) klass)->on_selection_changed = (void (*) (FontManagerFontListBase*, guint, guint)) font_manager_font_list_base_real_on_selection_changed;
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_font_list_base_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_font_list_base_set_property;
	G_OBJECT_CLASS (klass)->constructor = font_manager_font_list_base_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_font_list_base_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_AVAILABLE_FONTS_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_AVAILABLE_FONTS_PROPERTY] = g_param_spec_boxed ("available-fonts", "available-fonts", "available-fonts", json_array_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_DISABLED_FAMILIES_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_DISABLED_FAMILIES_PROPERTY] = g_param_spec_object ("disabled-families", "disabled-families", "disabled-families", font_manager_reject_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_FILTER_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_FILTER_PROPERTY] = g_param_spec_object ("filter", "filter", "filter", FONT_MANAGER_TYPE_FONT_LIST_FILTER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_MODEL_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", FONT_MANAGER_TYPE_BASE_FONT_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_SELECTION_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SELECTION_PROPERTY] = g_param_spec_object ("selection", "selection", "selection", gtk_selection_model_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_LIST_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_LIST_PROPERTY] = g_param_spec_object ("list", "list", "list", gtk_list_base_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_SEARCH_ENTRY_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SEARCH_ENTRY_PROPERTY] = g_param_spec_object ("search-entry", "search-entry", "search-entry", gtk_search_entry_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTION_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTION_PROPERTY] = g_param_spec_uint ("current-selection", "current-selection", "current-selection", 0, G_MAXUINT, (guint) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTIONS_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTIONS_PROPERTY] = g_param_spec_boxed ("current-selections", "current-selections", "current-selections", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEM_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEM_PROPERTY] = g_param_spec_object ("selected-item", "selected-item", "selected-item", G_TYPE_OBJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEMS_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEMS_PROPERTY] = g_param_spec_boxed ("selected-items", "selected-items", "selected-items", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_BASE_SELECTED_CHILDREN_PROPERTY, font_manager_font_list_base_properties[FONT_MANAGER_FONT_LIST_BASE_SELECTED_CHILDREN_PROPERTY] = g_param_spec_boxed ("selected-children", "selected-children", "selected-children", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	font_manager_font_list_base_signals[FONT_MANAGER_FONT_LIST_BASE_ACTIVATED_SIGNAL] = g_signal_new ("activated", FONT_MANAGER_TYPE_FONT_LIST_BASE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT);
	font_manager_font_list_base_signals[FONT_MANAGER_FONT_LIST_BASE_SELECTION_CHANGED_SIGNAL] = g_signal_new ("selection-changed", FONT_MANAGER_TYPE_FONT_LIST_BASE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
}

static void
font_manager_font_list_base_instance_init (FontManagerFontListBase * self,
                                           gpointer klass)
{
	self->priv = font_manager_font_list_base_get_instance_private (self);
	self->priv->_available_fonts = NULL;
	self->priv->_disabled_families = NULL;
	self->priv->_filter = NULL;
	self->priv->_model = NULL;
	self->priv->_selection = NULL;
	self->priv->_list = NULL;
	self->priv->_search_entry = NULL;
	self->priv->_current_selection = (guint) 0;
	self->priv->_current_selections = NULL;
	self->priv->_selected_item = NULL;
	self->priv->_selected_items = NULL;
	self->priv->_selected_children = NULL;
	self->priv->search_timeout = (guint) 0;
	self->priv->previously_selected_family = NULL;
}

static void
font_manager_font_list_base_finalize (GObject * obj)
{
	FontManagerFontListBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_BASE, FontManagerFontListBase);
	_json_array_unref0 (self->priv->_available_fonts);
	_g_object_unref0 (self->priv->_disabled_families);
	_g_object_unref0 (self->priv->_filter);
	_g_object_unref0 (self->priv->_model);
	_g_object_unref0 (self->priv->_selection);
	_g_object_unref0 (self->priv->_list);
	_g_ptr_array_unref0 (self->priv->_current_selections);
	_g_object_unref0 (self->priv->_selected_item);
	_g_ptr_array_unref0 (self->priv->_selected_items);
	_g_ptr_array_unref0 (self->priv->_selected_children);
	_g_free0 (self->priv->previously_selected_family);
	G_OBJECT_CLASS (font_manager_font_list_base_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_font_list_base_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerFontListBaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_font_list_base_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerFontListBase), 0, (GInstanceInitFunc) font_manager_font_list_base_instance_init, NULL };
	GType font_manager_font_list_base_type_id;
	font_manager_font_list_base_type_id = g_type_register_static (gtk_box_get_type (), "FontManagerFontListBase", &g_define_type_info, 0);
	FontManagerFontListBase_private_offset = g_type_add_instance_private (font_manager_font_list_base_type_id, sizeof (FontManagerFontListBasePrivate));
	return font_manager_font_list_base_type_id;
}

GType
font_manager_font_list_base_get_type (void)
{
	static volatile gsize font_manager_font_list_base_type_id__once = 0;
	if (g_once_init_enter (&font_manager_font_list_base_type_id__once)) {
		GType font_manager_font_list_base_type_id;
		font_manager_font_list_base_type_id = font_manager_font_list_base_get_type_once ();
		g_once_init_leave (&font_manager_font_list_base_type_id__once, font_manager_font_list_base_type_id);
	}
	return font_manager_font_list_base_type_id__once;
}

static void
_vala_font_manager_font_list_base_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	FontManagerFontListBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FONT_LIST_BASE, FontManagerFontListBase);
	switch (property_id) {
		case FONT_MANAGER_FONT_LIST_BASE_AVAILABLE_FONTS_PROPERTY:
		g_value_set_boxed (value, font_manager_font_list_base_get_available_fonts (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_DISABLED_FAMILIES_PROPERTY:
		g_value_set_object (value, font_manager_font_list_base_get_disabled_families (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_FILTER_PROPERTY:
		g_value_set_object (value, font_manager_font_list_base_get_filter (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_MODEL_PROPERTY:
		g_value_set_object (value, font_manager_font_list_base_get_model (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SELECTION_PROPERTY:
		g_value_set_object (value, font_manager_font_list_base_get_selection (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_LIST_PROPERTY:
		g_value_set_object (value, font_manager_font_list_base_get_list (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SEARCH_ENTRY_PROPERTY:
		g_value_set_object (value, font_manager_font_list_base_get_search_entry (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTION_PROPERTY:
		g_value_set_uint (value, font_manager_font_list_base_get_current_selection (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTIONS_PROPERTY:
		g_value_set_boxed (value, font_manager_font_list_base_get_current_selections (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEM_PROPERTY:
		g_value_set_object (value, font_manager_font_list_base_get_selected_item (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEMS_PROPERTY:
		g_value_set_boxed (value, font_manager_font_list_base_get_selected_items (self));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SELECTED_CHILDREN_PROPERTY:
		g_value_set_boxed (value, font_manager_font_list_base_get_selected_children (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_font_list_base_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	FontManagerFontListBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FONT_LIST_BASE, FontManagerFontListBase);
	switch (property_id) {
		case FONT_MANAGER_FONT_LIST_BASE_AVAILABLE_FONTS_PROPERTY:
		font_manager_font_list_base_set_available_fonts (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_DISABLED_FAMILIES_PROPERTY:
		font_manager_font_list_base_set_disabled_families (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_FILTER_PROPERTY:
		font_manager_font_list_base_set_filter (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_MODEL_PROPERTY:
		font_manager_font_list_base_set_model (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SELECTION_PROPERTY:
		font_manager_font_list_base_set_selection (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_LIST_PROPERTY:
		font_manager_font_list_base_set_list (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SEARCH_ENTRY_PROPERTY:
		font_manager_font_list_base_set_search_entry (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTION_PROPERTY:
		font_manager_font_list_base_set_current_selection (self, g_value_get_uint (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_CURRENT_SELECTIONS_PROPERTY:
		font_manager_font_list_base_set_current_selections (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEM_PROPERTY:
		font_manager_font_list_base_set_selected_item (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SELECTED_ITEMS_PROPERTY:
		font_manager_font_list_base_set_selected_items (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_FONT_LIST_BASE_SELECTED_CHILDREN_PROPERTY:
		font_manager_font_list_base_set_selected_children (self, g_value_get_boxed (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
font_manager_font_list_controls_get_instance_private (FontManagerFontListControls* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerFontListControls_private_offset);
}

void
font_manager_font_list_controls_on_remove_clicked (FontManagerFontListControls* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, font_manager_font_list_controls_signals[FONT_MANAGER_FONT_LIST_CONTROLS_REMOVE_CLICKED_SIGNAL], 0);
	return;
}

static void
_font_manager_font_list_controls_on_remove_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	font_manager_font_list_controls_on_remove_clicked ((FontManagerFontListControls*) self);
}

static void
font_manager_font_list_controls_real_on_expander_activated (FontManagerFontListControls* self,
                                                            GtkExpander* expander)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (expander != NULL);
	_tmp0_ = gtk_expander_get_expanded (expander);
	_tmp1_ = _tmp0_;
	g_signal_emit (self, font_manager_font_list_controls_signals[FONT_MANAGER_FONT_LIST_CONTROLS_EXPANDER_ACTIVATED_SIGNAL], 0, _tmp1_);
	_tmp3_ = gtk_expander_get_expanded (expander);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		_tmp2_ = _ ("Collapse all");
	} else {
		_tmp2_ = _ ("Expand all");
	}
	gtk_widget_set_tooltip_text ((GtkWidget*) expander, _tmp2_);
	return;
}

void
font_manager_font_list_controls_on_expander_activated (FontManagerFontListControls* self,
                                                       GtkExpander* expander)
{
	FontManagerFontListControlsClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_CONTROLS_GET_CLASS (self);
	if (_klass_->on_expander_activated) {
		_klass_->on_expander_activated (self, expander);
	}
}

static void
_font_manager_font_list_controls_on_expander_activated_gtk_expander_activate (GtkExpander* _sender,
                                                                              gpointer self)
{
	font_manager_font_list_controls_on_expander_activated ((FontManagerFontListControls*) self, _sender);
}

FontManagerFontListControls*
font_manager_font_list_controls_construct (GType object_type)
{
	FontManagerFontListControls * self = NULL;
	self = (FontManagerFontListControls*) g_object_new (object_type, NULL);
	return self;
}

FontManagerFontListControls*
font_manager_font_list_controls_new (void)
{
	return font_manager_font_list_controls_construct (FONT_MANAGER_TYPE_FONT_LIST_CONTROLS);
}

GtkButton*
font_manager_font_list_controls_get_remove_button (FontManagerFontListControls* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_remove_button;
	result = _tmp0_;
	return result;
}

GtkExpander*
font_manager_font_list_controls_get_expander (FontManagerFontListControls* self)
{
	GtkExpander* result;
	GtkExpander* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_expander;
	result = _tmp0_;
	return result;
}

GtkSearchEntry*
font_manager_font_list_controls_get_search (FontManagerFontListControls* self)
{
	GtkSearchEntry* result;
	GtkSearchEntry* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_search;
	result = _tmp0_;
	return result;
}

static void
font_manager_font_list_controls_class_init (FontManagerFontListControlsClass * klass,
                                            gpointer klass_data)
{
	font_manager_font_list_controls_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerFontListControls_private_offset);
	((FontManagerFontListControlsClass *) klass)->on_expander_activated = (void (*) (FontManagerFontListControls*, GtkExpander*)) font_manager_font_list_controls_real_on_expander_activated;
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_font_list_controls_get_property;
	G_OBJECT_CLASS (klass)->finalize = font_manager_font_list_controls_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_CONTROLS_REMOVE_BUTTON_PROPERTY, font_manager_font_list_controls_properties[FONT_MANAGER_FONT_LIST_CONTROLS_REMOVE_BUTTON_PROPERTY] = g_param_spec_object ("remove-button", "remove-button", "remove-button", gtk_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_CONTROLS_EXPANDER_PROPERTY, font_manager_font_list_controls_properties[FONT_MANAGER_FONT_LIST_CONTROLS_EXPANDER_PROPERTY] = g_param_spec_object ("expander", "expander", "expander", gtk_expander_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_CONTROLS_SEARCH_PROPERTY, font_manager_font_list_controls_properties[FONT_MANAGER_FONT_LIST_CONTROLS_SEARCH_PROPERTY] = g_param_spec_object ("search", "search", "search", gtk_search_entry_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/FontManager/FontManager/ui/font-manager-font-list-controls.ui");
	font_manager_font_list_controls_signals[FONT_MANAGER_FONT_LIST_CONTROLS_EXPANDER_ACTIVATED_SIGNAL] = g_signal_new ("expander-activated", FONT_MANAGER_TYPE_FONT_LIST_CONTROLS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	font_manager_font_list_controls_signals[FONT_MANAGER_FONT_LIST_CONTROLS_REMOVE_CLICKED_SIGNAL] = g_signal_new ("remove-clicked", FONT_MANAGER_TYPE_FONT_LIST_CONTROLS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "remove_button", FALSE, FontManagerFontListControls_private_offset + G_STRUCT_OFFSET (FontManagerFontListControlsPrivate, _remove_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "expander", FALSE, FontManagerFontListControls_private_offset + G_STRUCT_OFFSET (FontManagerFontListControlsPrivate, _expander));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search", FALSE, FontManagerFontListControls_private_offset + G_STRUCT_OFFSET (FontManagerFontListControlsPrivate, _search));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_remove_clicked", G_CALLBACK(_font_manager_font_list_controls_on_remove_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_expander_activated", G_CALLBACK(_font_manager_font_list_controls_on_expander_activated_gtk_expander_activate));
}

static void
font_manager_font_list_controls_instance_init (FontManagerFontListControls * self,
                                               gpointer klass)
{
	self->priv = font_manager_font_list_controls_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
font_manager_font_list_controls_finalize (GObject * obj)
{
	FontManagerFontListControls * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_CONTROLS, FontManagerFontListControls);
	G_OBJECT_CLASS (font_manager_font_list_controls_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_font_list_controls_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerFontListControlsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_font_list_controls_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerFontListControls), 0, (GInstanceInitFunc) font_manager_font_list_controls_instance_init, NULL };
	GType font_manager_font_list_controls_type_id;
	font_manager_font_list_controls_type_id = g_type_register_static (gtk_box_get_type (), "FontManagerFontListControls", &g_define_type_info, 0);
	FontManagerFontListControls_private_offset = g_type_add_instance_private (font_manager_font_list_controls_type_id, sizeof (FontManagerFontListControlsPrivate));
	return font_manager_font_list_controls_type_id;
}

GType
font_manager_font_list_controls_get_type (void)
{
	static volatile gsize font_manager_font_list_controls_type_id__once = 0;
	if (g_once_init_enter (&font_manager_font_list_controls_type_id__once)) {
		GType font_manager_font_list_controls_type_id;
		font_manager_font_list_controls_type_id = font_manager_font_list_controls_get_type_once ();
		g_once_init_leave (&font_manager_font_list_controls_type_id__once, font_manager_font_list_controls_type_id);
	}
	return font_manager_font_list_controls_type_id__once;
}

static void
_vala_font_manager_font_list_controls_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	FontManagerFontListControls * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FONT_LIST_CONTROLS, FontManagerFontListControls);
	switch (property_id) {
		case FONT_MANAGER_FONT_LIST_CONTROLS_REMOVE_BUTTON_PROPERTY:
		g_value_set_object (value, font_manager_font_list_controls_get_remove_button (self));
		break;
		case FONT_MANAGER_FONT_LIST_CONTROLS_EXPANDER_PROPERTY:
		g_value_set_object (value, font_manager_font_list_controls_get_expander (self));
		break;
		case FONT_MANAGER_FONT_LIST_CONTROLS_SEARCH_PROPERTY:
		g_value_set_object (value, font_manager_font_list_controls_get_search (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

void
font_manager_base_font_list_view_focus_search_entry (FontManagerBaseFontListView* self)
{
	GtkSearchEntry* _tmp0_;
	GtkSearchEntry* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = font_manager_font_list_base_get_search_entry ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	gtk_widget_grab_focus ((GtkWidget*) _tmp1_);
	return;
}

static void
font_manager_base_font_list_view_real_on_activate (FontManagerBaseFontListView* self,
                                                   guint position)
{
}

void
font_manager_base_font_list_view_on_activate (FontManagerBaseFontListView* self,
                                              guint position)
{
	FontManagerBaseFontListViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_BASE_FONT_LIST_VIEW_GET_CLASS (self);
	if (_klass_->on_activate) {
		_klass_->on_activate (self, position);
	}
}

static void
font_manager_base_font_list_view_real_on_expander_activated (FontManagerBaseFontListView* self,
                                                             gboolean expanded)
{
	GtkTreeListModel* _tmp0_;
	_tmp0_ = self->treemodel;
	gtk_tree_list_model_set_autoexpand (_tmp0_, expanded);
	font_manager_font_list_base_queue_update ((FontManagerFontListBase*) self);
	return;
}

void
font_manager_base_font_list_view_on_expander_activated (FontManagerBaseFontListView* self,
                                                        gboolean expanded)
{
	FontManagerBaseFontListViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_BASE_FONT_LIST_VIEW_GET_CLASS (self);
	if (_klass_->on_expander_activated) {
		_klass_->on_expander_activated (self, expanded);
	}
}

static void
font_manager_base_font_list_view_real_setup_list_row (FontManagerFontListBase* base,
                                                      GtkSignalListItemFactory* factory,
                                                      GObject* item)
{
	FontManagerBaseFontListView * self;
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkTreeExpander* tree_expander = NULL;
	GtkTreeExpander* _tmp1_;
	FontManagerFontListRow* row = NULL;
	FontManagerFontListRow* _tmp2_;
	self = (FontManagerBaseFontListView*) base;
	g_return_if_fail (factory != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (item, gtk_list_item_get_type (), GtkListItem));
	list_item = _tmp0_;
	_tmp1_ = (GtkTreeExpander*) gtk_tree_expander_new ();
	g_object_ref_sink (_tmp1_);
	tree_expander = _tmp1_;
	_tmp2_ = font_manager_font_list_row_new ();
	g_object_ref_sink (_tmp2_);
	row = _tmp2_;
	gtk_tree_expander_set_child (tree_expander, (GtkWidget*) row);
	gtk_list_item_set_child (list_item, (GtkWidget*) tree_expander);
	_g_object_unref0 (row);
	_g_object_unref0 (tree_expander);
	_g_object_unref0 (list_item);
	return;
}

static void
font_manager_base_font_list_view_real_bind_list_row (FontManagerFontListBase* base,
                                                     GtkSignalListItemFactory* factory,
                                                     GObject* item)
{
	FontManagerBaseFontListView * self;
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkTreeListRow* list_row = NULL;
	GtkTreeListModel* _tmp1_;
	GtkTreeListRow* _tmp2_;
	GtkTreeExpander* tree_expander = NULL;
	GtkWidget* _tmp3_;
	GtkTreeExpander* _tmp4_;
	FontManagerFontListRow* row = NULL;
	GtkWidget* _tmp5_;
	FontManagerFontListRow* _tmp6_;
	GObject* _item = NULL;
	GObject* _tmp7_;
	self = (FontManagerBaseFontListView*) base;
	g_return_if_fail (factory != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (item, gtk_list_item_get_type (), GtkListItem));
	list_item = _tmp0_;
	_tmp1_ = self->treemodel;
	_tmp2_ = gtk_tree_list_model_get_row (_tmp1_, gtk_list_item_get_position (list_item));
	list_row = _tmp2_;
	_tmp3_ = gtk_list_item_get_child (list_item);
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_tree_expander_get_type (), GtkTreeExpander));
	tree_expander = _tmp4_;
	gtk_widget_set_margin_start ((GtkWidget*) tree_expander, 3);
	gtk_tree_expander_set_list_row (tree_expander, list_row);
	_tmp5_ = gtk_tree_expander_get_child (tree_expander);
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, FONT_MANAGER_TYPE_FONT_LIST_ROW, FontManagerFontListRow));
	row = _tmp6_;
	_tmp7_ = gtk_tree_list_row_get_item (list_row);
	_item = _tmp7_;
	font_manager_list_item_row_set_item ((FontManagerListItemRow*) row, _item);
	_g_object_unref0 (_item);
	_g_object_unref0 (row);
	_g_object_unref0 (tree_expander);
	_g_object_unref0 (list_row);
	_g_object_unref0 (list_item);
	return;
}

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

static void
font_manager_base_font_list_view_real_on_selection_changed (FontManagerFontListBase* base,
                                                            guint position,
                                                            guint n_items)
{
	FontManagerBaseFontListView * self;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	GPtrArray* _tmp3_;
	GtkTreeListRow* list_row = NULL;
	GtkTreeListModel* _tmp4_;
	guint _tmp5_;
	guint _tmp6_;
	GObject* _tmp7_;
	GObject* item = NULL;
	GtkTreeListRow* _tmp8_;
	GObject* _tmp9_;
	GObject* _tmp10_;
	GObject* _tmp11_;
	const gchar* _tmp37_;
	self = (FontManagerBaseFontListView*) base;
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_tmp1_ = _tmp0_;
	font_manager_font_list_base_set_selected_items ((FontManagerFontListBase*) self, _tmp1_);
	_g_ptr_array_unref0 (_tmp1_);
	_tmp2_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_tmp3_ = _tmp2_;
	font_manager_font_list_base_set_selected_children ((FontManagerFontListBase*) self, _tmp3_);
	_g_ptr_array_unref0 (_tmp3_);
	FONT_MANAGER_FONT_LIST_BASE_CLASS (font_manager_base_font_list_view_parent_class)->on_selection_changed (G_TYPE_CHECK_INSTANCE_CAST (self, FONT_MANAGER_TYPE_FONT_LIST_BASE, FontManagerFontListBase), position, n_items);
	_tmp4_ = self->treemodel;
	_tmp5_ = font_manager_font_list_base_get_current_selection ((FontManagerFontListBase*) self);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_list_model_get_item ((GListModel*) _tmp4_, _tmp6_);
	list_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_tree_list_row_get_type (), GtkTreeListRow);
	_tmp8_ = list_row;
	_tmp9_ = gtk_tree_list_row_get_item (_tmp8_);
	item = _tmp9_;
	_tmp10_ = item;
	font_manager_font_list_base_set_selected_item ((FontManagerFontListBase*) self, _tmp10_);
	_tmp11_ = item;
	g_signal_emit ((FontManagerFontListBase*) self, font_manager_font_list_base_signals[FONT_MANAGER_FONT_LIST_BASE_SELECTION_CHANGED_SIGNAL], 0, _tmp11_);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp12_ = FALSE;
			_tmp12_ = TRUE;
			while (TRUE) {
				GPtrArray* _tmp14_;
				GPtrArray* _tmp15_;
				gint _tmp16_;
				gint _tmp17_;
				GtkTreeListRow* row = NULL;
				GtkTreeListModel* _tmp18_;
				GPtrArray* _tmp19_;
				GPtrArray* _tmp20_;
				gconstpointer _tmp21_;
				GObject* _tmp22_;
				GtkTreeListRow* _tmp23_;
				GObject* _tmp24_;
				gboolean _tmp25_ = FALSE;
				GObject* _tmp26_;
				if (!_tmp12_) {
					guint _tmp13_;
					_tmp13_ = i;
					i = _tmp13_ + 1;
				}
				_tmp12_ = FALSE;
				_tmp14_ = font_manager_font_list_base_get_current_selections ((FontManagerFontListBase*) self);
				_tmp15_ = _tmp14_;
				_tmp16_ = vala_g_ptr_array_get_length (_tmp15_);
				_tmp17_ = _tmp16_;
				if (!(i < ((guint) _tmp17_))) {
					break;
				}
				_tmp18_ = self->treemodel;
				_tmp19_ = font_manager_font_list_base_get_current_selections ((FontManagerFontListBase*) self);
				_tmp20_ = _tmp19_;
				_tmp21_ = g_ptr_array_index (_tmp20_, i);
				_tmp22_ = g_list_model_get_item ((GListModel*) _tmp18_, (guint) ((guintptr) _tmp21_));
				row = G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_tree_list_row_get_type (), GtkTreeListRow);
				_tmp23_ = row;
				_tmp24_ = gtk_tree_list_row_get_item (_tmp23_);
				_g_object_unref0 (item);
				item = _tmp24_;
				_tmp26_ = item;
				if (_tmp26_ != NULL) {
					GObject* _tmp27_;
					_tmp27_ = item;
					_tmp25_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, font_manager_family_get_type ());
				} else {
					_tmp25_ = FALSE;
				}
				if (_tmp25_) {
					GPtrArray* _tmp28_;
					GPtrArray* _tmp29_;
					GObject* _tmp30_;
					GObject* _tmp31_;
					_tmp28_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
					_tmp29_ = _tmp28_;
					_tmp30_ = item;
					_tmp31_ = _g_object_ref0 (_tmp30_);
					g_ptr_array_add (_tmp29_, _tmp31_);
				} else {
					GObject* _tmp32_;
					_tmp32_ = item;
					if (_tmp32_ != NULL) {
						GPtrArray* _tmp33_;
						GPtrArray* _tmp34_;
						GObject* _tmp35_;
						GObject* _tmp36_;
						_tmp33_ = font_manager_font_list_base_get_selected_children ((FontManagerFontListBase*) self);
						_tmp34_ = _tmp33_;
						_tmp35_ = item;
						_tmp36_ = _g_object_ref0 (_tmp35_);
						g_ptr_array_add (_tmp34_, _tmp36_);
					}
				}
				_g_object_unref0 (row);
			}
		}
	}
	_tmp37_ = g_getenv ("G_MESSAGES_DEBUG");
	if (_tmp37_ != NULL) {
		gchar* description = NULL;
		GObject* _tmp38_;
		GObject* _tmp39_;
		gchar* _tmp40_ = NULL;
		GtkListBase* _tmp41_;
		GtkListBase* _tmp42_;
		const gchar* _tmp43_;
		const gchar* _tmp44_;
		const gchar* _tmp45_;
		description = NULL;
		_tmp38_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
		_tmp39_ = _tmp38_;
		g_object_get (_tmp39_, "description", &_tmp40_, NULL, NULL);
		_g_free0 (description);
		description = _tmp40_;
		_tmp41_ = font_manager_font_list_base_get_list ((FontManagerFontListBase*) self);
		_tmp42_ = _tmp41_;
		_tmp43_ = gtk_widget_get_name ((GtkWidget*) _tmp42_);
		_tmp44_ = _tmp43_;
		_tmp45_ = description;
		g_debug ("FontList.vala:365: %s::selection_changed : %s", _tmp44_, _tmp45_);
		_g_free0 (description);
	}
	_g_object_unref0 (item);
	_g_object_unref0 (list_row);
	return;
}

FontManagerBaseFontListView*
font_manager_base_font_list_view_construct (GType object_type)
{
	FontManagerBaseFontListView * self = NULL;
	self = (FontManagerBaseFontListView*) font_manager_font_list_base_construct (object_type);
	return self;
}

FontManagerBaseFontListView*
font_manager_base_font_list_view_new (void)
{
	return font_manager_base_font_list_view_construct (FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW);
}

static GListModel*
_font_manager_font_model_get_child_model_gtk_tree_list_model_create_model_func (GObject* item,
                                                                                gpointer self)
{
	GListModel* result;
	result = font_manager_font_model_get_child_model ((FontManagerFontModel*) self, item);
	return result;
}

static void
_font_manager_base_font_list_view_on_expander_activated_font_manager_font_list_controls_expander_activated (FontManagerFontListControls* _sender,
                                                                                                            gboolean expanded,
                                                                                                            gpointer self)
{
	font_manager_base_font_list_view_on_expander_activated ((FontManagerBaseFontListView*) self, expanded);
}

static void
_font_manager_base_font_list_view_on_activate_gtk_list_view_activate (GtkListView* _sender,
                                                                      guint position,
                                                                      gpointer self)
{
	font_manager_base_font_list_view_on_activate ((FontManagerBaseFontListView*) self, position);
}

static GObject *
font_manager_base_font_list_view_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerBaseFontListView * self;
	FontManagerFontListControls* _tmp0_;
	GtkListView* _tmp1_ = NULL;
	GtkListView* _tmp2_;
	GtkScrolledWindow* scroll = NULL;
	GtkScrolledWindow* _tmp3_;
	GtkScrolledWindow* _tmp4_;
	GtkListBase* _tmp5_;
	GtkListBase* _tmp6_;
	FontManagerFontModel* _tmp7_;
	FontManagerFontModel* _tmp8_;
	FontManagerBaseFontModel* _tmp9_;
	FontManagerBaseFontModel* _tmp10_;
	GListModel* _tmp11_;
	FontManagerBaseFontModel* _tmp12_;
	FontManagerBaseFontModel* _tmp13_;
	GtkTreeListModel* _tmp14_;
	GtkTreeListModel* _tmp15_;
	GListModel* _tmp16_;
	GtkMultiSelection* _tmp17_;
	GtkMultiSelection* _tmp18_;
	GtkScrolledWindow* _tmp19_;
	FontManagerFontListControls* _tmp20_;
	FontManagerFontListControls* _tmp21_;
	GtkSearchEntry* _tmp22_;
	GtkSearchEntry* _tmp23_;
	FontManagerFontListControls* _tmp24_;
	GtkListBase* _tmp25_;
	GtkListBase* _tmp26_;
	parent_class = G_OBJECT_CLASS (font_manager_base_font_list_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, FontManagerBaseFontListView);
	_tmp0_ = font_manager_font_list_controls_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->controls);
	self->controls = _tmp0_;
	_tmp1_ = (GtkListView*) gtk_list_view_new (NULL, NULL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp1_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	font_manager_font_list_base_set_list ((FontManagerFontListBase*) self, (GtkListBase*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_ref_sink (_tmp3_);
	scroll = _tmp3_;
	_tmp4_ = scroll;
	_tmp5_ = font_manager_font_list_base_get_list ((FontManagerFontListBase*) self);
	_tmp6_ = _tmp5_;
	gtk_scrolled_window_set_child (_tmp4_, (GtkWidget*) _tmp6_);
	_tmp7_ = font_manager_font_model_new ();
	_tmp8_ = _tmp7_;
	font_manager_font_list_base_set_model ((FontManagerFontListBase*) self, (FontManagerBaseFontModel*) _tmp8_);
	_g_object_unref0 (_tmp8_);
	_tmp9_ = font_manager_font_list_base_get_model ((FontManagerFontListBase*) self);
	_tmp10_ = _tmp9_;
	_tmp11_ = _g_object_ref0 ((GListModel*) _tmp10_);
	_tmp12_ = font_manager_font_list_base_get_model ((FontManagerFontListBase*) self);
	_tmp13_ = _tmp12_;
	_tmp14_ = gtk_tree_list_model_new (_tmp11_, FALSE, FALSE, _font_manager_font_model_get_child_model_gtk_tree_list_model_create_model_func, g_object_ref (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FONT_MANAGER_TYPE_FONT_MODEL, FontManagerFontModel)), g_object_unref);
	_g_object_unref0 (self->treemodel);
	self->treemodel = _tmp14_;
	_tmp15_ = self->treemodel;
	_tmp16_ = _g_object_ref0 ((GListModel*) _tmp15_);
	_tmp17_ = gtk_multi_selection_new (_tmp16_);
	_tmp18_ = _tmp17_;
	font_manager_font_list_base_set_selection ((FontManagerFontListBase*) self, (GtkSelectionModel*) _tmp18_);
	_g_object_unref0 (_tmp18_);
	_tmp19_ = scroll;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp19_);
	_tmp20_ = self->controls;
	gtk_box_prepend ((GtkBox*) self, (GtkWidget*) _tmp20_);
	_tmp21_ = self->controls;
	_tmp22_ = font_manager_font_list_controls_get_search (_tmp21_);
	_tmp23_ = _tmp22_;
	font_manager_font_list_base_set_search_entry ((FontManagerFontListBase*) self, _tmp23_);
	_tmp24_ = self->controls;
	g_signal_connect_object (_tmp24_, "expander-activated", (GCallback) _font_manager_base_font_list_view_on_expander_activated_font_manager_font_list_controls_expander_activated, self, 0);
	_tmp25_ = font_manager_font_list_base_get_list ((FontManagerFontListBase*) self);
	_tmp26_ = _tmp25_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_list_view_get_type (), GtkListView), "activate", (GCallback) _font_manager_base_font_list_view_on_activate_gtk_list_view_activate, self, 0);
	_g_object_unref0 (scroll);
	return obj;
}

static void
font_manager_base_font_list_view_class_init (FontManagerBaseFontListViewClass * klass,
                                             gpointer klass_data)
{
	font_manager_base_font_list_view_parent_class = g_type_class_peek_parent (klass);
	((FontManagerBaseFontListViewClass *) klass)->on_activate = (void (*) (FontManagerBaseFontListView*, guint)) font_manager_base_font_list_view_real_on_activate;
	((FontManagerBaseFontListViewClass *) klass)->on_expander_activated = (void (*) (FontManagerBaseFontListView*, gboolean)) font_manager_base_font_list_view_real_on_expander_activated;
	((FontManagerFontListBaseClass *) klass)->setup_list_row = (void (*) (FontManagerFontListBase*, GtkSignalListItemFactory*, GObject*)) font_manager_base_font_list_view_real_setup_list_row;
	((FontManagerFontListBaseClass *) klass)->bind_list_row = (void (*) (FontManagerFontListBase*, GtkSignalListItemFactory*, GObject*)) font_manager_base_font_list_view_real_bind_list_row;
	((FontManagerFontListBaseClass *) klass)->on_selection_changed = (void (*) (FontManagerFontListBase*, guint, guint)) font_manager_base_font_list_view_real_on_selection_changed;
	G_OBJECT_CLASS (klass)->constructor = font_manager_base_font_list_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_base_font_list_view_finalize;
}

static void
font_manager_base_font_list_view_instance_init (FontManagerBaseFontListView * self,
                                                gpointer klass)
{
}

static void
font_manager_base_font_list_view_finalize (GObject * obj)
{
	FontManagerBaseFontListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, FontManagerBaseFontListView);
	_g_object_unref0 (self->treemodel);
	_g_object_unref0 (self->controls);
	G_OBJECT_CLASS (font_manager_base_font_list_view_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_base_font_list_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerBaseFontListViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_base_font_list_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerBaseFontListView), 0, (GInstanceInitFunc) font_manager_base_font_list_view_instance_init, NULL };
	GType font_manager_base_font_list_view_type_id;
	font_manager_base_font_list_view_type_id = g_type_register_static (FONT_MANAGER_TYPE_FONT_LIST_BASE, "FontManagerBaseFontListView", &g_define_type_info, 0);
	return font_manager_base_font_list_view_type_id;
}

GType
font_manager_base_font_list_view_get_type (void)
{
	static volatile gsize font_manager_base_font_list_view_type_id__once = 0;
	if (g_once_init_enter (&font_manager_base_font_list_view_type_id__once)) {
		GType font_manager_base_font_list_view_type_id;
		font_manager_base_font_list_view_type_id = font_manager_base_font_list_view_get_type_once ();
		g_once_init_leave (&font_manager_base_font_list_view_type_id__once, font_manager_base_font_list_view_type_id);
	}
	return font_manager_base_font_list_view_type_id__once;
}

static inline gpointer
font_manager_font_list_view_get_instance_private (FontManagerFontListView* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerFontListView_private_offset);
}

 G_GNUC_NO_INLINE static GType
font_manager_font_list_view_font_list_menu_item_get_type_once (void)
{
	static const GEnumValue values[] = {{FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_INSTALL, "FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_INSTALL", "install"}, {FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_COPY, "FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_COPY", "copy"}, {FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_SHOW, "FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_SHOW", "show"}, {FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_ENABLE, "FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_ENABLE", "enable"}, {FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_DISABLE, "FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_DISABLE", "disable"}, {0, NULL, NULL}};
	GType font_manager_font_list_view_font_list_menu_item_type_id;
	font_manager_font_list_view_font_list_menu_item_type_id = g_enum_register_static ("FontManagerFontListViewFontListMenuItem", values);
	return font_manager_font_list_view_font_list_menu_item_type_id;
}

static GType
font_manager_font_list_view_font_list_menu_item_get_type (void)
{
	static volatile gsize font_manager_font_list_view_font_list_menu_item_type_id__once = 0;
	if (g_once_init_enter (&font_manager_font_list_view_font_list_menu_item_type_id__once)) {
		GType font_manager_font_list_view_font_list_menu_item_type_id;
		font_manager_font_list_view_font_list_menu_item_type_id = font_manager_font_list_view_font_list_menu_item_get_type_once ();
		g_once_init_leave (&font_manager_font_list_view_font_list_menu_item_type_id__once, font_manager_font_list_view_font_list_menu_item_type_id);
	}
	return font_manager_font_list_view_font_list_menu_item_type_id__once;
}

void
font_manager_font_list_view_set_search_term (FontManagerFontListView* self,
                                             const gchar* needle)
{
	FontManagerFontListControls* _tmp0_;
	GtkSearchEntry* _tmp1_;
	GtkSearchEntry* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (needle != NULL);
	_tmp0_ = ((FontManagerBaseFontListView*) self)->controls;
	_tmp1_ = font_manager_font_list_controls_get_search (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_editable_set_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_editable_get_type (), GtkEditable), needle);
	return;
}

FontManagerFont*
font_manager_font_list_view_get_selected_font (FontManagerFontListView* self)
{
	FontManagerFont* font = NULL;
	FontManagerFont* _tmp0_;
	GObject* _tmp1_;
	GObject* _tmp2_;
	FontManagerFont* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = font_manager_font_new ();
	font = _tmp0_;
	_tmp1_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
	_tmp2_ = _tmp1_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, font_manager_family_get_type ())) {
		FontManagerFont* _tmp3_;
		GObject* _tmp4_;
		GObject* _tmp5_;
		JsonObject* _tmp6_;
		_tmp3_ = font;
		_tmp4_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
		_tmp5_ = _tmp4_;
		_tmp6_ = font_manager_family_get_default_variant (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, font_manager_family_get_type (), FontManagerFamily));
		g_object_set (_tmp3_, "source-object", _tmp6_, NULL);
	} else {
		GObject* _tmp7_;
		GObject* _tmp8_;
		FontManagerFont* _tmp9_;
		_tmp7_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
		_tmp8_ = _tmp7_;
		_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, font_manager_font_get_type (), FontManagerFont));
		_g_object_unref0 (font);
		font = _tmp9_;
	}
	result = font;
	return result;
}

static void
__lambda95_ (FontManagerFontListView* self,
             GObject* i)
{
	FontManagerFamily* f = NULL;
	FontManagerFamily* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (i != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (i, font_manager_family_get_type (), FontManagerFamily));
	f = _tmp0_;
	g_object_get (f, "active", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	g_object_set (f, "active", !_tmp2_, NULL);
	_g_object_unref0 (f);
}

static void
___lambda95__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda95_ ((FontManagerFontListView*) self, (GObject*) data);
}

static void
__lambda96_ (FontManagerFontListView* self,
             guint i)
{
	GtkTreeListModel* _tmp0_;
	_tmp0_ = ((FontManagerBaseFontListView*) self)->treemodel;
	g_list_model_items_changed ((GListModel*) _tmp0_, i, (guint) 0, (guint) 0);
}

static void
___lambda96__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda96_ ((FontManagerFontListView*) self, (guint) ((guintptr) data));
}

static void
font_manager_font_list_view_real_on_activate (FontManagerBaseFontListView* base,
                                              guint position)
{
	FontManagerFontListView * self;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GPtrArray* _tmp4_;
	GPtrArray* _tmp5_;
	GPtrArray* _tmp6_;
	GPtrArray* _tmp7_;
	self = (FontManagerFontListView*) base;
	_tmp0_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_g_ptr_array_get_length (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ < 1) {
		return;
	}
	_tmp4_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
	_tmp5_ = _tmp4_;
	g_ptr_array_foreach (_tmp5_, ___lambda95__gfunc, self);
	_tmp6_ = font_manager_font_list_base_get_current_selections ((FontManagerFontListBase*) self);
	_tmp7_ = _tmp6_;
	g_ptr_array_foreach (_tmp7_, ___lambda96__gfunc, self);
	return;
}

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

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

static void
__lambda97_ (Block5Data* _data5_,
             GObject* i)
{
	FontManagerFontListView* self;
	FontManagerStringSet* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self = _data5_->self;
	g_return_if_fail (i != NULL);
	_tmp0_ = _data5_->selected_families;
	g_object_get (G_TYPE_CHECK_INSTANCE_CAST (i, font_manager_family_get_type (), FontManagerFamily), "family", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	font_manager_string_set_add (_tmp0_, _tmp3_);
	_g_free0 (_tmp3_);
}

static void
___lambda97__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda97_ (self, (GObject*) data);
}

static gboolean
__lambda98_ (Block5Data* _data5_)
{
	FontManagerFontListView* self;
	FontManagerCollection* _tmp0_;
	gboolean result;
	self = _data5_->self;
	font_manager_font_list_base_update ((FontManagerFontListBase*) self, _data5_->i);
	font_manager_font_list_view_update_remove_sensitivity (self);
	_tmp0_ = _data5_->collection;
	font_manager_collection_queue_state_update (_tmp0_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda98__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda98_ (self);
	return result;
}

void
font_manager_font_list_view_on_remove_clicked (FontManagerFontListView* self)
{
	FontManagerFontListFilter* _tmp0_;
	FontManagerFontListFilter* _tmp1_;
	Block5Data* _data5_;
	FontManagerFontListFilter* _tmp2_;
	FontManagerFontListFilter* _tmp3_;
	FontManagerCollection* _tmp4_;
	FontManagerStringSet* _tmp5_;
	GPtrArray* _tmp6_;
	GPtrArray* _tmp7_;
	FontManagerCollection* _tmp8_;
	FontManagerStringSet* _tmp9_;
	guint _tmp10_;
	guint _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = font_manager_font_list_base_get_filter ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (FONT_MANAGER_IS_COLLECTION (_tmp1_), "filter is Collection");
	_data5_ = g_slice_new0 (Block5Data);
	_data5_->_ref_count_ = 1;
	_data5_->self = g_object_ref (self);
	_tmp2_ = font_manager_font_list_base_get_filter ((FontManagerFontListBase*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, FONT_MANAGER_TYPE_COLLECTION, FontManagerCollection));
	_data5_->collection = _tmp4_;
	_tmp5_ = font_manager_string_set_new ();
	_data5_->selected_families = _tmp5_;
	_tmp6_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
	_tmp7_ = _tmp6_;
	g_ptr_array_foreach (_tmp7_, ___lambda97__gfunc, _data5_);
	_tmp8_ = _data5_->collection;
	_tmp9_ = _data5_->selected_families;
	font_manager_collection_remove (_tmp8_, _tmp9_);
	_tmp10_ = font_manager_font_list_base_get_current_selection ((FontManagerFontListBase*) self);
	_tmp11_ = _tmp10_;
	_data5_->i = _tmp11_;
	while (TRUE) {
		gboolean _tmp12_ = FALSE;
		guint _tmp14_;
		if (_data5_->i > ((guint) 0)) {
			GtkTreeListModel* _tmp13_;
			_tmp13_ = ((FontManagerBaseFontListView*) self)->treemodel;
			_tmp12_ = _data5_->i >= (g_list_model_get_n_items ((GListModel*) _tmp13_) - 1);
		} else {
			_tmp12_ = FALSE;
		}
		if (!_tmp12_) {
			break;
		}
		_tmp14_ = _data5_->i;
		_data5_->i = _tmp14_ - 1;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda98__gsource_func, block5_data_ref (_data5_), block5_data_unref);
	g_signal_emit (self, font_manager_font_list_view_signals[FONT_MANAGER_FONT_LIST_VIEW_COLLECTION_CHANGED_SIGNAL], 0);
	block5_data_unref (_data5_);
	_data5_ = NULL;
	return;
}

static gchar*
font_manager_font_list_view_get_path_to_selected_item (FontManagerFontListView* self)
{
	GObject* _tmp0_;
	GObject* _tmp1_;
	FontManagerFont* font = NULL;
	FontManagerFont* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	_vala_return_val_if_fail (_tmp1_ != NULL, "selected_item != null", NULL);
	_tmp2_ = font_manager_font_list_view_get_selected_font (self);
	font = _tmp2_;
	g_object_get (font, "filepath", &_tmp3_, NULL);
	_tmp4_ = _tmp3_;
	result = _tmp4_;
	_g_object_unref0 (font);
	return result;
}

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

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

static gboolean
__lambda99_ (Block6Data* _data6_)
{
	FontManagerFontListView* self;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	gboolean result;
	self = _data6_->self;
	_tmp0_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	{
		GPtrArray* item_collection = NULL;
		guint item_index = 0U;
		item_collection = _tmp1_;
		for (item_index = 0; item_index < item_collection->len; item_index = item_index + 1) {
			GObject* _tmp2_;
			GObject* item = NULL;
			_tmp2_ = _g_object_ref0 ((GObject*) g_ptr_array_index (item_collection, item_index));
			item = _tmp2_;
			{
				GObject* _tmp3_;
				_tmp3_ = item;
				g_object_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, font_manager_family_get_type (), FontManagerFamily), "active", _data6_->active, NULL);
				_g_object_unref0 (item);
			}
		}
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda99__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda99_ (self);
	return result;
}

static void
font_manager_font_list_view_set_selected_items_active (FontManagerFontListView* self,
                                                       gboolean active)
{
	Block6Data* _data6_;
	g_return_if_fail (self != NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_data6_->self = g_object_ref (self);
	_data6_->active = active;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda99__gsource_func, block6_data_ref (_data6_), block6_data_unref);
	block6_data_unref (_data6_);
	_data6_ = NULL;
	return;
}

static void
font_manager_font_list_view_enable_selected (FontManagerFontListView* self,
                                             GtkWidget* widget,
                                             const gchar* action,
                                             GVariant* parameter)
{
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_g_ptr_array_get_length (_tmp1_);
	_tmp3_ = _tmp2_;
	_vala_return_if_fail (_tmp3_ > 1, "selected_items.length > 1");
	font_manager_font_list_view_set_selected_items_active (self, TRUE);
	return;
}

static void
font_manager_font_list_view_disable_selected (FontManagerFontListView* self,
                                              GtkWidget* widget,
                                              const gchar* action,
                                              GVariant* parameter)
{
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_g_ptr_array_get_length (_tmp1_);
	_tmp3_ = _tmp2_;
	_vala_return_if_fail (_tmp3_ > 1, "selected_items.length > 1");
	font_manager_font_list_view_set_selected_items_active (self, FALSE);
	return;
}

static void
font_manager_font_list_view_copy_location (FontManagerFontListView* self,
                                           GtkWidget* widget,
                                           const gchar* action,
                                           GVariant* parameter)
{
	GObject* _tmp0_;
	GObject* _tmp1_;
	GdkDisplay* display = NULL;
	GdkDisplay* _tmp2_;
	GdkDisplay* _tmp3_;
	GdkClipboard* clipboard = NULL;
	GdkDisplay* _tmp4_;
	GdkClipboard* _tmp5_;
	GdkClipboard* _tmp6_;
	gchar* filepath = NULL;
	gchar* _tmp7_;
	gchar* _tmp8_ = NULL;
	GObject* _tmp9_;
	GObject* _tmp10_;
	GdkClipboard* _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (_tmp1_ != NULL, "selected_item != null");
	_tmp2_ = gdk_display_get_default ();
	_tmp3_ = _g_object_ref0 (_tmp2_);
	display = _tmp3_;
	_tmp4_ = display;
	_tmp5_ = gdk_display_get_clipboard (_tmp4_);
	_tmp6_ = _g_object_ref0 (_tmp5_);
	clipboard = _tmp6_;
	_tmp7_ = font_manager_font_list_view_get_path_to_selected_item (self);
	filepath = _tmp7_;
	_tmp9_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
	_tmp10_ = _tmp9_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, font_manager_family_get_type ())) {
		const gchar* _tmp11_;
		gchar* _tmp12_;
		_tmp11_ = filepath;
		_tmp12_ = g_path_get_dirname (_tmp11_);
		_g_free0 (_tmp8_);
		_tmp8_ = _tmp12_;
	} else {
		const gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp13_ = filepath;
		_tmp14_ = g_strdup (_tmp13_);
		_g_free0 (_tmp8_);
		_tmp8_ = _tmp14_;
	}
	_tmp15_ = clipboard;
	gdk_clipboard_set_text (_tmp15_, _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (filepath);
	_g_object_unref0 (clipboard);
	_g_object_unref0 (display);
	return;
}

static void
font_manager_font_list_view_show_in_folder (FontManagerFontListView* self,
                                            GtkWidget* widget,
                                            const gchar* action,
                                            GVariant* parameter)
{
	GObject* _tmp0_;
	GObject* _tmp1_;
	gchar* directory = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GFile* file = NULL;
	GFile* _tmp6_;
	GtkFileLauncher* launcher = NULL;
	GtkFileLauncher* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (_tmp1_ != NULL, "selected_item != null");
	_tmp2_ = font_manager_font_list_view_get_path_to_selected_item (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_path_get_dirname (_tmp3_);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	directory = _tmp5_;
	_tmp6_ = g_file_new_for_path (directory);
	file = _tmp6_;
	_tmp7_ = gtk_file_launcher_new (file);
	launcher = _tmp7_;
	gtk_file_launcher_launch (launcher, NULL, NULL, NULL, NULL);
	_g_object_unref0 (launcher);
	_g_object_unref0 (file);
	_g_free0 (directory);
	return;
}

static void
_vala_GMenuItem_free_function_content_of (gpointer data)
{
	GMenuItem* self;
	self = *((GMenuItem**) data);
	_g_object_unref0_ (self);
}

static void
font_manager_font_list_view_init_context_menu (FontManagerFontListView* self)
{
	GArray* _tmp0_;
	FontManagerBaseContextMenu* base_menu = NULL;
	GtkListBase* _tmp1_;
	GtkListBase* _tmp2_;
	FontManagerBaseContextMenu* _tmp3_;
	FontManagerBaseContextMenu* _tmp4_;
	GtkPopoverMenu* _tmp5_;
	GtkPopoverMenu* _tmp6_;
	GtkPopoverMenu* _tmp7_;
	FontManagerBaseContextMenu* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	GtkLabel* _tmp11_;
	FontManagerBaseContextMenu* _tmp12_;
	GMenu* _tmp13_;
	GMenu* _tmp14_;
	GMenu* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_array_new (TRUE, TRUE, sizeof (GMenuItem*));
	g_array_set_clear_func (_tmp0_, (GDestroyNotify) _vala_GMenuItem_free_function_content_of);
	_g_array_unref0 (self->priv->menu_items);
	self->priv->menu_items = _tmp0_;
	_tmp1_ = font_manager_font_list_base_get_list ((FontManagerFontListBase*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = font_manager_base_context_menu_new ((GtkWidget*) _tmp2_);
	base_menu = _tmp3_;
	_tmp4_ = base_menu;
	_tmp5_ = font_manager_base_context_menu_get_popover (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = _g_object_ref0 (_tmp6_);
	_g_object_unref0 (self->priv->context_menu);
	self->priv->context_menu = _tmp7_;
	_tmp8_ = base_menu;
	_tmp9_ = font_manager_base_context_menu_get_menu_title (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = _g_object_ref0 (_tmp10_);
	_g_object_unref0 (self->priv->menu_title);
	self->priv->menu_title = _tmp11_;
	_tmp12_ = base_menu;
	_tmp13_ = font_manager_base_context_menu_get_menu (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = _g_object_ref0 (_tmp14_);
	_g_object_unref0 (self->priv->menu);
	self->priv->menu = _tmp15_;
	{
		FontManagerMenuEntry* entry_collection = NULL;
		gint entry_collection_length1 = 0;
		gint _entry_collection_size_ = 0;
		gint entry_it = 0;
		entry_collection = FONT_MANAGER_FONT_LIST_VIEW_fontlist_menu_entries;
		entry_collection_length1 = G_N_ELEMENTS (FONT_MANAGER_FONT_LIST_VIEW_fontlist_menu_entries);
		for (entry_it = 0; entry_it < entry_collection_length1; entry_it = entry_it + 1) {
			FontManagerMenuEntry entry = {0};
			entry = entry_collection[entry_it];
			{
				GMenuItem* item = NULL;
				FontManagerMenuEntry _tmp16_;
				const gchar* _tmp17_;
				FontManagerMenuEntry _tmp18_;
				const gchar* _tmp19_;
				GMenuItem* _tmp20_;
				GArray* _tmp21_;
				GMenuItem* _tmp22_;
				GMenuItem* _tmp23_;
				_tmp16_ = entry;
				_tmp17_ = _tmp16_.display_name;
				_tmp18_ = entry;
				_tmp19_ = _tmp18_.action_name;
				_tmp20_ = g_menu_item_new (_tmp17_, _tmp19_);
				item = _tmp20_;
				_tmp21_ = self->priv->menu_items;
				_tmp22_ = item;
				_tmp23_ = _g_object_ref0 (_tmp22_);
				g_array_append_val (_tmp21_, _tmp23_);
				_g_object_unref0 (item);
			}
		}
	}
	_g_object_unref0 (base_menu);
	return;
}

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

static gboolean
font_manager_font_list_view_is_sourced (FontManagerFontListView* self,
                                        FontManagerFont* font)
{
	FontManagerUserSourceModel* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (font != NULL, FALSE);
	_tmp0_ = self->priv->_user_sources;
	_tmp1_ = font_manager_user_source_model_get_items (_tmp0_);
	_tmp2_ = _tmp1_;
	{
		GPtrArray* source_collection = NULL;
		guint source_index = 0U;
		source_collection = _tmp2_;
		for (source_index = 0; source_index < source_collection->len; source_index = source_index + 1) {
			FontManagerSource* _tmp3_;
			FontManagerSource* source = NULL;
			_tmp3_ = _g_object_ref0 ((FontManagerSource*) g_ptr_array_index (source_collection, source_index));
			source = _tmp3_;
			{
				gchar* path = NULL;
				FontManagerSource* _tmp4_;
				gchar* _tmp5_;
				gchar* _tmp6_;
				gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				const gchar* _tmp10_;
				gboolean _tmp11_;
				_tmp4_ = source;
				g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, font_manager_source_get_type (), FontManagerSource), "path", &_tmp5_, NULL);
				_tmp6_ = _tmp5_;
				path = _tmp6_;
				g_object_get (font, "filepath", &_tmp7_, NULL);
				_tmp8_ = _tmp7_;
				_tmp9_ = _tmp8_;
				_tmp10_ = path;
				_tmp11_ = string_contains (_tmp9_, _tmp10_);
				_g_free0 (_tmp9_);
				if (_tmp11_) {
					result = TRUE;
					_g_free0 (path);
					_g_object_unref0 (source);
					return result;
				}
				_g_free0 (path);
				_g_object_unref0 (source);
			}
		}
	}
	result = FALSE;
	return result;
}

static gboolean
font_manager_font_list_view_selections_are_sourced (FontManagerFontListView* self)
{
	FontManagerUserSourceModel* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_user_sources;
	g_return_val_if_fail (_tmp0_ != NULL, FALSE);
	_tmp1_ = font_manager_font_list_base_get_selected_children ((FontManagerFontListBase*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_g_ptr_array_get_length (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ >= 1) {
		GPtrArray* _tmp5_;
		GPtrArray* _tmp6_;
		_tmp5_ = font_manager_font_list_base_get_selected_children ((FontManagerFontListBase*) self);
		_tmp6_ = _tmp5_;
		{
			GPtrArray* selection_collection = NULL;
			guint selection_index = 0U;
			selection_collection = _tmp6_;
			for (selection_index = 0; selection_index < selection_collection->len; selection_index = selection_index + 1) {
				GObject* _tmp7_;
				GObject* selection = NULL;
				_tmp7_ = _g_object_ref0 ((GObject*) g_ptr_array_index (selection_collection, selection_index));
				selection = _tmp7_;
				{
					GObject* _tmp8_;
					_tmp8_ = selection;
					if (font_manager_font_list_view_is_sourced (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, font_manager_font_get_type (), FontManagerFont))) {
						_g_object_unref0 (selection);
						continue;
					}
					result = FALSE;
					_g_object_unref0 (selection);
					return result;
				}
			}
		}
		result = TRUE;
		return result;
	} else {
		GObject* _tmp9_;
		GObject* _tmp10_;
		_tmp9_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
		_tmp10_ = _tmp9_;
		if (_tmp10_ != NULL) {
			GObject* _tmp11_;
			GObject* _tmp12_;
			_tmp11_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
			_tmp12_ = _tmp11_;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, font_manager_font_get_type ())) {
				GObject* _tmp13_;
				GObject* _tmp14_;
				_tmp13_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
				_tmp14_ = _tmp13_;
				result = font_manager_font_list_view_is_sourced (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, font_manager_font_get_type (), FontManagerFont));
				return result;
			} else {
				JsonArray* array = NULL;
				GObject* _tmp15_;
				GObject* _tmp16_;
				JsonArray* _tmp17_;
				JsonArray* _tmp18_;
				_tmp15_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
				_tmp16_ = _tmp15_;
				g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, font_manager_family_get_type (), FontManagerFamily), "variations", &_tmp17_, NULL);
				_tmp18_ = _tmp17_;
				array = _tmp18_;
				{
					guint i = 0U;
					i = (guint) 0;
					{
						gboolean _tmp19_ = FALSE;
						_tmp19_ = TRUE;
						while (TRUE) {
							JsonArray* _tmp21_;
							FontManagerFont* font = NULL;
							FontManagerFont* _tmp22_;
							FontManagerFont* _tmp23_;
							JsonArray* _tmp24_;
							JsonObject* _tmp25_;
							FontManagerFont* _tmp26_;
							if (!_tmp19_) {
								guint _tmp20_;
								_tmp20_ = i;
								i = _tmp20_ + 1;
							}
							_tmp19_ = FALSE;
							_tmp21_ = array;
							if (!(i < json_array_get_length (_tmp21_))) {
								break;
							}
							_tmp22_ = font_manager_font_new ();
							font = _tmp22_;
							_tmp23_ = font;
							_tmp24_ = array;
							_tmp25_ = json_array_get_object_element (_tmp24_, i);
							g_object_set (_tmp23_, "source-object", _tmp25_, NULL);
							_tmp26_ = font;
							if (font_manager_font_list_view_is_sourced (self, _tmp26_)) {
								_g_object_unref0 (font);
								continue;
							}
							result = FALSE;
							_g_object_unref0 (font);
							_json_array_unref0 (array);
							return result;
						}
					}
				}
				result = TRUE;
				_json_array_unref0 (array);
				return result;
			}
		}
	}
	result = FALSE;
	return result;
}

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

static void
block7_data_unref (void * _userdata_)
{
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		FontManagerFontListView* self;
		self = _data7_->self;
		_g_object_unref0 (_data7_->target);
		_g_object_unref0 (_data7_->entry);
		_g_object_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}

static void
_______lambda100_ (Block7Data* _data7_)
{
	FontManagerFontListView* self;
	FontManagerUserAction* _tmp0_;
	FontManagerFont* _tmp1_;
	self = _data7_->self;
	_tmp0_ = _data7_->entry;
	_tmp1_ = _data7_->target;
	font_manager_user_action_run (_tmp0_, _tmp1_);
}

static void
________lambda100__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self)
{
	_______lambda100_ (self);
}

static void
font_manager_font_list_view_update_context_menu (FontManagerFontListView* self)
{
	GMenu* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->menu;
	g_menu_remove_all (_tmp0_);
	self->priv->show_menu = TRUE;
	_tmp1_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_g_ptr_array_get_length (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ > 1) {
		gint n_items = 0;
		GPtrArray* _tmp5_;
		GPtrArray* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		GtkLabel* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		GMenu* _tmp12_;
		GArray* _tmp13_;
		gpointer* _tmp14_;
		gint _tmp14__length1;
		GMenuItem* _tmp15_;
		GMenu* _tmp16_;
		GArray* _tmp17_;
		gpointer* _tmp18_;
		gint _tmp18__length1;
		GMenuItem* _tmp19_;
		_tmp5_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
		_tmp6_ = _tmp5_;
		_tmp7_ = vala_g_ptr_array_get_length (_tmp6_);
		_tmp8_ = _tmp7_;
		n_items = _tmp8_;
		_tmp9_ = self->priv->menu_title;
		_tmp10_ = g_strdup_printf (ngettext ("%i selected item", "%i selected items", (gulong) n_items), (gint) n_items);
		_tmp11_ = _tmp10_;
		gtk_label_set_label (_tmp9_, _tmp11_);
		_g_free0 (_tmp11_);
		_tmp12_ = self->priv->menu;
		_tmp13_ = self->priv->menu_items;
		_tmp14_ = _tmp13_->data;
		_tmp14__length1 = _tmp13_->len;
		_tmp15_ = _tmp14_[FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_ENABLE];
		g_menu_append_item (_tmp12_, _tmp15_);
		_tmp16_ = self->priv->menu;
		_tmp17_ = self->priv->menu_items;
		_tmp18_ = _tmp17_->data;
		_tmp18__length1 = _tmp17_->len;
		_tmp19_ = _tmp18_[FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_DISABLE];
		g_menu_append_item (_tmp16_, _tmp19_);
	} else {
		GPtrArray* _tmp20_;
		GPtrArray* _tmp21_;
		gint _tmp22_;
		gint _tmp23_;
		_tmp20_ = font_manager_font_list_base_get_selected_children ((FontManagerFontListBase*) self);
		_tmp21_ = _tmp20_;
		_tmp22_ = vala_g_ptr_array_get_length (_tmp21_);
		_tmp23_ = _tmp22_;
		if (_tmp23_ > 1) {
			gint n_items = 0;
			GPtrArray* _tmp24_;
			GPtrArray* _tmp25_;
			gint _tmp26_;
			gint _tmp27_;
			GtkLabel* _tmp28_;
			gchar* _tmp29_;
			gchar* _tmp30_;
			_tmp24_ = font_manager_font_list_base_get_selected_children ((FontManagerFontListBase*) self);
			_tmp25_ = _tmp24_;
			_tmp26_ = vala_g_ptr_array_get_length (_tmp25_);
			_tmp27_ = _tmp26_;
			n_items = _tmp27_;
			_tmp28_ = self->priv->menu_title;
			_tmp29_ = g_strdup_printf (ngettext ("%i selected item", "%i selected items", (gulong) n_items), (gint) n_items);
			_tmp30_ = _tmp29_;
			gtk_label_set_label (_tmp28_, _tmp30_);
			_g_free0 (_tmp30_);
			if (font_manager_font_list_view_selections_are_sourced (self)) {
				GMenu* _tmp31_;
				GArray* _tmp32_;
				gpointer* _tmp33_;
				gint _tmp33__length1;
				GMenuItem* _tmp34_;
				_tmp31_ = self->priv->menu;
				_tmp32_ = self->priv->menu_items;
				_tmp33_ = _tmp32_->data;
				_tmp33__length1 = _tmp32_->len;
				_tmp34_ = _tmp33_[FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_INSTALL];
				g_menu_append_item (_tmp31_, _tmp34_);
			} else {
				self->priv->show_menu = FALSE;
			}
		} else {
			gchar* description = NULL;
			gchar* family = NULL;
			GObject* _tmp35_;
			GObject* _tmp36_;
			gchar* _tmp37_ = NULL;
			gchar* _tmp38_ = NULL;
			const gchar* _tmp39_ = NULL;
			GObject* _tmp40_;
			GObject* _tmp41_;
			GtkLabel* _tmp44_;
			GMenu* _tmp49_;
			GArray* _tmp50_;
			gpointer* _tmp51_;
			gint _tmp51__length1;
			GMenuItem* _tmp52_;
			GMenu* _tmp53_;
			GArray* _tmp54_;
			gpointer* _tmp55_;
			gint _tmp55__length1;
			GMenuItem* _tmp56_;
			gboolean _tmp57_ = FALSE;
			FontManagerUserActionModel* _tmp58_;
			description = NULL;
			family = NULL;
			_tmp35_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
			_tmp36_ = _tmp35_;
			g_object_get (_tmp36_, "description", &_tmp37_, "family", &_tmp38_, NULL, NULL);
			_g_free0 (description);
			description = _tmp37_;
			_g_free0 (family);
			family = _tmp38_;
			_tmp40_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
			_tmp41_ = _tmp40_;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp41_, font_manager_family_get_type ())) {
				const gchar* _tmp42_;
				_tmp42_ = family;
				_tmp39_ = _tmp42_;
			} else {
				const gchar* _tmp43_;
				_tmp43_ = description;
				_tmp39_ = _tmp43_;
			}
			_tmp44_ = self->priv->menu_title;
			gtk_label_set_label (_tmp44_, _tmp39_);
			if (font_manager_font_list_view_selections_are_sourced (self)) {
				GMenu* _tmp45_;
				GArray* _tmp46_;
				gpointer* _tmp47_;
				gint _tmp47__length1;
				GMenuItem* _tmp48_;
				_tmp45_ = self->priv->menu;
				_tmp46_ = self->priv->menu_items;
				_tmp47_ = _tmp46_->data;
				_tmp47__length1 = _tmp46_->len;
				_tmp48_ = _tmp47_[FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_INSTALL];
				g_menu_append_item (_tmp45_, _tmp48_);
			}
			_tmp49_ = self->priv->menu;
			_tmp50_ = self->priv->menu_items;
			_tmp51_ = _tmp50_->data;
			_tmp51__length1 = _tmp50_->len;
			_tmp52_ = _tmp51_[FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_COPY];
			g_menu_append_item (_tmp49_, _tmp52_);
			_tmp53_ = self->priv->menu;
			_tmp54_ = self->priv->menu_items;
			_tmp55_ = _tmp54_->data;
			_tmp55__length1 = _tmp54_->len;
			_tmp56_ = _tmp55_[FONT_MANAGER_FONT_LIST_VIEW_FONT_LIST_MENU_ITEM_SHOW];
			g_menu_append_item (_tmp53_, _tmp56_);
			_tmp58_ = self->priv->_user_actions;
			if (_tmp58_ != NULL) {
				FontManagerUserActionModel* _tmp59_;
				_tmp59_ = self->priv->_user_actions;
				_tmp57_ = g_list_model_get_n_items ((GListModel*) _tmp59_) > ((guint) 0);
			} else {
				_tmp57_ = FALSE;
			}
			if (_tmp57_) {
				GMenu* action_menu = NULL;
				GMenu* _tmp60_;
				GMenuItem* submenu = NULL;
				GMenu* _tmp61_;
				GMenuItem* _tmp62_;
				GMenu* _tmp63_;
				GMenuItem* _tmp64_;
				gint i = 0;
				_tmp60_ = g_menu_new ();
				action_menu = _tmp60_;
				_tmp61_ = action_menu;
				_tmp62_ = g_menu_item_new_submenu (_ ("Actions"), (GMenuModel*) _tmp61_);
				submenu = _tmp62_;
				_tmp63_ = self->priv->menu;
				_tmp64_ = submenu;
				g_menu_append_item (_tmp63_, _tmp64_);
				i = 0;
				{
					FontManagerUserActionModel* _entry_list = NULL;
					FontManagerUserActionModel* _tmp65_;
					guint _entry_size = 0U;
					FontManagerUserActionModel* _tmp66_;
					guint _tmp67_;
					guint _tmp68_;
					gint _entry_index = 0;
					_tmp65_ = self->priv->_user_actions;
					_entry_list = _tmp65_;
					_tmp66_ = _entry_list;
					_tmp67_ = font_manager_user_action_model_get_size (_tmp66_);
					_tmp68_ = _tmp67_;
					_entry_size = _tmp68_;
					_entry_index = -1;
					while (TRUE) {
						Block7Data* _data7_;
						gint _tmp69_;
						guint _tmp70_;
						FontManagerUserActionModel* _tmp71_;
						FontManagerUserAction* _tmp72_;
						GMenuItem* item = NULL;
						FontManagerUserAction* _tmp73_;
						const gchar* _tmp74_;
						const gchar* _tmp75_;
						GMenuItem* _tmp76_;
						GMenuItem* _tmp77_;
						gchar* _tmp78_;
						gchar* _tmp79_;
						GMenu* _tmp80_;
						GMenuItem* _tmp81_;
						GtkButton* widget = NULL;
						FontManagerUserAction* _tmp82_;
						const gchar* _tmp83_;
						const gchar* _tmp84_;
						GtkButton* _tmp85_;
						GtkLabel* label = NULL;
						GtkButton* _tmp86_;
						GtkWidget* _tmp87_;
						GtkLabel* _tmp88_;
						GtkLabel* _tmp89_;
						GtkButton* _tmp90_;
						GtkButton* _tmp91_;
						GtkButton* _tmp92_;
						GtkPopoverMenu* _tmp93_;
						GtkButton* _tmp94_;
						gchar* _tmp95_;
						gchar* _tmp96_;
						FontManagerFont* _tmp97_;
						GtkButton* _tmp98_;
						gint _tmp99_;
						_data7_ = g_slice_new0 (Block7Data);
						_data7_->_ref_count_ = 1;
						_data7_->self = g_object_ref (self);
						_entry_index = _entry_index + 1;
						_tmp69_ = _entry_index;
						_tmp70_ = _entry_size;
						if (!(((guint) _tmp69_) < _tmp70_)) {
							block7_data_unref (_data7_);
							_data7_ = NULL;
							break;
						}
						_tmp71_ = _entry_list;
						_tmp72_ = font_manager_user_action_model_get (_tmp71_, (guint) _entry_index);
						_data7_->entry = _tmp72_;
						_tmp73_ = _data7_->entry;
						_tmp74_ = font_manager_user_action_get_action_name (_tmp73_);
						_tmp75_ = _tmp74_;
						_tmp76_ = g_menu_item_new (_tmp75_, NULL);
						item = _tmp76_;
						_tmp77_ = item;
						_tmp78_ = g_strdup_printf ("%i", i);
						_tmp79_ = _tmp78_;
						g_menu_item_set_attribute (_tmp77_, "custom", "s", _tmp79_, NULL);
						_g_free0 (_tmp79_);
						_tmp80_ = action_menu;
						_tmp81_ = item;
						g_menu_append_item (_tmp80_, _tmp81_);
						_tmp82_ = _data7_->entry;
						_tmp83_ = font_manager_user_action_get_action_name (_tmp82_);
						_tmp84_ = _tmp83_;
						_tmp85_ = (GtkButton*) gtk_button_new_with_label (_tmp84_);
						g_object_ref_sink (_tmp85_);
						widget = _tmp85_;
						_tmp86_ = widget;
						_tmp87_ = gtk_button_get_child (_tmp86_);
						_tmp88_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp87_, gtk_label_get_type (), GtkLabel));
						label = _tmp88_;
						_tmp89_ = label;
						gtk_label_set_xalign (_tmp89_, 0.0f);
						_tmp90_ = widget;
						gtk_widget_remove_css_class ((GtkWidget*) _tmp90_, "button");
						_tmp91_ = widget;
						gtk_widget_add_css_class ((GtkWidget*) _tmp91_, "flat");
						_tmp92_ = widget;
						gtk_widget_add_css_class ((GtkWidget*) _tmp92_, "row");
						_tmp93_ = self->priv->context_menu;
						_tmp94_ = widget;
						_tmp95_ = g_strdup_printf ("%i", i);
						_tmp96_ = _tmp95_;
						gtk_popover_menu_add_child (_tmp93_, (GtkWidget*) _tmp94_, _tmp96_);
						_g_free0 (_tmp96_);
						_tmp97_ = font_manager_font_list_view_get_selected_font (self);
						_data7_->target = _tmp97_;
						_tmp98_ = widget;
						g_signal_connect_data (_tmp98_, "clicked", (GCallback) ________lambda100__gtk_button_clicked, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
						_tmp99_ = i;
						i = _tmp99_ + 1;
						_g_object_unref0 (label);
						_g_object_unref0 (widget);
						_g_object_unref0 (item);
						block7_data_unref (_data7_);
						_data7_ = NULL;
					}
				}
				_g_object_unref0 (submenu);
				_g_object_unref0 (action_menu);
			}
			_g_free0 (family);
			_g_free0 (description);
		}
	}
	return;
}

static void
font_manager_font_list_view_on_show_context_menu (FontManagerFontListView* self,
                                                  gint n_press,
                                                  gdouble x,
                                                  gdouble y)
{
	gboolean _tmp0_ = FALSE;
	GdkRectangle rect = {0};
	GdkRectangle _tmp8_ = {0};
	GtkPopoverMenu* _tmp9_;
	GdkRectangle _tmp10_;
	GtkPopoverMenu* _tmp11_;
	GtkPopoverMenu* _tmp12_;
	g_return_if_fail (self != NULL);
	if (!self->priv->show_menu) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp1_ = FALSE;
		GObject* _tmp2_;
		GObject* _tmp3_;
		_tmp2_ = font_manager_font_list_base_get_selected_item ((FontManagerFontListBase*) self);
		_tmp3_ = _tmp2_;
		if (_tmp3_ == NULL) {
			GPtrArray* _tmp4_;
			GPtrArray* _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			_tmp4_ = font_manager_font_list_base_get_selected_children ((FontManagerFontListBase*) self);
			_tmp5_ = _tmp4_;
			_tmp6_ = vala_g_ptr_array_get_length (_tmp5_);
			_tmp7_ = _tmp6_;
			_tmp1_ = _tmp7_ < 1;
		} else {
			_tmp1_ = FALSE;
		}
		_tmp0_ = _tmp1_;
	}
	if (_tmp0_) {
		return;
	}
	memset (&_tmp8_, 0, sizeof (GdkRectangle));
	_tmp8_.x = (gint) x;
	_tmp8_.y = (gint) y;
	_tmp8_.width = 2;
	_tmp8_.height = 2;
	rect = _tmp8_;
	_tmp9_ = self->priv->context_menu;
	_tmp10_ = rect;
	gtk_popover_set_pointing_to ((GtkPopover*) _tmp9_, &_tmp10_);
	font_manager_font_list_view_update_context_menu (self);
	_tmp11_ = self->priv->context_menu;
	gtk_popover_present ((GtkPopover*) _tmp11_);
	_tmp12_ = self->priv->context_menu;
	gtk_popover_popup ((GtkPopover*) _tmp12_);
	return;
}

static GdkContentProvider*
font_manager_font_list_view_prepare_drag (FontManagerFontListView* self,
                                          GtkDragSource* source,
                                          gdouble x,
                                          gdouble y)
{
	GPtrArray* selections = NULL;
	GPtrArray* _tmp0_;
	GType e_type = 0UL;
	GtkTreeExpander* expander = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	GtkTreeExpander* _tmp4_;
	GtkTreeListRow* list_row = NULL;
	GtkTreeExpander* _tmp5_;
	GtkTreeListRow* _tmp6_;
	GtkTreeListRow* _tmp7_;
	GtkTreeListRow* _tmp8_;
	GObject* _tmp9_;
	GObject* _tmp10_;
	GObject* _tmp11_;
	gboolean _tmp12_;
	GPtrArray* _tmp17_;
	GPtrArray* _tmp18_;
	gint _tmp19_;
	gint _tmp20_;
	GPtrArray* _tmp33_;
	GValue _tmp34_ = {0};
	GdkContentProvider* _tmp35_;
	GdkContentProvider* _tmp36_;
	GdkContentProvider* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	selections = _tmp0_;
	e_type = gtk_tree_expander_get_type ();
	_tmp1_ = gtk_event_controller_get_widget ((GtkEventController*) source);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_widget_get_ancestor (_tmp2_, e_type);
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_tree_expander_get_type (), GtkTreeExpander));
	expander = _tmp4_;
	_tmp5_ = expander;
	_tmp6_ = gtk_tree_expander_get_list_row (_tmp5_);
	_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_tree_list_row_get_type (), GtkTreeListRow));
	list_row = _tmp7_;
	_tmp8_ = list_row;
	_tmp9_ = gtk_tree_list_row_get_item (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = _tmp10_;
	_tmp12_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, font_manager_family_get_type ());
	_g_object_unref0 (_tmp11_);
	if (_tmp12_) {
		GPtrArray* _tmp13_;
		GtkTreeListRow* _tmp14_;
		GObject* _tmp15_;
		GObject* _tmp16_;
		_tmp13_ = selections;
		_tmp14_ = list_row;
		_tmp15_ = gtk_tree_list_row_get_item (_tmp14_);
		_tmp16_ = _tmp15_;
		g_ptr_array_add (_tmp13_, _tmp16_);
	}
	_tmp17_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
	_tmp18_ = _tmp17_;
	_tmp19_ = vala_g_ptr_array_get_length (_tmp18_);
	_tmp20_ = _tmp19_;
	if (_tmp20_ > 1) {
		GPtrArray* _tmp21_;
		GPtrArray* _tmp22_;
		_tmp21_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
		_tmp22_ = _tmp21_;
		{
			GPtrArray* item_collection = NULL;
			guint item_index = 0U;
			item_collection = _tmp22_;
			for (item_index = 0; item_index < item_collection->len; item_index = item_index + 1) {
				GObject* _tmp23_;
				GObject* item = NULL;
				_tmp23_ = _g_object_ref0 ((GObject*) g_ptr_array_index (item_collection, item_index));
				item = _tmp23_;
				{
					GObject* _tmp24_;
					GtkTreeListRow* _tmp25_;
					GObject* _tmp26_;
					GObject* _tmp27_;
					GObject* _tmp28_;
					gboolean _tmp29_;
					_tmp24_ = item;
					_tmp25_ = list_row;
					_tmp26_ = gtk_tree_list_row_get_item (_tmp25_);
					_tmp27_ = _tmp26_;
					_tmp28_ = _tmp27_;
					_tmp29_ = _tmp24_ != _tmp28_;
					_g_object_unref0 (_tmp28_);
					if (_tmp29_) {
						GPtrArray* _tmp30_;
						GObject* _tmp31_;
						GObject* _tmp32_;
						_tmp30_ = selections;
						_tmp31_ = item;
						_tmp32_ = _g_object_ref0 (_tmp31_);
						g_ptr_array_add (_tmp30_, _tmp32_);
					}
					_g_object_unref0 (item);
				}
			}
		}
	}
	_tmp33_ = selections;
	g_value_init (&_tmp34_, G_TYPE_PTR_ARRAY);
	g_value_set_boxed (&_tmp34_, _tmp33_);
	_tmp35_ = gdk_content_provider_new_for_value (&_tmp34_);
	_tmp36_ = _tmp35_;
	G_IS_VALUE (&_tmp34_) ? (g_value_unset (&_tmp34_), NULL) : NULL;
	result = _tmp36_;
	_g_object_unref0 (list_row);
	_g_object_unref0 (expander);
	_g_ptr_array_unref0 (selections);
	return result;
}

static void
font_manager_font_list_view_drag_begin (FontManagerFontListView* self,
                                        GtkDragSource* drag_source,
                                        GdkDrag* drag)
{
	GtkOverlay* drag_icon = NULL;
	GtkOverlay* _tmp0_;
	GtkImage* icon = NULL;
	GtkImage* _tmp1_;
	GtkLabel* drag_count = NULL;
	GtkLabel* _tmp2_ = NULL;
	GPtrArray* _tmp3_;
	GPtrArray* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkDragIcon* gtk_drag_icon = NULL;
	GtkWidget* _tmp9_;
	GtkDragIcon* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (drag_source != NULL);
	g_return_if_fail (drag != NULL);
	_tmp0_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp0_);
	drag_icon = _tmp0_;
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name ("font-x-generic");
	g_object_ref_sink (_tmp1_);
	icon = _tmp1_;
	gtk_image_set_pixel_size (icon, 64);
	gtk_overlay_set_child (drag_icon, (GtkWidget*) icon);
	_tmp2_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_widget_set_opacity ((GtkWidget*) _tmp2_, 0.9);
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp2_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp2_);
	drag_count = _tmp2_;
	font_manager_widget_set_name ((GtkWidget*) drag_count, "FontManagerListDragCount");
	gtk_overlay_add_overlay (drag_icon, (GtkWidget*) drag_count);
	_tmp3_ = font_manager_font_list_base_get_selected_items ((FontManagerFontListBase*) self);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_g_ptr_array_get_length (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup_printf ("%i", _tmp6_);
	_tmp8_ = _tmp7_;
	gtk_label_set_label (drag_count, _tmp8_);
	_g_free0 (_tmp8_);
	_tmp9_ = gtk_drag_icon_get_for_drag (drag);
	_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_drag_icon_get_type (), GtkDragIcon));
	gtk_drag_icon = _tmp10_;
	gtk_drag_icon_set_child (gtk_drag_icon, (GtkWidget*) drag_icon);
	_g_object_unref0 (gtk_drag_icon);
	_g_object_unref0 (drag_count);
	_g_object_unref0 (icon);
	_g_object_unref0 (drag_icon);
	return;
}

static GdkContentProvider*
_font_manager_font_list_view_prepare_drag_gtk_drag_source_prepare (GtkDragSource* _sender,
                                                                   gdouble x,
                                                                   gdouble y,
                                                                   gpointer self)
{
	GdkContentProvider* result;
	result = font_manager_font_list_view_prepare_drag ((FontManagerFontListView*) self, _sender, x, y);
	return result;
}

static void
_font_manager_font_list_view_drag_begin_gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                                                    GdkDrag* drag,
                                                                    gpointer self)
{
	font_manager_font_list_view_drag_begin ((FontManagerFontListView*) self, _sender, drag);
}

static void
font_manager_font_list_view_real_setup_list_row (FontManagerFontListBase* base,
                                                 GtkSignalListItemFactory* factory,
                                                 GObject* item)
{
	FontManagerFontListView * self;
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	FontManagerFontListRow* row = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	FontManagerFontListRow* _tmp3_;
	GtkDragSource* drag_source = NULL;
	GtkDragSource* _tmp4_;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	GtkEventController* _tmp7_;
	self = (FontManagerFontListView*) base;
	g_return_if_fail (factory != NULL);
	g_return_if_fail (item != NULL);
	FONT_MANAGER_FONT_LIST_BASE_CLASS (font_manager_font_list_view_parent_class)->setup_list_row ((FontManagerFontListBase*) G_TYPE_CHECK_INSTANCE_CAST (self, FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, FontManagerBaseFontListView), factory, item);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (item, gtk_list_item_get_type (), GtkListItem));
	list_item = _tmp0_;
	_tmp1_ = gtk_list_item_get_child (list_item);
	_tmp2_ = gtk_tree_expander_get_child (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_tree_expander_get_type (), GtkTreeExpander));
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, FONT_MANAGER_TYPE_FONT_LIST_ROW, FontManagerFontListRow));
	row = _tmp3_;
	_tmp4_ = gtk_drag_source_new ();
	drag_source = _tmp4_;
	_tmp5_ = font_manager_list_item_row_get_drag_area ((FontManagerListItemRow*) row);
	_tmp6_ = _tmp5_;
	_tmp7_ = _g_object_ref0 ((GtkEventController*) drag_source);
	gtk_widget_add_controller ((GtkWidget*) _tmp6_, _tmp7_);
	g_signal_connect_object (drag_source, "prepare", (GCallback) _font_manager_font_list_view_prepare_drag_gtk_drag_source_prepare, self, 0);
	g_signal_connect_object (drag_source, "drag-begin", (GCallback) _font_manager_font_list_view_drag_begin_gtk_drag_source_drag_begin, self, 0);
	_g_object_unref0 (drag_source);
	_g_object_unref0 (row);
	_g_object_unref0 (list_item);
	return;
}

static void
_font_manager_font_list_view_on_item_state_changed_font_manager_list_item_row_item_state_changed (FontManagerListItemRow* _sender,
                                                                                                  GObject* item,
                                                                                                  gpointer self)
{
	font_manager_font_list_view_on_item_state_changed ((FontManagerFontListView*) self, item);
}

static void
font_manager_font_list_view_real_bind_list_row (FontManagerFontListBase* base,
                                                GtkSignalListItemFactory* factory,
                                                GObject* item)
{
	FontManagerFontListView * self;
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkTreeListRow* list_row = NULL;
	GtkTreeListModel* _tmp1_;
	GtkListItem* _tmp2_;
	GtkTreeListRow* _tmp3_;
	GtkTreeExpander* tree_expander = NULL;
	GtkListItem* _tmp4_;
	GtkWidget* _tmp5_;
	GtkTreeExpander* _tmp6_;
	FontManagerFontListRow* row = NULL;
	GtkTreeExpander* _tmp7_;
	GtkWidget* _tmp8_;
	FontManagerFontListRow* _tmp9_;
	GObject* _item = NULL;
	GtkTreeListRow* _tmp10_;
	GObject* _tmp11_;
	gboolean _tmp12_ = FALSE;
	GObject* _tmp13_;
	FontManagerFontListRow* _tmp25_;
	self = (FontManagerFontListView*) base;
	g_return_if_fail (factory != NULL);
	g_return_if_fail (item != NULL);
	FONT_MANAGER_FONT_LIST_BASE_CLASS (font_manager_font_list_view_parent_class)->bind_list_row ((FontManagerFontListBase*) G_TYPE_CHECK_INSTANCE_CAST (self, FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, FontManagerBaseFontListView), factory, item);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (item, gtk_list_item_get_type (), GtkListItem));
	list_item = _tmp0_;
	_tmp1_ = ((FontManagerBaseFontListView*) self)->treemodel;
	_tmp2_ = list_item;
	_tmp3_ = gtk_tree_list_model_get_row (_tmp1_, gtk_list_item_get_position (_tmp2_));
	list_row = _tmp3_;
	_tmp4_ = list_item;
	_tmp5_ = gtk_list_item_get_child (_tmp4_);
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_tree_expander_get_type (), GtkTreeExpander));
	tree_expander = _tmp6_;
	_tmp7_ = tree_expander;
	_tmp8_ = gtk_tree_expander_get_child (_tmp7_);
	_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, FONT_MANAGER_TYPE_FONT_LIST_ROW, FontManagerFontListRow));
	row = _tmp9_;
	_tmp10_ = list_row;
	_tmp11_ = gtk_tree_list_row_get_item (_tmp10_);
	_item = _tmp11_;
	_tmp13_ = _item;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, font_manager_family_get_type ())) {
		FontManagerReject* _tmp14_;
		FontManagerReject* _tmp15_;
		_tmp14_ = font_manager_font_list_base_get_disabled_families ((FontManagerFontListBase*) self);
		_tmp15_ = _tmp14_;
		_tmp12_ = _tmp15_ != NULL;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		FontManagerFontListRow* _tmp16_;
		GtkCheckButton* _tmp17_;
		GtkCheckButton* _tmp18_;
		FontManagerReject* _tmp19_;
		FontManagerReject* _tmp20_;
		GObject* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		gchar* _tmp24_;
		_tmp16_ = row;
		_tmp17_ = font_manager_list_item_row_get_item_state ((FontManagerListItemRow*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = font_manager_font_list_base_get_disabled_families ((FontManagerFontListBase*) self);
		_tmp20_ = _tmp19_;
		_tmp21_ = _item;
		g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, font_manager_family_get_type (), FontManagerFamily), "family", &_tmp22_, NULL);
		_tmp23_ = _tmp22_;
		_tmp24_ = _tmp23_;
		gtk_check_button_set_active (_tmp18_, !font_manager_string_set_contains ((FontManagerStringSet*) _tmp20_, _tmp24_));
		_g_free0 (_tmp24_);
	}
	_tmp25_ = row;
	g_signal_connect_object ((FontManagerListItemRow*) _tmp25_, "item-state-changed", (GCallback) _font_manager_font_list_view_on_item_state_changed_font_manager_list_item_row_item_state_changed, self, 0);
	_g_object_unref0 (_item);
	_g_object_unref0 (row);
	_g_object_unref0 (tree_expander);
	_g_object_unref0 (list_row);
	_g_object_unref0 (list_item);
	return;
}

static gboolean
font_manager_font_list_view_save_item_state_change (FontManagerFontListView* self)
{
	FontManagerReject* _tmp0_;
	FontManagerReject* _tmp1_;
	gboolean _tmp2_ = FALSE;
	FontManagerFontListFilter* _tmp3_;
	FontManagerFontListFilter* _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = font_manager_font_list_base_get_disabled_families ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	font_manager_selections_save ((FontManagerSelections*) _tmp1_);
	self->priv->state_change_timeout = (guint) 0;
	_tmp3_ = font_manager_font_list_base_get_filter ((FontManagerFontListBase*) self);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != NULL) {
		FontManagerFontListFilter* _tmp5_;
		FontManagerFontListFilter* _tmp6_;
		_tmp5_ = font_manager_font_list_base_get_filter ((FontManagerFontListBase*) self);
		_tmp6_ = _tmp5_;
		_tmp2_ = FONT_MANAGER_IS_COLLECTION (_tmp6_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		guint n_items = 0U;
		GtkTreeListModel* _tmp7_;
		self->priv->ignore_state_change = TRUE;
		_tmp7_ = ((FontManagerBaseFontListView*) self)->treemodel;
		n_items = g_list_model_get_n_items ((GListModel*) _tmp7_);
		{
			guint i = 0U;
			i = (guint) 0;
			{
				gboolean _tmp8_ = FALSE;
				_tmp8_ = TRUE;
				while (TRUE) {
					GObject* item = NULL;
					FontManagerBaseFontModel* _tmp10_;
					FontManagerBaseFontModel* _tmp11_;
					GObject* _tmp12_;
					FontManagerFamily* obj = NULL;
					GObject* _tmp13_;
					FontManagerFamily* _tmp14_;
					FontManagerFamily* _tmp15_;
					FontManagerReject* _tmp16_;
					FontManagerReject* _tmp17_;
					FontManagerFamily* _tmp18_;
					gchar* _tmp19_;
					gchar* _tmp20_;
					gchar* _tmp21_;
					if (!_tmp8_) {
						guint _tmp9_;
						_tmp9_ = i;
						i = _tmp9_ + 1;
					}
					_tmp8_ = FALSE;
					if (!(i < n_items)) {
						break;
					}
					_tmp10_ = font_manager_font_list_base_get_model ((FontManagerFontListBase*) self);
					_tmp11_ = _tmp10_;
					_tmp12_ = g_list_model_get_item ((GListModel*) _tmp11_, i);
					item = _tmp12_;
					_tmp13_ = item;
					_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, font_manager_family_get_type (), FontManagerFamily));
					obj = _tmp14_;
					_tmp15_ = obj;
					_tmp16_ = font_manager_font_list_base_get_disabled_families ((FontManagerFontListBase*) self);
					_tmp17_ = _tmp16_;
					_tmp18_ = obj;
					g_object_get (_tmp18_, "family", &_tmp19_, NULL);
					_tmp20_ = _tmp19_;
					_tmp21_ = _tmp20_;
					g_object_set (_tmp15_, "active", !font_manager_string_set_contains ((FontManagerStringSet*) _tmp17_, _tmp21_), NULL);
					_g_free0 (_tmp21_);
					_g_object_unref0 (obj);
					_g_object_unref0 (item);
				}
			}
		}
		self->priv->ignore_state_change = FALSE;
		font_manager_font_list_base_queue_update ((FontManagerFontListBase*) self);
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
_font_manager_font_list_view_save_item_state_change_gsource_func (gpointer self)
{
	gboolean result;
	result = font_manager_font_list_view_save_item_state_change ((FontManagerFontListView*) self);
	return result;
}

static void
font_manager_font_list_view_queue_item_state_update (FontManagerFontListView* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->state_change_timeout != ((guint) 0)) {
		g_source_remove (self->priv->state_change_timeout);
	}
	self->priv->state_change_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 333, _font_manager_font_list_view_save_item_state_change_gsource_func, g_object_ref (self), g_object_unref);
	return;
}

static void
font_manager_font_list_view_on_item_state_changed (FontManagerFontListView* self,
                                                   GObject* item)
{
	FontManagerFamily* family = NULL;
	FontManagerFamily* _tmp0_;
	FontManagerFamily* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	if (self->priv->ignore_state_change) {
		return;
	}
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (item, font_manager_family_get_type (), FontManagerFamily));
	family = _tmp0_;
	_tmp1_ = family;
	g_object_get (_tmp1_, "active", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		FontManagerReject* _tmp4_;
		FontManagerReject* _tmp5_;
		FontManagerFamily* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp4_ = font_manager_font_list_base_get_disabled_families ((FontManagerFontListBase*) self);
		_tmp5_ = _tmp4_;
		_tmp6_ = family;
		g_object_get (_tmp6_, "family", &_tmp7_, NULL);
		_tmp8_ = _tmp7_;
		_tmp9_ = _tmp8_;
		font_manager_string_set_remove ((FontManagerStringSet*) _tmp5_, _tmp9_);
		_g_free0 (_tmp9_);
	} else {
		FontManagerReject* _tmp10_;
		FontManagerReject* _tmp11_;
		FontManagerFamily* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		_tmp10_ = font_manager_font_list_base_get_disabled_families ((FontManagerFontListBase*) self);
		_tmp11_ = _tmp10_;
		_tmp12_ = family;
		g_object_get (_tmp12_, "family", &_tmp13_, NULL);
		_tmp14_ = _tmp13_;
		_tmp15_ = _tmp14_;
		font_manager_string_set_add ((FontManagerStringSet*) _tmp11_, _tmp15_);
		_g_free0 (_tmp15_);
	}
	_g_object_unref0 (family);
	return;
}

static void
font_manager_font_list_view_update_remove_sensitivity (FontManagerFontListView* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	guint _tmp2_;
	guint _tmp3_;
	gboolean remove_available = FALSE;
	FontManagerFontListControls* _tmp12_;
	GtkButton* _tmp13_;
	GtkButton* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp2_ = font_manager_font_list_base_get_current_selection ((FontManagerFontListBase*) self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != G_MAXUINT) {
		FontManagerFontListFilter* _tmp4_;
		FontManagerFontListFilter* _tmp5_;
		_tmp4_ = font_manager_font_list_base_get_filter ((FontManagerFontListBase*) self);
		_tmp5_ = _tmp4_;
		_tmp1_ = FONT_MANAGER_IS_COLLECTION (_tmp5_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		FontManagerFontListFilter* _tmp6_;
		FontManagerFontListFilter* _tmp7_;
		FontManagerStringSet* _tmp8_;
		FontManagerStringSet* _tmp9_;
		guint _tmp10_;
		guint _tmp11_;
		_tmp6_ = font_manager_font_list_base_get_filter ((FontManagerFontListBase*) self);
		_tmp7_ = _tmp6_;
		_tmp8_ = font_manager_collection_get_families (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, FONT_MANAGER_TYPE_COLLECTION, FontManagerCollection));
		_tmp9_ = _tmp8_;
		g_object_get (_tmp9_, "size", &_tmp10_, NULL);
		_tmp11_ = _tmp10_;
		_tmp0_ = _tmp11_ > ((guint) 0);
	} else {
		_tmp0_ = FALSE;
	}
	remove_available = _tmp0_;
	_tmp12_ = ((FontManagerBaseFontListView*) self)->controls;
	_tmp13_ = font_manager_font_list_controls_get_remove_button (_tmp12_);
	_tmp14_ = _tmp13_;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp14_, remove_available);
	return;
}

static void
font_manager_font_list_view_real_on_selection_changed (FontManagerFontListBase* base,
                                                       guint position,
                                                       guint n_items)
{
	FontManagerFontListView * self;
	self = (FontManagerFontListView*) base;
	FONT_MANAGER_FONT_LIST_BASE_CLASS (font_manager_font_list_view_parent_class)->on_selection_changed ((FontManagerFontListBase*) G_TYPE_CHECK_INSTANCE_CAST (self, FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, FontManagerBaseFontListView), position, n_items);
	font_manager_font_list_view_update_remove_sensitivity (self);
	return;
}

FontManagerFontListView*
font_manager_font_list_view_construct (GType object_type)
{
	FontManagerFontListView * self = NULL;
	self = (FontManagerFontListView*) font_manager_base_font_list_view_construct (object_type);
	return self;
}

FontManagerFontListView*
font_manager_font_list_view_new (void)
{
	return font_manager_font_list_view_construct (FONT_MANAGER_TYPE_FONT_LIST_VIEW);
}

FontManagerUserActionModel*
font_manager_font_list_view_get_user_actions (FontManagerFontListView* self)
{
	FontManagerUserActionModel* result;
	FontManagerUserActionModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_user_actions;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_view_set_user_actions (FontManagerFontListView* self,
                                              FontManagerUserActionModel* value)
{
	FontManagerUserActionModel* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_view_get_user_actions (self);
	if (old_value != value) {
		FontManagerUserActionModel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_user_actions);
		self->priv->_user_actions = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_view_properties[FONT_MANAGER_FONT_LIST_VIEW_USER_ACTIONS_PROPERTY]);
	}
}

FontManagerUserSourceModel*
font_manager_font_list_view_get_user_sources (FontManagerFontListView* self)
{
	FontManagerUserSourceModel* result;
	FontManagerUserSourceModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_user_sources;
	result = _tmp0_;
	return result;
}

void
font_manager_font_list_view_set_user_sources (FontManagerFontListView* self,
                                              FontManagerUserSourceModel* value)
{
	FontManagerUserSourceModel* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_view_get_user_sources (self);
	if (old_value != value) {
		FontManagerUserSourceModel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_user_sources);
		self->priv->_user_sources = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_view_properties[FONT_MANAGER_FONT_LIST_VIEW_USER_SOURCES_PROPERTY]);
	}
}

static void
_font_manager_font_list_view_on_show_context_menu_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                             gint n_press,
                                                                             gdouble x,
                                                                             gdouble y,
                                                                             gpointer self)
{
	font_manager_font_list_view_on_show_context_menu ((FontManagerFontListView*) self, n_press, x, y);
}

static gboolean
__lambda102_ (FontManagerFontListView* self)
{
	gboolean result;
	font_manager_font_list_base_select_item ((FontManagerFontListBase*) self, (guint) 0);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda102__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda102_ ((FontManagerFontListView*) self);
	return result;
}

static void
_font_manager_font_list_view___lambda101_ (FontManagerFontListView* self)
{
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda102__gsource_func, g_object_ref (self), g_object_unref);
	font_manager_font_list_view_update_remove_sensitivity (self);
}

static void
__font_manager_font_list_view___lambda101__g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self)
{
	_font_manager_font_list_view___lambda101_ ((FontManagerFontListView*) self);
}

static void
_font_manager_font_list_view_queue_item_state_update_font_manager_string_set_changed (FontManagerStringSet* _sender,
                                                                                      gpointer self)
{
	font_manager_font_list_view_queue_item_state_update ((FontManagerFontListView*) self);
}

static void
_font_manager_font_list_view___lambda103_ (FontManagerFontListView* self)
{
	gboolean _tmp0_ = FALSE;
	FontManagerReject* _tmp1_;
	FontManagerReject* _tmp2_;
	_tmp1_ = font_manager_font_list_base_get_disabled_families ((FontManagerFontListBase*) self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		FontManagerBaseFontModel* _tmp3_;
		FontManagerBaseFontModel* _tmp4_;
		_tmp3_ = font_manager_font_list_base_get_model ((FontManagerFontListBase*) self);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		FontManagerReject* _tmp5_;
		FontManagerReject* _tmp6_;
		_tmp5_ = font_manager_font_list_base_get_disabled_families ((FontManagerFontListBase*) self);
		_tmp6_ = _tmp5_;
		g_signal_connect_object ((FontManagerStringSet*) _tmp6_, "changed", (GCallback) _font_manager_font_list_view_queue_item_state_update_font_manager_string_set_changed, self, G_CONNECT_AFTER);
	}
}

static void
__font_manager_font_list_view___lambda103__g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self)
{
	_font_manager_font_list_view___lambda103_ ((FontManagerFontListView*) self);
}

static void
_font_manager_font_list_view_on_remove_clicked_font_manager_font_list_controls_remove_clicked (FontManagerFontListControls* _sender,
                                                                                               gpointer self)
{
	font_manager_font_list_view_on_remove_clicked ((FontManagerFontListView*) self);
}

static GObject *
font_manager_font_list_view_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerFontListView * self;
	GtkListBase* _tmp0_;
	GtkListBase* _tmp1_;
	GtkListBase* _tmp2_;
	GtkListBase* _tmp3_;
	GtkListBase* _tmp4_;
	GtkListBase* _tmp5_;
	GPtrArray* _tmp6_;
	GPtrArray* _tmp7_;
	GtkGesture* right_click = NULL;
	GtkGestureClick* _tmp8_ = NULL;
	GtkGesture* _tmp9_;
	GtkListBase* _tmp10_;
	GtkListBase* _tmp11_;
	GtkGesture* _tmp12_;
	GtkEventController* _tmp13_;
	FontManagerFontListControls* _tmp14_;
	parent_class = G_OBJECT_CLASS (font_manager_font_list_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_VIEW, FontManagerFontListView);
	_tmp0_ = font_manager_font_list_base_get_list ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	font_manager_widget_set_name ((GtkWidget*) _tmp1_, "FontManagerFontListView");
	_tmp2_ = font_manager_font_list_base_get_list ((FontManagerFontListBase*) self);
	_tmp3_ = _tmp2_;
	font_manager_widget_set_margin ((GtkWidget*) _tmp3_, 6);
	gtk_widget_add_css_class ((GtkWidget*) self, FONT_MANAGER_STYLE_CLASS_VIEW);
	_tmp4_ = font_manager_font_list_base_get_list ((FontManagerFontListBase*) self);
	_tmp5_ = _tmp4_;
	gtk_list_view_set_enable_rubberband (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_list_view_get_type (), GtkListView), TRUE);
	_tmp6_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_tmp7_ = _tmp6_;
	font_manager_font_list_base_set_selected_items ((FontManagerFontListBase*) self, _tmp7_);
	_g_ptr_array_unref0 (_tmp7_);
	_tmp8_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp8_, (guint) GDK_BUTTON_SECONDARY);
	right_click = (GtkGesture*) _tmp8_;
	_tmp9_ = right_click;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_gesture_click_get_type (), GtkGestureClick), "pressed", (GCallback) _font_manager_font_list_view_on_show_context_menu_gtk_gesture_click_pressed, self, 0);
	_tmp10_ = font_manager_font_list_base_get_list ((FontManagerFontListBase*) self);
	_tmp11_ = _tmp10_;
	_tmp12_ = right_click;
	_tmp13_ = _g_object_ref0 ((GtkEventController*) _tmp12_);
	gtk_widget_add_controller ((GtkWidget*) _tmp11_, _tmp13_);
	font_manager_font_list_base_select_item ((FontManagerFontListBase*) self, (guint) 0);
	g_signal_connect_object ((GObject*) self, "notify::filter", (GCallback) __font_manager_font_list_view___lambda101__g_object_notify, self, G_CONNECT_AFTER);
	g_signal_connect_object ((GObject*) self, "notify::disabled-families", (GCallback) __font_manager_font_list_view___lambda103__g_object_notify, self, G_CONNECT_AFTER);
	font_manager_font_list_view_init_context_menu (self);
	_tmp14_ = ((FontManagerBaseFontListView*) self)->controls;
	g_signal_connect_object (_tmp14_, "remove-clicked", (GCallback) _font_manager_font_list_view_on_remove_clicked_font_manager_font_list_controls_remove_clicked, self, 0);
	_g_object_unref0 (right_click);
	return obj;
}

static void
font_manager_font_list_view_class_init (FontManagerFontListViewClass * klass,
                                        gpointer klass_data)
{
	font_manager_font_list_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerFontListView_private_offset);
	((FontManagerBaseFontListViewClass *) klass)->on_activate = (void (*) (FontManagerBaseFontListView*, guint)) font_manager_font_list_view_real_on_activate;
	((FontManagerFontListBaseClass *) klass)->setup_list_row = (void (*) (FontManagerFontListBase*, GtkSignalListItemFactory*, GObject*)) font_manager_font_list_view_real_setup_list_row;
	((FontManagerFontListBaseClass *) klass)->bind_list_row = (void (*) (FontManagerFontListBase*, GtkSignalListItemFactory*, GObject*)) font_manager_font_list_view_real_bind_list_row;
	((FontManagerFontListBaseClass *) klass)->on_selection_changed = (void (*) (FontManagerFontListBase*, guint, guint)) font_manager_font_list_view_real_on_selection_changed;
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_font_list_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_font_list_view_set_property;
	G_OBJECT_CLASS (klass)->constructor = font_manager_font_list_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_font_list_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_VIEW_USER_ACTIONS_PROPERTY, font_manager_font_list_view_properties[FONT_MANAGER_FONT_LIST_VIEW_USER_ACTIONS_PROPERTY] = g_param_spec_object ("user-actions", "user-actions", "user-actions", FONT_MANAGER_TYPE_USER_ACTION_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_VIEW_USER_SOURCES_PROPERTY, font_manager_font_list_view_properties[FONT_MANAGER_FONT_LIST_VIEW_USER_SOURCES_PROPERTY] = g_param_spec_object ("user-sources", "user-sources", "user-sources", FONT_MANAGER_TYPE_USER_SOURCE_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	font_manager_font_list_view_signals[FONT_MANAGER_FONT_LIST_VIEW_COLLECTION_CHANGED_SIGNAL] = g_signal_new ("collection-changed", FONT_MANAGER_TYPE_FONT_LIST_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_install_action (GTK_WIDGET_CLASS (klass), "copy-location", NULL, (GtkWidgetActionActivateFunc) font_manager_font_list_view_copy_location);
	gtk_widget_class_install_action (GTK_WIDGET_CLASS (klass), "show-in-folder", NULL, (GtkWidgetActionActivateFunc) font_manager_font_list_view_show_in_folder);
	gtk_widget_class_install_action (GTK_WIDGET_CLASS (klass), "enable-selected", NULL, (GtkWidgetActionActivateFunc) font_manager_font_list_view_enable_selected);
	gtk_widget_class_install_action (GTK_WIDGET_CLASS (klass), "disable-selected", NULL, (GtkWidgetActionActivateFunc) font_manager_font_list_view_disable_selected);
}

static void
font_manager_font_list_view_instance_init (FontManagerFontListView * self,
                                           gpointer klass)
{
	self->priv = font_manager_font_list_view_get_instance_private (self);
	self->priv->_user_actions = NULL;
	self->priv->_user_sources = NULL;
	self->priv->state_change_timeout = (guint) 0;
	self->priv->ignore_state_change = FALSE;
	self->priv->show_menu = TRUE;
}

static void
font_manager_font_list_view_finalize (GObject * obj)
{
	FontManagerFontListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_VIEW, FontManagerFontListView);
	_g_object_unref0 (self->priv->_user_actions);
	_g_object_unref0 (self->priv->_user_sources);
	_g_object_unref0 (self->priv->menu);
	_g_array_unref0 (self->priv->menu_items);
	_g_object_unref0 (self->priv->menu_title);
	_g_object_unref0 (self->priv->context_menu);
	G_OBJECT_CLASS (font_manager_font_list_view_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_font_list_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerFontListViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_font_list_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerFontListView), 0, (GInstanceInitFunc) font_manager_font_list_view_instance_init, NULL };
	GType font_manager_font_list_view_type_id;
	font_manager_font_list_view_type_id = g_type_register_static (FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, "FontManagerFontListView", &g_define_type_info, 0);
	FontManagerFontListView_private_offset = g_type_add_instance_private (font_manager_font_list_view_type_id, sizeof (FontManagerFontListViewPrivate));
	return font_manager_font_list_view_type_id;
}

GType
font_manager_font_list_view_get_type (void)
{
	static volatile gsize font_manager_font_list_view_type_id__once = 0;
	if (g_once_init_enter (&font_manager_font_list_view_type_id__once)) {
		GType font_manager_font_list_view_type_id;
		font_manager_font_list_view_type_id = font_manager_font_list_view_get_type_once ();
		g_once_init_leave (&font_manager_font_list_view_type_id__once, font_manager_font_list_view_type_id);
	}
	return font_manager_font_list_view_type_id__once;
}

static void
_vala_font_manager_font_list_view_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	FontManagerFontListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FONT_LIST_VIEW, FontManagerFontListView);
	switch (property_id) {
		case FONT_MANAGER_FONT_LIST_VIEW_USER_ACTIONS_PROPERTY:
		g_value_set_object (value, font_manager_font_list_view_get_user_actions (self));
		break;
		case FONT_MANAGER_FONT_LIST_VIEW_USER_SOURCES_PROPERTY:
		g_value_set_object (value, font_manager_font_list_view_get_user_sources (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_font_list_view_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	FontManagerFontListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FONT_LIST_VIEW, FontManagerFontListView);
	switch (property_id) {
		case FONT_MANAGER_FONT_LIST_VIEW_USER_ACTIONS_PROPERTY:
		font_manager_font_list_view_set_user_actions (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FONT_LIST_VIEW_USER_SOURCES_PROPERTY:
		font_manager_font_list_view_set_user_sources (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
font_manager_remove_list_view_get_instance_private (FontManagerRemoveListView* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerRemoveListView_private_offset);
}

void
font_manager_remove_list_view_set_search_entry (FontManagerRemoveListView* self,
                                                GtkSearchEntry* entry)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (entry != NULL);
	font_manager_font_list_base_set_search_entry ((FontManagerFontListBase*) self, entry);
	return;
}

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

static void
__lambda203_ (Block8Data* _data8_,
              GtkCheckButton* c)
{
	FontManagerRemoveListView* self;
	GtkTreeListRow* _tmp0_;
	self = _data8_->self;
	g_return_if_fail (c != NULL);
	_tmp0_ = _data8_->list_row;
	font_manager_remove_list_view_on_item_state_changed (self, _tmp0_);
}

static void
___lambda203__gtk_check_button_toggled (GtkCheckButton* _sender,
                                        gpointer self)
{
	__lambda203_ (self, _sender);
}

static void
font_manager_remove_list_view_real_bind_list_row (FontManagerFontListBase* base,
                                                  GtkSignalListItemFactory* factory,
                                                  GObject* item)
{
	FontManagerRemoveListView * self;
	Block8Data* _data8_;
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkTreeListModel* _tmp1_;
	GtkListItem* _tmp2_;
	GtkTreeListRow* _tmp3_;
	GtkTreeExpander* tree_expander = NULL;
	GtkListItem* _tmp4_;
	GtkWidget* _tmp5_;
	GtkTreeExpander* _tmp6_;
	FontManagerFontListRow* row = NULL;
	GtkTreeExpander* _tmp7_;
	GtkWidget* _tmp8_;
	FontManagerFontListRow* _tmp9_;
	GObject* _item = NULL;
	GtkTreeListRow* _tmp10_;
	GObject* _tmp11_;
	FontManagerFontListRow* _tmp12_;
	GtkImage* _tmp13_;
	GtkImage* _tmp14_;
	FontManagerFontListRow* _tmp15_;
	GtkBox* _tmp16_;
	GtkBox* _tmp17_;
	FontManagerFontListRow* _tmp18_;
	FontManagerFontListRow* _tmp19_;
	FontManagerFontListRow* _tmp20_;
	GtkCheckButton* _tmp21_;
	GtkCheckButton* _tmp22_;
	GObject* _tmp23_;
	FontManagerFontListRow* _tmp24_;
	GtkCheckButton* _tmp25_;
	GtkCheckButton* _tmp26_;
	GObject* _tmp27_;
	GtkTreeExpander* _tmp40_;
	self = (FontManagerRemoveListView*) base;
	g_return_if_fail (factory != NULL);
	g_return_if_fail (item != NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	FONT_MANAGER_FONT_LIST_BASE_CLASS (font_manager_remove_list_view_parent_class)->bind_list_row ((FontManagerFontListBase*) G_TYPE_CHECK_INSTANCE_CAST (self, FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, FontManagerBaseFontListView), factory, item);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (item, gtk_list_item_get_type (), GtkListItem));
	list_item = _tmp0_;
	_tmp1_ = ((FontManagerBaseFontListView*) self)->treemodel;
	_tmp2_ = list_item;
	_tmp3_ = gtk_tree_list_model_get_row (_tmp1_, gtk_list_item_get_position (_tmp2_));
	_data8_->list_row = _tmp3_;
	_tmp4_ = list_item;
	_tmp5_ = gtk_list_item_get_child (_tmp4_);
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_tree_expander_get_type (), GtkTreeExpander));
	tree_expander = _tmp6_;
	_tmp7_ = tree_expander;
	_tmp8_ = gtk_tree_expander_get_child (_tmp7_);
	_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, FONT_MANAGER_TYPE_FONT_LIST_ROW, FontManagerFontListRow));
	row = _tmp9_;
	_tmp10_ = _data8_->list_row;
	_tmp11_ = gtk_tree_list_row_get_item (_tmp10_);
	_item = _tmp11_;
	_tmp12_ = row;
	_tmp13_ = font_manager_list_item_row_get_drag_handle ((FontManagerListItemRow*) _tmp12_);
	_tmp14_ = _tmp13_;
	gtk_widget_set_visible ((GtkWidget*) _tmp14_, FALSE);
	_tmp15_ = row;
	_tmp16_ = font_manager_list_item_row_get_drag_area ((FontManagerListItemRow*) _tmp15_);
	_tmp17_ = _tmp16_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp17_, TRUE);
	_tmp18_ = row;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp18_, 0);
	_tmp19_ = row;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp19_, 12);
	_tmp20_ = row;
	_tmp21_ = font_manager_list_item_row_get_item_state ((FontManagerListItemRow*) _tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = _item;
	g_object_set ((GObject*) _tmp22_, "sensitive", TRUE, "visible", !G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, font_manager_family_get_type ()), NULL, NULL);
	_tmp24_ = row;
	_tmp25_ = font_manager_list_item_row_get_item_state ((FontManagerListItemRow*) _tmp24_);
	_tmp26_ = _tmp25_;
	g_signal_connect_data (_tmp26_, "toggled", (GCallback) ___lambda203__gtk_check_button_toggled, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	_tmp27_ = _item;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, font_manager_family_get_type ())) {
		FontManagerFontListRow* _tmp28_;
		GtkLabel* _tmp29_;
		GtkLabel* _tmp30_;
		FontManagerFontListRow* _tmp31_;
		GtkLabel* _tmp32_;
		GtkLabel* _tmp33_;
		_tmp28_ = row;
		_tmp29_ = font_manager_list_item_row_get_item_label ((FontManagerListItemRow*) _tmp28_);
		_tmp30_ = _tmp29_;
		gtk_widget_add_css_class ((GtkWidget*) _tmp30_, "heading");
		_tmp31_ = row;
		_tmp32_ = font_manager_list_item_row_get_item_label ((FontManagerListItemRow*) _tmp31_);
		_tmp33_ = _tmp32_;
		gtk_widget_add_css_class ((GtkWidget*) _tmp33_, "dim-label");
	} else {
		FontManagerFontListRow* _tmp34_;
		GtkLabel* _tmp35_;
		GtkLabel* _tmp36_;
		FontManagerFontListRow* _tmp37_;
		GtkLabel* _tmp38_;
		GtkLabel* _tmp39_;
		_tmp34_ = row;
		_tmp35_ = font_manager_list_item_row_get_item_label ((FontManagerListItemRow*) _tmp34_);
		_tmp36_ = _tmp35_;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp36_, "heading");
		_tmp37_ = row;
		_tmp38_ = font_manager_list_item_row_get_item_label ((FontManagerListItemRow*) _tmp37_);
		_tmp39_ = _tmp38_;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp39_, "dim-label");
	}
	_tmp40_ = tree_expander;
	gtk_tree_expander_set_hide_expander (_tmp40_, TRUE);
	_g_object_unref0 (_item);
	_g_object_unref0 (row);
	_g_object_unref0 (tree_expander);
	_g_object_unref0 (list_item);
	block8_data_unref (_data8_);
	_data8_ = NULL;
	return;
}

static void
font_manager_remove_list_view_on_item_state_changed (FontManagerRemoveListView* self,
                                                     GtkTreeListRow* row)
{
	GObject* item = NULL;
	GObject* _tmp0_;
	GObject* _tmp1_;
	FontManagerFont* font = NULL;
	GObject* _tmp2_;
	FontManagerFont* _tmp3_;
	FontManagerFont* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_tree_list_row_get_item (row);
	item = _tmp0_;
	_tmp1_ = item;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, font_manager_font_get_type ())) {
		_g_object_unref0 (item);
		return;
	}
	_tmp2_ = item;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, font_manager_font_get_type (), FontManagerFont));
	font = _tmp3_;
	_tmp4_ = font;
	g_object_get (_tmp4_, "active", &_tmp5_, NULL);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		FontManagerStringSet* _tmp7_;
		FontManagerFont* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp7_ = self->priv->_selected_files;
		_tmp8_ = font;
		g_object_get (_tmp8_, "filepath", &_tmp9_, NULL);
		_tmp10_ = _tmp9_;
		_tmp11_ = _tmp10_;
		font_manager_string_set_add (_tmp7_, _tmp11_);
		_g_free0 (_tmp11_);
	} else {
		FontManagerStringSet* _tmp12_;
		FontManagerFont* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		_tmp12_ = self->priv->_selected_files;
		_tmp13_ = font;
		g_object_get (_tmp13_, "filepath", &_tmp14_, NULL);
		_tmp15_ = _tmp14_;
		_tmp16_ = _tmp15_;
		font_manager_string_set_remove (_tmp12_, _tmp16_);
		_g_free0 (_tmp16_);
	}
	g_signal_emit (self, font_manager_remove_list_view_signals[FONT_MANAGER_REMOVE_LIST_VIEW_CHANGED_SIGNAL], 0);
	_g_object_unref0 (font);
	_g_object_unref0 (item);
	return;
}

FontManagerRemoveListView*
font_manager_remove_list_view_construct (GType object_type)
{
	FontManagerRemoveListView * self = NULL;
	self = (FontManagerRemoveListView*) font_manager_base_font_list_view_construct (object_type);
	return self;
}

FontManagerRemoveListView*
font_manager_remove_list_view_new (void)
{
	return font_manager_remove_list_view_construct (FONT_MANAGER_TYPE_REMOVE_LIST_VIEW);
}

FontManagerStringSet*
font_manager_remove_list_view_get_selected_files (FontManagerRemoveListView* self)
{
	FontManagerStringSet* result;
	FontManagerStringSet* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_files;
	result = _tmp0_;
	return result;
}

void
font_manager_remove_list_view_set_selected_files (FontManagerRemoveListView* self,
                                                  FontManagerStringSet* value)
{
	FontManagerStringSet* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_remove_list_view_get_selected_files (self);
	if (old_value != value) {
		FontManagerStringSet* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_selected_files);
		self->priv->_selected_files = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_remove_list_view_properties[FONT_MANAGER_REMOVE_LIST_VIEW_SELECTED_FILES_PROPERTY]);
	}
}

static GObject *
font_manager_remove_list_view_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerRemoveListView * self;
	GtkListBase* _tmp0_;
	GtkListBase* _tmp1_;
	FontManagerFontListControls* _tmp2_;
	GtkTreeListModel* _tmp3_;
	FontManagerStringSet* _tmp4_;
	FontManagerStringSet* _tmp5_;
	GtkTreeListModel* _tmp6_;
	GListModel* _tmp7_;
	GtkNoSelection* _tmp8_;
	GtkNoSelection* _tmp9_;
	FontManagerUserFonts* _tmp10_;
	FontManagerUserFonts* _tmp11_;
	FontManagerFontListFilter* _tmp12_;
	FontManagerFontListFilter* _tmp13_;
	parent_class = G_OBJECT_CLASS (font_manager_remove_list_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_REMOVE_LIST_VIEW, FontManagerRemoveListView);
	_tmp0_ = font_manager_font_list_base_get_list ((FontManagerFontListBase*) self);
	_tmp1_ = _tmp0_;
	font_manager_widget_set_name ((GtkWidget*) _tmp1_, "FontManagerRemoveListView");
	_tmp2_ = ((FontManagerBaseFontListView*) self)->controls;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, FALSE);
	_tmp3_ = ((FontManagerBaseFontListView*) self)->treemodel;
	gtk_tree_list_model_set_autoexpand (_tmp3_, TRUE);
	_tmp4_ = font_manager_string_set_new ();
	_tmp5_ = _tmp4_;
	font_manager_remove_list_view_set_selected_files (self, _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = ((FontManagerBaseFontListView*) self)->treemodel;
	_tmp7_ = _g_object_ref0 ((GListModel*) _tmp6_);
	_tmp8_ = gtk_no_selection_new (_tmp7_);
	_tmp9_ = _tmp8_;
	font_manager_font_list_base_set_selection ((FontManagerFontListBase*) self, (GtkSelectionModel*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = font_manager_user_fonts_new ();
	_tmp11_ = _tmp10_;
	font_manager_font_list_base_set_filter ((FontManagerFontListBase*) self, (FontManagerFontListFilter*) _tmp11_);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = font_manager_font_list_base_get_filter ((FontManagerFontListBase*) self);
	_tmp13_ = _tmp12_;
	font_manager_font_list_filter_update (_tmp13_, NULL, NULL);
	return obj;
}

static void
font_manager_remove_list_view_class_init (FontManagerRemoveListViewClass * klass,
                                          gpointer klass_data)
{
	font_manager_remove_list_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerRemoveListView_private_offset);
	((FontManagerFontListBaseClass *) klass)->bind_list_row = (void (*) (FontManagerFontListBase*, GtkSignalListItemFactory*, GObject*)) font_manager_remove_list_view_real_bind_list_row;
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_remove_list_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_remove_list_view_set_property;
	G_OBJECT_CLASS (klass)->constructor = font_manager_remove_list_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_remove_list_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_REMOVE_LIST_VIEW_SELECTED_FILES_PROPERTY, font_manager_remove_list_view_properties[FONT_MANAGER_REMOVE_LIST_VIEW_SELECTED_FILES_PROPERTY] = g_param_spec_object ("selected-files", "selected-files", "selected-files", font_manager_string_set_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	font_manager_remove_list_view_signals[FONT_MANAGER_REMOVE_LIST_VIEW_CHANGED_SIGNAL] = g_signal_new ("changed", FONT_MANAGER_TYPE_REMOVE_LIST_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
font_manager_remove_list_view_instance_init (FontManagerRemoveListView * self,
                                             gpointer klass)
{
	self->priv = font_manager_remove_list_view_get_instance_private (self);
	self->priv->_selected_files = NULL;
}

static void
font_manager_remove_list_view_finalize (GObject * obj)
{
	FontManagerRemoveListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_REMOVE_LIST_VIEW, FontManagerRemoveListView);
	_g_object_unref0 (self->priv->_selected_files);
	G_OBJECT_CLASS (font_manager_remove_list_view_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_remove_list_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerRemoveListViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_remove_list_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerRemoveListView), 0, (GInstanceInitFunc) font_manager_remove_list_view_instance_init, NULL };
	GType font_manager_remove_list_view_type_id;
	font_manager_remove_list_view_type_id = g_type_register_static (FONT_MANAGER_TYPE_BASE_FONT_LIST_VIEW, "FontManagerRemoveListView", &g_define_type_info, 0);
	FontManagerRemoveListView_private_offset = g_type_add_instance_private (font_manager_remove_list_view_type_id, sizeof (FontManagerRemoveListViewPrivate));
	return font_manager_remove_list_view_type_id;
}

GType
font_manager_remove_list_view_get_type (void)
{
	static volatile gsize font_manager_remove_list_view_type_id__once = 0;
	if (g_once_init_enter (&font_manager_remove_list_view_type_id__once)) {
		GType font_manager_remove_list_view_type_id;
		font_manager_remove_list_view_type_id = font_manager_remove_list_view_get_type_once ();
		g_once_init_leave (&font_manager_remove_list_view_type_id__once, font_manager_remove_list_view_type_id);
	}
	return font_manager_remove_list_view_type_id__once;
}

static void
_vala_font_manager_remove_list_view_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	FontManagerRemoveListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_REMOVE_LIST_VIEW, FontManagerRemoveListView);
	switch (property_id) {
		case FONT_MANAGER_REMOVE_LIST_VIEW_SELECTED_FILES_PROPERTY:
		g_value_set_object (value, font_manager_remove_list_view_get_selected_files (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_remove_list_view_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	FontManagerRemoveListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_REMOVE_LIST_VIEW, FontManagerRemoveListView);
	switch (property_id) {
		case FONT_MANAGER_REMOVE_LIST_VIEW_SELECTED_FILES_PROPERTY:
		font_manager_remove_list_view_set_selected_files (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

