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

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

#define FILES_LIST_VIEW_COLLAPSE_TO_UNLOAD_DELAY 2
#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 FILES_TYPE_ABSTRACT_DIRECTORY_VIEW (files_abstract_directory_view_get_type ())
#define FILES_ABSTRACT_DIRECTORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_TYPE_ABSTRACT_DIRECTORY_VIEW, FilesAbstractDirectoryView))
#define FILES_ABSTRACT_DIRECTORY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_TYPE_ABSTRACT_DIRECTORY_VIEW, FilesAbstractDirectoryViewClass))
#define FILES_IS_ABSTRACT_DIRECTORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_TYPE_ABSTRACT_DIRECTORY_VIEW))
#define FILES_IS_ABSTRACT_DIRECTORY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_TYPE_ABSTRACT_DIRECTORY_VIEW))
#define FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_TYPE_ABSTRACT_DIRECTORY_VIEW, FilesAbstractDirectoryViewClass))

typedef struct _FilesAbstractDirectoryView FilesAbstractDirectoryView;
typedef struct _FilesAbstractDirectoryViewClass FilesAbstractDirectoryViewClass;
typedef struct _FilesAbstractDirectoryViewPrivate FilesAbstractDirectoryViewPrivate;

#define FILES_VIEW_TYPE_SLOT (files_view_slot_get_type ())
#define FILES_VIEW_SLOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_VIEW_TYPE_SLOT, FilesViewSlot))
#define FILES_VIEW_SLOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_VIEW_TYPE_SLOT, FilesViewSlotClass))
#define FILES_VIEW_IS_SLOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_VIEW_TYPE_SLOT))
#define FILES_VIEW_IS_SLOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_VIEW_TYPE_SLOT))
#define FILES_VIEW_SLOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_VIEW_TYPE_SLOT, FilesViewSlotClass))

typedef struct _FilesViewSlot FilesViewSlot;
typedef struct _FilesViewSlotClass FilesViewSlotClass;

#define FILES_TYPE_ABSTRACT_TREE_VIEW (files_abstract_tree_view_get_type ())
#define FILES_ABSTRACT_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_TYPE_ABSTRACT_TREE_VIEW, FilesAbstractTreeView))
#define FILES_ABSTRACT_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_TYPE_ABSTRACT_TREE_VIEW, FilesAbstractTreeViewClass))
#define FILES_IS_ABSTRACT_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_TYPE_ABSTRACT_TREE_VIEW))
#define FILES_IS_ABSTRACT_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_TYPE_ABSTRACT_TREE_VIEW))
#define FILES_ABSTRACT_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_TYPE_ABSTRACT_TREE_VIEW, FilesAbstractTreeViewClass))

typedef struct _FilesAbstractTreeView FilesAbstractTreeView;
typedef struct _FilesAbstractTreeViewClass FilesAbstractTreeViewClass;
typedef struct _FilesAbstractTreeViewPrivate FilesAbstractTreeViewPrivate;

#define FILES_TYPE_TREE_VIEW (files_tree_view_get_type ())
#define FILES_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_TYPE_TREE_VIEW, FilesTreeView))
#define FILES_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_TYPE_TREE_VIEW, FilesTreeViewClass))
#define FILES_IS_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_TYPE_TREE_VIEW))
#define FILES_IS_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_TYPE_TREE_VIEW))
#define FILES_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_TYPE_TREE_VIEW, FilesTreeViewClass))

typedef struct _FilesTreeView FilesTreeView;
typedef struct _FilesTreeViewClass FilesTreeViewClass;

#define FILES_TYPE_LIST_VIEW (files_list_view_get_type ())
#define FILES_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_TYPE_LIST_VIEW, FilesListView))
#define FILES_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_TYPE_LIST_VIEW, FilesListViewClass))
#define FILES_IS_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_TYPE_LIST_VIEW))
#define FILES_IS_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_TYPE_LIST_VIEW))
#define FILES_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_TYPE_LIST_VIEW, FilesListViewClass))

typedef struct _FilesListView FilesListView;
typedef struct _FilesListViewClass FilesListViewClass;
typedef struct _FilesListViewPrivate FilesListViewPrivate;
enum  {
	FILES_LIST_VIEW_0_PROPERTY,
	FILES_LIST_VIEW_NUM_PROPERTIES
};
static GParamSpec* files_list_view_properties[FILES_LIST_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __vala_GtkTreePath_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreePath_free (var), NULL)))
#define __vala_GtkTreeIter_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreeIter_free (var), NULL)))

struct _FilesAbstractDirectoryView {
	GtkBin parent_instance;
	FilesAbstractDirectoryViewPrivate * priv;
	FilesZoomLevel minimum_zoom;
	FilesZoomLevel maximum_zoom;
	GList* source_drag_file_list;
	GdkAtom current_target_type;
	gboolean dnd_disabled;
	FilesTextRenderer* name_renderer;
	gchar* original_name;
	gchar* proposed_name;
	gboolean right_margin_unselects_all;
	gboolean on_directory;
	gboolean one_or_less;
	gboolean should_activate;
	gboolean should_deselect;
	gboolean should_thumbnail;
	gboolean should_select;
	GtkTreePath* click_path;
	guint click_zone;
	guint previous_click_zone;
	GList* selected_files;
	gboolean is_writable;
	gboolean is_loading;
	gboolean helpers_shown;
	GtkScrolledWindow* scrolled_window;
	FilesListModel* model;
	FilesIconRenderer* icon_renderer;
	FilesViewSlot* slot;
	GtkRecentManager* recent;
	GtkEventControllerKey* key_controller;
	GtkGestureMultiPress* button_controller;
	GtkEventControllerScroll* scroll_controller;
	GtkEventControllerMotion* motion_controller;
};

struct _FilesAbstractDirectoryViewClass {
	GtkBinClass parent_class;
	void (*on_row_deleted) (FilesAbstractDirectoryView* self, GtkTreePath* path);
	gboolean (*on_view_key_press_event) (FilesAbstractDirectoryView* self, guint original_keyval, guint keycode, GdkModifierType state);
	void (*on_scroll_event) (FilesAbstractDirectoryView* self, gdouble dx, gdouble dy);
	gboolean (*handle_primary_button_click) (FilesAbstractDirectoryView* self, guint n_press, GdkModifierType mods, GtkTreePath* path);
	void (*on_view_button_press_event) (FilesAbstractDirectoryView* self, gint n_press, gdouble x, gdouble y);
	void (*on_view_button_release_event) (FilesAbstractDirectoryView* self, gint n_press, gdouble x, gdouble y);
	void (*change_zoom_level) (FilesAbstractDirectoryView* self);
	gboolean (*expand_collapse) (FilesAbstractDirectoryView* self, GtkTreePath* path);
	gboolean (*handle_default_button_click) (FilesAbstractDirectoryView* self);
	gboolean (*get_next_visible_iter) (FilesAbstractDirectoryView* self, GtkTreeIter* iter, gboolean recurse);
	void (*cancel) (FilesAbstractDirectoryView* self);
	void (*highlight_path) (FilesAbstractDirectoryView* self, GtkTreePath* path);
	GtkTreePath* (*up) (FilesAbstractDirectoryView* self, GtkTreePath* path);
	GtkTreePath* (*down) (FilesAbstractDirectoryView* self, GtkTreePath* path);
	GSettings* (*get_view_settings) (FilesAbstractDirectoryView* self);
	void (*set_up_zoom_level) (FilesAbstractDirectoryView* self);
	gboolean (*view_has_focus) (FilesAbstractDirectoryView* self);
	void (*scroll_to_cell) (FilesAbstractDirectoryView* self, GtkTreePath* path, gboolean scroll_to_top);
	GList* (*get_selected_paths) (FilesAbstractDirectoryView* self);
	GtkTreePath* (*get_path_at_pos) (FilesAbstractDirectoryView* self, gint x, gint win);
	GtkTreePath* (*get_path_at_cursor) (FilesAbstractDirectoryView* self);
	void (*tree_select_all) (FilesAbstractDirectoryView* self);
	void (*tree_unselect_all) (FilesAbstractDirectoryView* self);
	void (*tree_unselect_others) (FilesAbstractDirectoryView* self);
	void (*select_path) (FilesAbstractDirectoryView* self, GtkTreePath* path, gboolean cursor_follows);
	void (*unselect_path) (FilesAbstractDirectoryView* self, GtkTreePath* path);
	gboolean (*path_is_selected) (FilesAbstractDirectoryView* self, GtkTreePath* path);
	gboolean (*get_visible_range) (FilesAbstractDirectoryView* self, GtkTreePath** start_path, GtkTreePath** end_path);
	void (*set_cursor) (FilesAbstractDirectoryView* self, GtkTreePath* path, gboolean start_editing, gboolean select, gboolean scroll_to_top);
	gboolean (*move_cursor) (FilesAbstractDirectoryView* self, guint keyval, gboolean only_shift_pressed, gboolean control_pressed);
	gboolean (*will_handle_button_press) (FilesAbstractDirectoryView* self, gboolean no_mods, gboolean only_control_pressed, gboolean only_shift_pressed);
	gboolean (*handle_multi_select) (FilesAbstractDirectoryView* self, GtkTreePath* path);
	GtkWidget* (*create_view) (FilesAbstractDirectoryView* self);
	guint (*get_event_position_info) (FilesAbstractDirectoryView* self, gdouble x, gdouble y, GtkTreePath** path, gboolean rubberband);
	void (*scroll_to_path) (FilesAbstractDirectoryView* self, GtkTreePath* path, gboolean scroll_to_top);
	void (*set_cursor_on_cell) (FilesAbstractDirectoryView* self, GtkTreePath* path, GtkCellRenderer* renderer, gboolean start_editing, gboolean scroll_to_top);
	void (*freeze_tree) (FilesAbstractDirectoryView* self);
	void (*thaw_tree) (FilesAbstractDirectoryView* self);
	void (*freeze_child_notify) (FilesAbstractDirectoryView* self);
	void (*thaw_child_notify) (FilesAbstractDirectoryView* self);
	void (*connect_tree_signals) (FilesAbstractDirectoryView* self);
	void (*disconnect_tree_signals) (FilesAbstractDirectoryView* self);
};

struct _FilesAbstractTreeView {
	FilesAbstractDirectoryView parent_instance;
	FilesAbstractTreeViewPrivate * priv;
	FilesTreeView* tree;
	GtkTreeViewColumn* name_column;
};

struct _FilesAbstractTreeViewClass {
	FilesAbstractDirectoryViewClass parent_class;
	void (*set_up_icon_renderer) (FilesAbstractTreeView* self);
};

struct _FilesListView {
	FilesAbstractTreeView parent_instance;
	FilesListViewPrivate * priv;
};

struct _FilesListViewClass {
	FilesAbstractTreeViewClass parent_class;
};

struct _FilesListViewPrivate {
	guint unload_file_timeout_id;
	GList* subdirectories_to_unload;
	GList* loaded_subdirectories;
};

static gint FilesListView_private_offset;
static gpointer files_list_view_parent_class = NULL;
static gchar** files_list_view_column_titles;
static gint files_list_view_column_titles_length1;
static gchar** files_list_view_column_titles = NULL;
static gint files_list_view_column_titles_length1 = 0;
static gint _files_list_view_column_titles_size_ = 0;
VALA_EXTERN GSettings* files_column_view_settings;
VALA_EXTERN GSettings* files_list_view_settings;

VALA_EXTERN GType files_abstract_directory_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesAbstractDirectoryView, g_object_unref)
VALA_EXTERN GType files_view_slot_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesViewSlot, g_object_unref)
VALA_EXTERN GType files_abstract_tree_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesAbstractTreeView, g_object_unref)
VALA_EXTERN GType files_tree_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesTreeView, g_object_unref)
VALA_EXTERN GType files_list_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesListView, g_object_unref)
VALA_EXTERN void files_abstract_tree_view_set_up_icon_renderer (FilesAbstractTreeView* self);
VALA_EXTERN gboolean files_abstract_directory_view_on_view_key_press_event (FilesAbstractDirectoryView* self,
                                                                guint original_keyval,
                                                                guint keycode,
                                                                GdkModifierType state);
VALA_EXTERN GtkWidget* files_abstract_directory_view_create_view (FilesAbstractDirectoryView* self);
VALA_EXTERN GSettings* files_abstract_directory_view_get_view_settings (FilesAbstractDirectoryView* self);
VALA_EXTERN gboolean files_abstract_directory_view_expand_collapse (FilesAbstractDirectoryView* self,
                                                        GtkTreePath* path);
VALA_EXTERN gboolean files_abstract_directory_view_get_next_visible_iter (FilesAbstractDirectoryView* self,
                                                              GtkTreeIter* iter,
                                                              gboolean recurse);
VALA_EXTERN void files_abstract_directory_view_cancel (FilesAbstractDirectoryView* self);
static void _vala_GtkTreeRowReference_free (GtkTreeRowReference* self);
static void __vala_GtkTreeRowReference_free0_ (gpointer var);
static inline void _g_list_free___vala_GtkTreeRowReference_free0_ (GList* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
VALA_EXTERN FilesListView* files_list_view_new (FilesViewSlot* _slot);
VALA_EXTERN FilesListView* files_list_view_construct (GType object_type,
                                          FilesViewSlot* _slot);
VALA_EXTERN FilesAbstractTreeView* files_abstract_tree_view_construct (GType object_type,
                                                           FilesViewSlot* _slot);
static void files_list_view_real_set_up_icon_renderer (FilesAbstractTreeView* base);
static void files_list_view_connect_additional_signals (FilesListView* self);
static void files_list_view_on_row_expanded (FilesListView* self,
                                      GtkTreeIter* iter,
                                      GtkTreePath* path);
static void _files_list_view_on_row_expanded_gtk_tree_view_row_expanded (GtkTreeView* _sender,
                                                                  GtkTreeIter* iter,
                                                                  GtkTreePath* path,
                                                                  gpointer self);
static void files_list_view_on_row_collapsed (FilesListView* self,
                                       GtkTreeIter* iter,
                                       GtkTreePath* path);
static void _files_list_view_on_row_collapsed_gtk_tree_view_row_collapsed (GtkTreeView* _sender,
                                                                    GtkTreeIter* iter,
                                                                    GtkTreePath* path,
                                                                    gpointer self);
static void files_list_view_on_model_subdirectory_unloaded (FilesListView* self,
                                                     FilesDirectory* dir);
static void _files_list_view_on_model_subdirectory_unloaded_files_list_model_subdirectory_unloaded (FilesListModel* _sender,
                                                                                             FilesDirectory* directory,
                                                                                             gpointer self);
static void files_list_view_append_extra_tree_columns (FilesListView* self);
static void files_list_view_set_path_expanded (FilesListView* self,
                                        GtkTreePath* path,
                                        gboolean expanded);
static void files_list_view_add_subdirectory_at_path (FilesListView* self,
                                               GtkTreePath* path);
static void files_list_view_schedule_unload_subdirectory_at_path (FilesListView* self,
                                                           GtkTreePath* path);
static void files_list_view_remove_subdirectory (FilesListView* self,
                                          FilesDirectory* dir);
static void files_list_view_schedule_model_unload_directories (FilesListView* self);
static void files_list_view_cancel_file_timeout (FilesListView* self);
static gboolean files_list_view_unload_directories (FilesListView* self);
static gboolean _files_list_view_unload_directories_gsource_func (gpointer self);
static void _vala_GtkTreePath_free (GtkTreePath* self);
static void _vala_GtkTreeIter_free (GtkTreeIter* self);
static GtkTreeIter* _vala_GtkTreeIter_copy (GtkTreeIter* self);
static void __lambda85_ (FilesListView* self,
                  GtkTreeRowReference* rowref);
static void ___lambda85__gfunc (gconstpointer data,
                         gpointer self);
static gboolean files_list_view_real_on_view_key_press_event (FilesAbstractDirectoryView* base,
                                                       guint keyval,
                                                       guint keycode,
                                                       GdkModifierType state);
static GtkWidget* files_list_view_real_create_view (FilesAbstractDirectoryView* base);
static GSettings* files_list_view_real_get_view_settings (FilesAbstractDirectoryView* base);
VALA_EXTERN void files_abstract_directory_view_connect_directory_handlers (FilesAbstractDirectoryView* self,
                                                               FilesDirectory* dir);
VALA_EXTERN void files_abstract_directory_view_disconnect_directory_handlers (FilesAbstractDirectoryView* self,
                                                                  FilesDirectory* dir);
static gboolean files_list_view_real_expand_collapse (FilesAbstractDirectoryView* base,
                                               GtkTreePath* path);
static gboolean files_list_view_real_get_next_visible_iter (FilesAbstractDirectoryView* base,
                                                     GtkTreeIter* iter,
                                                     gboolean recurse);
static void files_list_view_real_cancel (FilesAbstractDirectoryView* base);
static void __lambda113_ (FilesListView* self,
                   FilesDirectory* dir);
static void ___lambda113__gfunc (gconstpointer data,
                          gpointer self);
static void files_list_view_finalize (GObject * obj);
static GType files_list_view_get_type_once (void);

static inline gpointer
files_list_view_get_instance_private (FilesListView* self)
{
	return G_STRUCT_MEMBER_P (self, FilesListView_private_offset);
}

static void
_vala_GtkTreeRowReference_free (GtkTreeRowReference* self)
{
	g_boxed_free (gtk_tree_row_reference_get_type (), self);
}

static void
__vala_GtkTreeRowReference_free0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (_vala_GtkTreeRowReference_free (var), NULL));
}

static inline void
_g_list_free___vala_GtkTreeRowReference_free0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) __vala_GtkTreeRowReference_free0_);
}

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

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

FilesListView*
files_list_view_construct (GType object_type,
                           FilesViewSlot* _slot)
{
	FilesListView * self = NULL;
	g_return_val_if_fail (_slot != NULL, NULL);
	self = (FilesListView*) files_abstract_tree_view_construct (object_type, _slot);
	return self;
}

FilesListView*
files_list_view_new (FilesViewSlot* _slot)
{
	return files_list_view_construct (FILES_TYPE_LIST_VIEW, _slot);
}

static void
files_list_view_real_set_up_icon_renderer (FilesAbstractTreeView* base)
{
	FilesListView * self;
	FilesIconRenderer* _tmp0_;
	self = (FilesListView*) base;
	_tmp0_ = files_icon_renderer_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (((FilesAbstractDirectoryView*) self)->icon_renderer);
	((FilesAbstractDirectoryView*) self)->icon_renderer = _tmp0_;
}

static void
_files_list_view_on_row_expanded_gtk_tree_view_row_expanded (GtkTreeView* _sender,
                                                             GtkTreeIter* iter,
                                                             GtkTreePath* path,
                                                             gpointer self)
{
	files_list_view_on_row_expanded ((FilesListView*) self, iter, path);
}

static void
_files_list_view_on_row_collapsed_gtk_tree_view_row_collapsed (GtkTreeView* _sender,
                                                               GtkTreeIter* iter,
                                                               GtkTreePath* path,
                                                               gpointer self)
{
	files_list_view_on_row_collapsed ((FilesListView*) self, iter, path);
}

static void
_files_list_view_on_model_subdirectory_unloaded_files_list_model_subdirectory_unloaded (FilesListModel* _sender,
                                                                                        FilesDirectory* directory,
                                                                                        gpointer self)
{
	files_list_view_on_model_subdirectory_unloaded ((FilesListView*) self, directory);
}

static void
files_list_view_connect_additional_signals (FilesListView* self)
{
	FilesTreeView* _tmp0_;
	FilesTreeView* _tmp1_;
	FilesListModel* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((FilesAbstractTreeView*) self)->tree;
	g_signal_connect_object ((GtkTreeView*) _tmp0_, "row-expanded", (GCallback) _files_list_view_on_row_expanded_gtk_tree_view_row_expanded, self, 0);
	_tmp1_ = ((FilesAbstractTreeView*) self)->tree;
	g_signal_connect_object ((GtkTreeView*) _tmp1_, "row-collapsed", (GCallback) _files_list_view_on_row_collapsed_gtk_tree_view_row_collapsed, self, 0);
	_tmp2_ = ((FilesAbstractDirectoryView*) self)->model;
	g_signal_connect_object (_tmp2_, "subdirectory-unloaded", (GCallback) _files_list_view_on_model_subdirectory_unloaded_files_list_model_subdirectory_unloaded, self, 0);
}

static void
files_list_view_append_extra_tree_columns (FilesListView* self)
{
	gint fnc = 0;
	gint preferred_column_width = 0;
	GSettings* _tmp0_;
	g_return_if_fail (self != NULL);
	fnc = (gint) FILES_LIST_MODEL_COLUMN_ID_FILENAME;
	_tmp0_ = files_column_view_settings;
	preferred_column_width = g_settings_get_int (_tmp0_, "preferred-column-width");
	{
		gint k = 0;
		k = fnc;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = k;
					k = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(k < ((gint) FILES_LIST_MODEL_COLUMN_ID_NUM_COLUMNS))) {
					break;
				}
				if (k == fnc) {
					GtkTreeViewColumn* _tmp3_;
					gchar** _tmp4_;
					gint _tmp4__length1;
					const gchar* _tmp5_;
					GtkTreeViewColumn* _tmp6_;
					_tmp3_ = ((FilesAbstractTreeView*) self)->name_column;
					_tmp4_ = files_list_view_column_titles;
					_tmp4__length1 = files_list_view_column_titles_length1;
					_tmp5_ = _tmp4_[0];
					gtk_tree_view_column_set_title (_tmp3_, _tmp5_);
					_tmp6_ = ((FilesAbstractTreeView*) self)->name_column;
					gtk_tree_view_column_set_min_width (_tmp6_, preferred_column_width);
				} else {
					GtkCellRendererText* renderer = NULL;
					GtkCellRendererText* _tmp7_;
					GtkTreeViewColumn* col = NULL;
					gchar** _tmp8_;
					gint _tmp8__length1;
					const gchar* _tmp9_;
					GtkCellRendererText* _tmp10_;
					GtkTreeViewColumn* _tmp11_ = NULL;
					gboolean _tmp12_ = FALSE;
					FilesTreeView* _tmp15_;
					GtkTreeViewColumn* _tmp16_;
					_tmp7_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
					g_object_ref_sink (_tmp7_);
					renderer = _tmp7_;
					_tmp8_ = files_list_view_column_titles;
					_tmp8__length1 = files_list_view_column_titles_length1;
					_tmp9_ = _tmp8_[k - fnc];
					_tmp10_ = renderer;
					_tmp11_ = gtk_tree_view_column_new_with_attributes (_tmp9_, (GtkCellRenderer*) _tmp10_, "text", k, NULL);
					gtk_tree_view_column_set_sort_column_id (_tmp11_, k);
					gtk_tree_view_column_set_resizable (_tmp11_, FALSE);
					gtk_tree_view_column_set_expand (_tmp11_, FALSE);
					gtk_tree_view_column_set_min_width (_tmp11_, 24);
					g_object_ref_sink (_tmp11_);
					col = _tmp11_;
					if (k == ((gint) FILES_LIST_MODEL_COLUMN_ID_SIZE)) {
						_tmp12_ = TRUE;
					} else {
						_tmp12_ = k == ((gint) FILES_LIST_MODEL_COLUMN_ID_MODIFIED);
					}
					if (_tmp12_) {
						GtkCellRendererText* _tmp13_;
						_tmp13_ = renderer;
						g_object_set ((GObject*) _tmp13_, "xalign", 1.0f, NULL);
					} else {
						GtkCellRendererText* _tmp14_;
						_tmp14_ = renderer;
						g_object_set ((GObject*) _tmp14_, "xalign", 0.0f, NULL);
					}
					_tmp15_ = ((FilesAbstractTreeView*) self)->tree;
					_tmp16_ = col;
					gtk_tree_view_append_column ((GtkTreeView*) _tmp15_, _tmp16_);
					_g_object_unref0 (col);
					_g_object_unref0 (renderer);
				}
			}
		}
	}
}

static void
files_list_view_on_row_expanded (FilesListView* self,
                                 GtkTreeIter* iter,
                                 GtkTreePath* path)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (iter != NULL);
	g_return_if_fail (path != NULL);
	files_list_view_set_path_expanded (self, path, TRUE);
	files_list_view_add_subdirectory_at_path (self, path);
}

static void
files_list_view_on_row_collapsed (FilesListView* self,
                                  GtkTreeIter* iter,
                                  GtkTreePath* path)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (iter != NULL);
	g_return_if_fail (path != NULL);
	files_list_view_set_path_expanded (self, path, FALSE);
	files_list_view_schedule_unload_subdirectory_at_path (self, path);
}

static void
files_list_view_on_model_subdirectory_unloaded (FilesListView* self,
                                                FilesDirectory* dir)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	files_list_view_remove_subdirectory (self, dir);
}

static void
files_list_view_schedule_unload_subdirectory_at_path (FilesListView* self,
                                                      GtkTreePath* path)
{
	FilesListModel* _tmp0_;
	GtkTreeRowReference* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = ((FilesAbstractDirectoryView*) self)->model;
	_tmp1_ = gtk_tree_row_reference_new ((GtkTreeModel*) _tmp0_, path);
	self->priv->subdirectories_to_unload = g_list_append (self->priv->subdirectories_to_unload, _tmp1_);
	files_list_view_schedule_model_unload_directories (self);
}

static void
files_list_view_set_path_expanded (FilesListView* self,
                                   GtkTreePath* path,
                                   gboolean expanded)
{
	FilesFile* file = NULL;
	FilesListModel* _tmp0_;
	FilesFile* _tmp1_;
	FilesFile* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = ((FilesAbstractDirectoryView*) self)->model;
	_tmp1_ = files_list_model_file_for_path (_tmp0_, path);
	file = _tmp1_;
	_tmp2_ = file;
	if (_tmp2_ != NULL) {
		FilesFile* _tmp3_;
		_tmp3_ = file;
		files_file_set_expanded (_tmp3_, expanded);
	}
	_g_object_unref0 (file);
}

static gboolean
_files_list_view_unload_directories_gsource_func (gpointer self)
{
	gboolean result;
	result = files_list_view_unload_directories ((FilesListView*) self);
	return result;
}

static void
files_list_view_schedule_model_unload_directories (FilesListView* self)
{
	g_return_if_fail (self != NULL);
	files_list_view_cancel_file_timeout (self);
	self->priv->unload_file_timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) FILES_LIST_VIEW_COLLAPSE_TO_UNLOAD_DELAY, _files_list_view_unload_directories_gsource_func, g_object_ref (self), g_object_unref);
}

static void
_vala_GtkTreePath_free (GtkTreePath* self)
{
	g_boxed_free (gtk_tree_path_get_type (), self);
}

static void
_vala_GtkTreeIter_free (GtkTreeIter* self)
{
	g_boxed_free (gtk_tree_iter_get_type (), self);
}

static GtkTreeIter*
_vala_GtkTreeIter_copy (GtkTreeIter* self)
{
	return g_boxed_copy (gtk_tree_iter_get_type (), self);
}

static gpointer
__vala_GtkTreeIter_copy0 (gpointer self)
{
	return self ? _vala_GtkTreeIter_copy (self) : NULL;
}

static GList*
vala_g_list_remove_full (GList* self,
                         gconstpointer data,
                         GFreeFunc func)
{
	GList* l = NULL;
	GList* result;
	l = self;
	while (TRUE) {
		GList* _tmp0_;
		GList* _tmp1_;
		gconstpointer _tmp2_;
		_tmp0_ = l;
		if (!(_tmp0_ != NULL)) {
			break;
		}
		_tmp1_ = l;
		_tmp2_ = ((GList*) _tmp1_)->data;
		if (_tmp2_ != data) {
			GList* _tmp3_;
			GList* _tmp4_;
			_tmp3_ = l;
			_tmp4_ = ((GList*) _tmp3_)->next;
			l = _tmp4_;
		} else {
			GList* _tmp5_;
			gconstpointer _tmp6_;
			GList* _tmp7_;
			_tmp5_ = l;
			_tmp6_ = ((GList*) _tmp5_)->data;
			func (_tmp6_);
			_tmp7_ = l;
			self = g_list_delete_link (self, (GList*) _tmp7_);
			break;
		}
	}
	result = self;
	return result;
}

static void
__lambda85_ (FilesListView* self,
             GtkTreeRowReference* rowref)
{
	g_return_if_fail (rowref != NULL);
	self->priv->subdirectories_to_unload = vala_g_list_remove_full (self->priv->subdirectories_to_unload, rowref, __vala_GtkTreeRowReference_free0_);
}

static void
___lambda85__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda85_ ((FilesListView*) self, (GtkTreeRowReference*) data);
}

static gboolean
files_list_view_unload_directories (FilesListView* self)
{
	GList* _tmp0_;
	GList* _tmp17_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->subdirectories_to_unload;
	{
		GList* rowref_collection = NULL;
		GList* rowref_it = NULL;
		rowref_collection = _tmp0_;
		for (rowref_it = rowref_collection; rowref_it != NULL; rowref_it = rowref_it->next) {
			GtkTreeRowReference* rowref = NULL;
			rowref = (GtkTreeRowReference*) rowref_it->data;
			{
				GtkTreeIter* iter = NULL;
				GtkTreePath* path = NULL;
				GtkTreeRowReference* _tmp1_;
				FilesTreeView* _tmp4_;
				GtkTreePath* _tmp5_;
				gboolean _tmp6_ = FALSE;
				FilesListModel* _tmp7_;
				GtkTreePath* _tmp8_;
				GtkTreeIter _tmp9_ = {0};
				gboolean _tmp10_;
				GtkTreeIter _tmp11_;
				GtkTreeIter* _tmp12_;
				iter = NULL;
				_tmp1_ = rowref;
				if (gtk_tree_row_reference_valid (_tmp1_)) {
					GtkTreeRowReference* _tmp2_;
					GtkTreePath* _tmp3_;
					_tmp2_ = rowref;
					_tmp3_ = gtk_tree_row_reference_get_path (_tmp2_);
					__vala_GtkTreePath_free0 (path);
					path = _tmp3_;
				} else {
					g_warning ("ListView.vala:125: TreeRowRef invalid when unloading subdirectory");
					__vala_GtkTreePath_free0 (path);
					__vala_GtkTreeIter_free0 (iter);
					continue;
				}
				_tmp4_ = ((FilesAbstractTreeView*) self)->tree;
				_tmp5_ = path;
				if (gtk_tree_view_row_expanded (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_tree_view_get_type (), GtkTreeView), _tmp5_)) {
					__vala_GtkTreePath_free0 (path);
					__vala_GtkTreeIter_free0 (iter);
					continue;
				}
				_tmp7_ = ((FilesAbstractDirectoryView*) self)->model;
				_tmp8_ = path;
				_tmp10_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp7_, &_tmp9_, _tmp8_);
				__vala_GtkTreeIter_free0 (iter);
				_tmp11_ = _tmp9_;
				_tmp12_ = __vala_GtkTreeIter_copy0 (&_tmp11_);
				iter = _tmp12_;
				if (_tmp10_) {
					GtkTreeIter* _tmp13_;
					_tmp13_ = iter;
					_tmp6_ = _tmp13_ != NULL;
				} else {
					_tmp6_ = FALSE;
				}
				if (_tmp6_) {
					FilesListModel* _tmp14_;
					GtkTreeIter* _tmp15_;
					GtkTreeIter _tmp16_;
					_tmp14_ = ((FilesAbstractDirectoryView*) self)->model;
					_tmp15_ = iter;
					_tmp16_ = *_tmp15_;
					files_list_model_unload_subdirectory (_tmp14_, &_tmp16_);
				} else {
					g_warning ("ListView.vala:136: Subdirectory to unload not found in model");
				}
				__vala_GtkTreePath_free0 (path);
				__vala_GtkTreeIter_free0 (iter);
			}
		}
	}
	_tmp17_ = self->priv->subdirectories_to_unload;
	g_list_foreach (_tmp17_, ___lambda85__gfunc, self);
	self->priv->unload_file_timeout_id = (guint) 0;
	result = FALSE;
	return result;
}

static void
files_list_view_cancel_file_timeout (FilesListView* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->unload_file_timeout_id > ((guint) 0)) {
		g_source_remove (self->priv->unload_file_timeout_id);
		self->priv->unload_file_timeout_id = (guint) 0;
	}
}

static gboolean
files_list_view_real_on_view_key_press_event (FilesAbstractDirectoryView* base,
                                              guint keyval,
                                              guint keycode,
                                              GdkModifierType state)
{
	FilesListView * self;
	gboolean control_pressed = FALSE;
	gboolean shift_pressed = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean result;
	self = (FilesListView*) base;
	control_pressed = (state & GDK_CONTROL_MASK) != 0;
	shift_pressed = (state & GDK_SHIFT_MASK) != 0;
	if (!control_pressed) {
		_tmp0_ = !shift_pressed;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		switch (keyval) {
			case GDK_KEY_Right:
			{
				GtkTreePath* path = NULL;
				FilesTreeView* _tmp1_;
				GtkTreePath* _tmp2_ = NULL;
				GtkTreePath* _tmp3_;
				path = NULL;
				_tmp1_ = ((FilesAbstractTreeView*) self)->tree;
				gtk_tree_view_get_cursor ((GtkTreeView*) _tmp1_, &_tmp2_, NULL);
				__vala_GtkTreePath_free0 (path);
				path = _tmp2_;
				_tmp3_ = path;
				if (_tmp3_ != NULL) {
					FilesTreeView* _tmp4_;
					GtkTreePath* _tmp5_;
					_tmp4_ = ((FilesAbstractTreeView*) self)->tree;
					_tmp5_ = path;
					gtk_tree_view_expand_row ((GtkTreeView*) _tmp4_, _tmp5_, FALSE);
				}
				result = TRUE;
				__vala_GtkTreePath_free0 (path);
				return result;
			}
			case GDK_KEY_Left:
			{
				GtkTreePath* path = NULL;
				FilesTreeView* _tmp6_;
				GtkTreePath* _tmp7_ = NULL;
				GtkTreePath* _tmp8_;
				path = NULL;
				_tmp6_ = ((FilesAbstractTreeView*) self)->tree;
				gtk_tree_view_get_cursor ((GtkTreeView*) _tmp6_, &_tmp7_, NULL);
				__vala_GtkTreePath_free0 (path);
				path = _tmp7_;
				_tmp8_ = path;
				if (_tmp8_ != NULL) {
					FilesTreeView* _tmp9_;
					GtkTreePath* _tmp10_;
					_tmp9_ = ((FilesAbstractTreeView*) self)->tree;
					_tmp10_ = path;
					if (gtk_tree_view_row_expanded ((GtkTreeView*) _tmp9_, _tmp10_)) {
						FilesTreeView* _tmp11_;
						GtkTreePath* _tmp12_;
						_tmp11_ = ((FilesAbstractTreeView*) self)->tree;
						_tmp12_ = path;
						gtk_tree_view_collapse_row ((GtkTreeView*) _tmp11_, _tmp12_);
					} else {
						GtkTreePath* _tmp13_;
						_tmp13_ = path;
						if (gtk_tree_path_up (_tmp13_)) {
							FilesTreeView* _tmp14_;
							GtkTreePath* _tmp15_;
							_tmp14_ = ((FilesAbstractTreeView*) self)->tree;
							_tmp15_ = path;
							gtk_tree_view_collapse_row ((GtkTreeView*) _tmp14_, _tmp15_);
						}
					}
				}
				result = TRUE;
				__vala_GtkTreePath_free0 (path);
				return result;
			}
			default:
			{
				break;
			}
		}
	}
	result = FILES_ABSTRACT_DIRECTORY_VIEW_CLASS (files_list_view_parent_class)->on_view_key_press_event ((FilesAbstractDirectoryView*) G_TYPE_CHECK_INSTANCE_CAST (self, FILES_TYPE_ABSTRACT_TREE_VIEW, FilesAbstractTreeView), keyval, keycode, state);
	return result;
}

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

static GtkWidget*
files_list_view_real_create_view (FilesAbstractDirectoryView* base)
{
	FilesListView * self;
	FilesListModel* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	FilesTreeView* _tmp3_;
	FilesTreeView* _tmp4_;
	FilesTreeView* _tmp5_;
	FilesTreeView* _tmp6_;
	GtkWidget* _tmp7_;
	GtkWidget* result;
	self = (FilesListView*) base;
	_tmp0_ = ((FilesAbstractDirectoryView*) self)->model;
	files_list_model_set_has_child (_tmp0_, TRUE);
	_tmp1_ = FILES_ABSTRACT_DIRECTORY_VIEW_CLASS (files_list_view_parent_class)->create_view ((FilesAbstractDirectoryView*) G_TYPE_CHECK_INSTANCE_CAST (self, FILES_TYPE_ABSTRACT_TREE_VIEW, FilesAbstractTreeView));
	_tmp2_ = _tmp1_;
	_g_object_unref0 (_tmp2_);
	_tmp3_ = ((FilesAbstractTreeView*) self)->tree;
	gtk_tree_view_set_show_expanders ((GtkTreeView*) _tmp3_, TRUE);
	_tmp4_ = ((FilesAbstractTreeView*) self)->tree;
	gtk_tree_view_set_headers_visible ((GtkTreeView*) _tmp4_, TRUE);
	_tmp5_ = ((FilesAbstractTreeView*) self)->tree;
	gtk_tree_view_set_rubber_banding ((GtkTreeView*) _tmp5_, TRUE);
	files_list_view_append_extra_tree_columns (self);
	files_list_view_connect_additional_signals (self);
	_tmp6_ = ((FilesAbstractTreeView*) self)->tree;
	_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp6_) : NULL);
	result = _tmp7_;
	return result;
}

static GSettings*
files_list_view_real_get_view_settings (FilesAbstractDirectoryView* base)
{
	FilesListView * self;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	GSettings* result;
	self = (FilesListView*) base;
	_tmp0_ = files_list_view_settings;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
files_list_view_add_subdirectory_at_path (FilesListView* self,
                                          GtkTreePath* path)
{
	FilesDirectory* dir = NULL;
	FilesListModel* _tmp0_;
	FilesDirectory* _tmp1_ = NULL;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	dir = NULL;
	_tmp0_ = ((FilesAbstractDirectoryView*) self)->model;
	_tmp2_ = files_list_model_get_subdirectory (_tmp0_, path, &_tmp1_);
	_g_object_unref0 (dir);
	dir = _tmp1_;
	if (_tmp2_) {
		FilesDirectory* _tmp3_;
		FilesDirectory* _tmp4_;
		FilesDirectory* _tmp5_;
		FilesDirectory* _tmp6_;
		_tmp3_ = dir;
		files_abstract_directory_view_connect_directory_handlers ((FilesAbstractDirectoryView*) self, _tmp3_);
		_tmp4_ = dir;
		files_directory_init (_tmp4_, NULL, NULL, NULL, NULL);
		_tmp5_ = dir;
		_tmp6_ = _g_object_ref0 (_tmp5_);
		self->priv->loaded_subdirectories = g_list_prepend (self->priv->loaded_subdirectories, _tmp6_);
	}
	_g_object_unref0 (dir);
}

static void
files_list_view_remove_subdirectory (FilesListView* self,
                                     FilesDirectory* dir)
{
	g_return_if_fail (self != NULL);
	if (dir != NULL) {
		files_abstract_directory_view_disconnect_directory_handlers ((FilesAbstractDirectoryView*) self, dir);
		self->priv->loaded_subdirectories = vala_g_list_remove_full (self->priv->loaded_subdirectories, dir, _g_object_unref0_);
	} else {
		g_warning ("ListView.vala:227: List View: directory null in remove_subdirectory");
	}
}

static gboolean
files_list_view_real_expand_collapse (FilesAbstractDirectoryView* base,
                                      GtkTreePath* path)
{
	FilesListView * self;
	FilesTreeView* _tmp0_;
	gboolean result;
	self = (FilesListView*) base;
	_tmp0_ = ((FilesAbstractTreeView*) self)->tree;
	if (gtk_tree_view_row_expanded ((GtkTreeView*) _tmp0_, path)) {
		FilesTreeView* _tmp1_;
		_tmp1_ = ((FilesAbstractTreeView*) self)->tree;
		gtk_tree_view_collapse_row ((GtkTreeView*) _tmp1_, path);
	} else {
		FilesTreeView* _tmp2_;
		_tmp2_ = ((FilesAbstractTreeView*) self)->tree;
		gtk_tree_view_expand_row ((GtkTreeView*) _tmp2_, path, FALSE);
	}
	result = TRUE;
	return result;
}

static gboolean
files_list_view_real_get_next_visible_iter (FilesAbstractDirectoryView* base,
                                            GtkTreeIter* iter,
                                            gboolean recurse)
{
	FilesListView * self;
	GtkTreePath* path = NULL;
	FilesListModel* _tmp0_;
	GtkTreeIter _tmp1_;
	GtkTreePath* _tmp2_;
	GtkTreeIter start = {0};
	GtkTreeIter _tmp3_;
	GtkTreePath* _tmp4_;
	gboolean _tmp5_ = FALSE;
	FilesListModel* _tmp15_;
	gboolean _tmp16_;
	gboolean result;
	self = (FilesListView*) base;
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = ((FilesAbstractDirectoryView*) self)->model;
	_tmp1_ = *iter;
	_tmp2_ = gtk_tree_model_get_path ((GtkTreeModel*) _tmp0_, &_tmp1_);
	path = _tmp2_;
	_tmp3_ = *iter;
	start = _tmp3_;
	_tmp4_ = path;
	if (_tmp4_ == NULL) {
		result = FALSE;
		__vala_GtkTreePath_free0 (path);
		return result;
	}
	if (recurse) {
		FilesTreeView* _tmp6_;
		GtkTreePath* _tmp7_;
		_tmp6_ = ((FilesAbstractTreeView*) self)->tree;
		_tmp7_ = path;
		_tmp5_ = gtk_tree_view_row_expanded ((GtkTreeView*) _tmp6_, _tmp7_);
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		GtkTreeIter* child_iter = NULL;
		FilesListModel* _tmp8_;
		GtkTreeIter _tmp9_;
		GtkTreeIter _tmp10_ = {0};
		gboolean _tmp11_;
		GtkTreeIter _tmp12_;
		GtkTreeIter* _tmp13_;
		child_iter = NULL;
		_tmp8_ = ((FilesAbstractDirectoryView*) self)->model;
		_tmp9_ = *iter;
		_tmp11_ = gtk_tree_model_iter_children ((GtkTreeModel*) _tmp8_, &_tmp10_, &_tmp9_);
		__vala_GtkTreeIter_free0 (child_iter);
		_tmp12_ = _tmp10_;
		_tmp13_ = __vala_GtkTreeIter_copy0 (&_tmp12_);
		child_iter = _tmp13_;
		if (_tmp11_) {
			GtkTreeIter* _tmp14_;
			_tmp14_ = child_iter;
			*iter = *_tmp14_;
			result = TRUE;
			__vala_GtkTreeIter_free0 (child_iter);
			__vala_GtkTreePath_free0 (path);
			return result;
		}
		__vala_GtkTreeIter_free0 (child_iter);
	}
	_tmp15_ = ((FilesAbstractDirectoryView*) self)->model;
	_tmp16_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp15_, iter);
	if (_tmp16_) {
		result = TRUE;
		__vala_GtkTreePath_free0 (path);
		return result;
	} else {
		GtkTreeIter* parent = NULL;
		FilesListModel* _tmp17_;
		GtkTreeIter _tmp18_;
		GtkTreeIter _tmp19_ = {0};
		gboolean _tmp20_;
		GtkTreeIter _tmp21_;
		GtkTreeIter* _tmp22_;
		parent = NULL;
		_tmp17_ = ((FilesAbstractDirectoryView*) self)->model;
		_tmp18_ = start;
		_tmp20_ = gtk_tree_model_iter_parent ((GtkTreeModel*) _tmp17_, &_tmp19_, &_tmp18_);
		__vala_GtkTreeIter_free0 (parent);
		_tmp21_ = _tmp19_;
		_tmp22_ = __vala_GtkTreeIter_copy0 (&_tmp21_);
		parent = _tmp22_;
		if (_tmp20_) {
			GtkTreeIter* _tmp23_;
			gboolean _tmp24_;
			_tmp23_ = parent;
			*iter = *_tmp23_;
			_tmp24_ = files_abstract_directory_view_get_next_visible_iter ((FilesAbstractDirectoryView*) self, iter, FALSE);
			result = _tmp24_;
			__vala_GtkTreeIter_free0 (parent);
			__vala_GtkTreePath_free0 (path);
			return result;
		}
		__vala_GtkTreeIter_free0 (parent);
	}
	result = FALSE;
	__vala_GtkTreePath_free0 (path);
	return result;
}

static void
__lambda113_ (FilesListView* self,
              FilesDirectory* dir)
{
	g_return_if_fail (dir != NULL);
	files_list_view_remove_subdirectory (self, dir);
}

static void
___lambda113__gfunc (gconstpointer data,
                     gpointer self)
{
	__lambda113_ ((FilesListView*) self, (FilesDirectory*) data);
}

static void
files_list_view_real_cancel (FilesAbstractDirectoryView* base)
{
	FilesListView * self;
	GList* _tmp0_;
	self = (FilesListView*) base;
	files_list_view_cancel_file_timeout (self);
	FILES_ABSTRACT_DIRECTORY_VIEW_CLASS (files_list_view_parent_class)->cancel ((FilesAbstractDirectoryView*) G_TYPE_CHECK_INSTANCE_CAST (self, FILES_TYPE_ABSTRACT_TREE_VIEW, FilesAbstractTreeView));
	_tmp0_ = self->priv->loaded_subdirectories;
	g_list_foreach (_tmp0_, ___lambda113__gfunc, self);
}

static void
files_list_view_class_init (FilesListViewClass * klass,
                            gpointer klass_data)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	files_list_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FilesListView_private_offset);
	((FilesAbstractTreeViewClass *) klass)->set_up_icon_renderer = (void (*) (FilesAbstractTreeView*)) files_list_view_real_set_up_icon_renderer;
	((FilesAbstractDirectoryViewClass *) klass)->on_view_key_press_event = (gboolean (*) (FilesAbstractDirectoryView*, guint, guint, GdkModifierType)) files_list_view_real_on_view_key_press_event;
	((FilesAbstractDirectoryViewClass *) klass)->create_view = (GtkWidget* (*) (FilesAbstractDirectoryView*)) files_list_view_real_create_view;
	((FilesAbstractDirectoryViewClass *) klass)->get_view_settings = (GSettings* (*) (FilesAbstractDirectoryView*)) files_list_view_real_get_view_settings;
	((FilesAbstractDirectoryViewClass *) klass)->expand_collapse = (gboolean (*) (FilesAbstractDirectoryView*, GtkTreePath*)) files_list_view_real_expand_collapse;
	((FilesAbstractDirectoryViewClass *) klass)->get_next_visible_iter = (gboolean (*) (FilesAbstractDirectoryView*, GtkTreeIter*, gboolean)) files_list_view_real_get_next_visible_iter;
	((FilesAbstractDirectoryViewClass *) klass)->cancel = (void (*) (FilesAbstractDirectoryView*)) files_list_view_real_cancel;
	G_OBJECT_CLASS (klass)->finalize = files_list_view_finalize;
	_tmp0_ = g_strdup (_ ("Filename"));
	_tmp1_ = g_strdup (_ ("Size"));
	_tmp2_ = g_strdup (_ ("Type"));
	_tmp3_ = g_strdup (_ ("Modified"));
	_tmp4_ = g_new0 (gchar*, 4 + 1);
	_tmp4_[0] = _tmp0_;
	_tmp4_[1] = _tmp1_;
	_tmp4_[2] = _tmp2_;
	_tmp4_[3] = _tmp3_;
	files_list_view_column_titles = _tmp4_;
	files_list_view_column_titles_length1 = 4;
	_files_list_view_column_titles_size_ = files_list_view_column_titles_length1;
}

static void
files_list_view_instance_init (FilesListView * self,
                               gpointer klass)
{
	self->priv = files_list_view_get_instance_private (self);
	self->priv->unload_file_timeout_id = (guint) 0;
	self->priv->subdirectories_to_unload = NULL;
	self->priv->loaded_subdirectories = NULL;
}

static void
files_list_view_finalize (GObject * obj)
{
	FilesListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FILES_TYPE_LIST_VIEW, FilesListView);
	(self->priv->subdirectories_to_unload == NULL) ? NULL : (self->priv->subdirectories_to_unload = (_g_list_free___vala_GtkTreeRowReference_free0_ (self->priv->subdirectories_to_unload), NULL));
	(self->priv->loaded_subdirectories == NULL) ? NULL : (self->priv->loaded_subdirectories = (_g_list_free__g_object_unref0_ (self->priv->loaded_subdirectories), NULL));
	G_OBJECT_CLASS (files_list_view_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
files_list_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FilesListViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) files_list_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FilesListView), 0, (GInstanceInitFunc) files_list_view_instance_init, NULL };
	GType files_list_view_type_id;
	files_list_view_type_id = g_type_register_static (FILES_TYPE_ABSTRACT_TREE_VIEW, "FilesListView", &g_define_type_info, 0);
	FilesListView_private_offset = g_type_add_instance_private (files_list_view_type_id, sizeof (FilesListViewPrivate));
	return files_list_view_type_id;
}

GType
files_list_view_get_type (void)
{
	static volatile gsize files_list_view_type_id__once = 0;
	if (g_once_init_enter (&files_list_view_type_id__once)) {
		GType files_list_view_type_id;
		files_list_view_type_id = files_list_view_get_type_once ();
		g_once_init_leave (&files_list_view_type_id__once, files_list_view_type_id);
	}
	return files_list_view_type_id__once;
}

