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

/*
* Copyright 2015-2020 elementary, Inc. (https://elementary.io)
*
* 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, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Jeremy Wootten <jeremywootten@gmail.com>
*/
/* Implementations of AbstractDirectoryView are
     * IconView
     * ListView
     * ColumnView
*/
/*** Private methods */
/** Signal Handlers */
/** Menu actions */
/** HELPER AND CONVENIENCE FUNCTIONS */

#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 <granite.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <handy.h>
#include "marlin-file-operations.h"
#include <libportal/portal.h>
#include <libportal-gtk3/portal-gtk3.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "config.h"

#define FILES_ABSTRACT_DIRECTORY_VIEW_MAX_TEMPLATES 2048
#define FILES_ABSTRACT_DIRECTORY_VIEW_FILE_DRAG_ACTIONS ((GDK_ACTION_COPY | GDK_ACTION_MOVE) | GDK_ACTION_LINK)
#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;
enum  {
	FILES_ABSTRACT_DIRECTORY_VIEW_0_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_ZOOM_LEVEL_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_ICON_SIZE_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_SINGLECLICK_SELECT_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_RENAMING_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_IS_FROZEN_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_IN_RECENT_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_TREE_FROZEN_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_WINDOW_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_NUM_PROPERTIES
};
static GParamSpec* files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_NUM_PROPERTIES];
typedef enum  {
	FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_EXPANDER,
	FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_HELPER,
	FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_ICON,
	FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_NAME,
	FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_PATH,
	FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_NO_PATH,
	FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_INVALID
} FilesAbstractDirectoryViewClickZone;

#define FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_CLICK_ZONE (files_abstract_directory_view_click_zone_get_type ())
typedef void (*GSimpleActionActivateCallback) (GSimpleAction* action, GVariant* parameter, gpointer user_data);
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define __vala_GtkTreePath_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreePath_free (var), NULL)))

#define FILES_TYPE_APPLICATION (files_application_get_type ())
#define FILES_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_TYPE_APPLICATION, FilesApplication))
#define FILES_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_TYPE_APPLICATION, FilesApplicationClass))
#define FILES_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_TYPE_APPLICATION))
#define FILES_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_TYPE_APPLICATION))
#define FILES_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_TYPE_APPLICATION, FilesApplicationClass))

typedef struct _FilesApplication FilesApplication;
typedef struct _FilesApplicationClass FilesApplicationClass;
typedef struct _Block16Data Block16Data;
typedef struct _Block17Data Block17Data;
#define __vala_GtkTreeIter_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreeIter_free (var), NULL)))
typedef struct _Block18Data Block18Data;
typedef struct _Block19Data Block19Data;
typedef struct _Block20Data Block20Data;
typedef struct _Block21Data Block21Data;

#define FILES_VIEW_TYPE_WINDOW (files_view_window_get_type ())
#define FILES_VIEW_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_VIEW_TYPE_WINDOW, FilesViewWindow))
#define FILES_VIEW_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_VIEW_TYPE_WINDOW, FilesViewWindowClass))
#define FILES_VIEW_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_VIEW_TYPE_WINDOW))
#define FILES_VIEW_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_VIEW_TYPE_WINDOW))
#define FILES_VIEW_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_VIEW_TYPE_WINDOW, FilesViewWindowClass))

typedef struct _FilesViewWindow FilesViewWindow;
typedef struct _FilesViewWindowClass FilesViewWindowClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block22Data Block22Data;
typedef struct _Block23Data Block23Data;
typedef struct _Block24Data Block24Data;
typedef struct _Block25Data Block25Data;

#define FILES_TYPE_RENAMER_DIALOG (files_renamer_dialog_get_type ())
#define FILES_RENAMER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_TYPE_RENAMER_DIALOG, FilesRenamerDialog))
#define FILES_RENAMER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_TYPE_RENAMER_DIALOG, FilesRenamerDialogClass))
#define FILES_IS_RENAMER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_TYPE_RENAMER_DIALOG))
#define FILES_IS_RENAMER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_TYPE_RENAMER_DIALOG))
#define FILES_RENAMER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_TYPE_RENAMER_DIALOG, FilesRenamerDialogClass))

typedef struct _FilesRenamerDialog FilesRenamerDialog;
typedef struct _FilesRenamerDialogClass FilesRenamerDialogClass;
#define _files_bookmark_unref0(var) ((var == NULL) ? NULL : (var = (files_bookmark_unref (var), NULL)))
#define __vala_XdpParent_free0(var) ((var == NULL) ? NULL : (var = (_vala_XdpParent_free (var), NULL)))

#define FILES_VIEW_TYPE_ABSTRACT_PROPERTIES_DIALOG (files_view_abstract_properties_dialog_get_type ())
#define FILES_VIEW_ABSTRACT_PROPERTIES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_VIEW_TYPE_ABSTRACT_PROPERTIES_DIALOG, FilesViewAbstractPropertiesDialog))
#define FILES_VIEW_ABSTRACT_PROPERTIES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_VIEW_TYPE_ABSTRACT_PROPERTIES_DIALOG, FilesViewAbstractPropertiesDialogClass))
#define FILES_VIEW_IS_ABSTRACT_PROPERTIES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_VIEW_TYPE_ABSTRACT_PROPERTIES_DIALOG))
#define FILES_VIEW_IS_ABSTRACT_PROPERTIES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_VIEW_TYPE_ABSTRACT_PROPERTIES_DIALOG))
#define FILES_VIEW_ABSTRACT_PROPERTIES_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_VIEW_TYPE_ABSTRACT_PROPERTIES_DIALOG, FilesViewAbstractPropertiesDialogClass))

typedef struct _FilesViewAbstractPropertiesDialog FilesViewAbstractPropertiesDialog;
typedef struct _FilesViewAbstractPropertiesDialogClass FilesViewAbstractPropertiesDialogClass;

#define FILES_VIEW_TYPE_PROPERTIES_WINDOW (files_view_properties_window_get_type ())
#define FILES_VIEW_PROPERTIES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_VIEW_TYPE_PROPERTIES_WINDOW, FilesViewPropertiesWindow))
#define FILES_VIEW_PROPERTIES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_VIEW_TYPE_PROPERTIES_WINDOW, FilesViewPropertiesWindowClass))
#define FILES_VIEW_IS_PROPERTIES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_VIEW_TYPE_PROPERTIES_WINDOW))
#define FILES_VIEW_IS_PROPERTIES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_VIEW_TYPE_PROPERTIES_WINDOW))
#define FILES_VIEW_PROPERTIES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_VIEW_TYPE_PROPERTIES_WINDOW, FilesViewPropertiesWindowClass))

typedef struct _FilesViewPropertiesWindow FilesViewPropertiesWindow;
typedef struct _FilesViewPropertiesWindowClass FilesViewPropertiesWindowClass;
typedef struct _Block26Data Block26Data;
typedef struct _Block27Data Block27Data;
typedef struct _Block28Data Block28Data;
typedef struct _Block29Data Block29Data;
#define __vala_GdkEvent_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkEvent_free (var), NULL)))
#define _gtk_target_list_unref0(var) ((var == NULL) ? NULL : (var = (gtk_target_list_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

#define FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_SORT_SUB_MENU_ITEM (files_abstract_directory_view_sort_sub_menu_item_get_type ())
#define FILES_ABSTRACT_DIRECTORY_VIEW_SORT_SUB_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_SORT_SUB_MENU_ITEM, FilesAbstractDirectoryViewSortSubMenuItem))
#define FILES_ABSTRACT_DIRECTORY_VIEW_SORT_SUB_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_SORT_SUB_MENU_ITEM, FilesAbstractDirectoryViewSortSubMenuItemClass))
#define FILES_ABSTRACT_DIRECTORY_VIEW_IS_SORT_SUB_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_SORT_SUB_MENU_ITEM))
#define FILES_ABSTRACT_DIRECTORY_VIEW_IS_SORT_SUB_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_SORT_SUB_MENU_ITEM))
#define FILES_ABSTRACT_DIRECTORY_VIEW_SORT_SUB_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_SORT_SUB_MENU_ITEM, FilesAbstractDirectoryViewSortSubMenuItemClass))

typedef struct _FilesAbstractDirectoryViewSortSubMenuItem FilesAbstractDirectoryViewSortSubMenuItem;
typedef struct _FilesAbstractDirectoryViewSortSubMenuItemClass FilesAbstractDirectoryViewSortSubMenuItemClass;

#define FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_NEW_SUB_MENU_ITEM (files_abstract_directory_view_new_sub_menu_item_get_type ())
#define FILES_ABSTRACT_DIRECTORY_VIEW_NEW_SUB_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_NEW_SUB_MENU_ITEM, FilesAbstractDirectoryViewNewSubMenuItem))
#define FILES_ABSTRACT_DIRECTORY_VIEW_NEW_SUB_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_NEW_SUB_MENU_ITEM, FilesAbstractDirectoryViewNewSubMenuItemClass))
#define FILES_ABSTRACT_DIRECTORY_VIEW_IS_NEW_SUB_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_NEW_SUB_MENU_ITEM))
#define FILES_ABSTRACT_DIRECTORY_VIEW_IS_NEW_SUB_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_NEW_SUB_MENU_ITEM))
#define FILES_ABSTRACT_DIRECTORY_VIEW_NEW_SUB_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_NEW_SUB_MENU_ITEM, FilesAbstractDirectoryViewNewSubMenuItemClass))

typedef struct _FilesAbstractDirectoryViewNewSubMenuItem FilesAbstractDirectoryViewNewSubMenuItem;
typedef struct _FilesAbstractDirectoryViewNewSubMenuItemClass FilesAbstractDirectoryViewNewSubMenuItemClass;
typedef struct _Block30Data Block30Data;
typedef struct _Block31Data Block31Data;

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

#define FILES_TYPE_COLUMN_VIEW (files_column_view_get_type ())
#define FILES_COLUMN_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_TYPE_COLUMN_VIEW, FilesColumnView))
#define FILES_COLUMN_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_TYPE_COLUMN_VIEW, FilesColumnViewClass))
#define FILES_IS_COLUMN_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_TYPE_COLUMN_VIEW))
#define FILES_IS_COLUMN_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_TYPE_COLUMN_VIEW))
#define FILES_COLUMN_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_TYPE_COLUMN_VIEW, FilesColumnViewClass))

typedef struct _FilesColumnView FilesColumnView;
typedef struct _FilesColumnViewClass FilesColumnViewClass;

#define FILES_VIEW_TYPE_VIEW_CONTAINER (files_view_view_container_get_type ())
#define FILES_VIEW_VIEW_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_VIEW_TYPE_VIEW_CONTAINER, FilesViewViewContainer))
#define FILES_VIEW_VIEW_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_VIEW_TYPE_VIEW_CONTAINER, FilesViewViewContainerClass))
#define FILES_VIEW_IS_VIEW_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_VIEW_TYPE_VIEW_CONTAINER))
#define FILES_VIEW_IS_VIEW_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_VIEW_TYPE_VIEW_CONTAINER))
#define FILES_VIEW_VIEW_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_VIEW_TYPE_VIEW_CONTAINER, FilesViewViewContainerClass))

typedef struct _FilesViewViewContainer FilesViewViewContainer;
typedef struct _FilesViewViewContainerClass FilesViewViewContainerClass;
typedef struct _FilesViewViewContainerPrivate FilesViewViewContainerPrivate;

#define FILES_VIEW_TYPE_MILLER (files_view_miller_get_type ())
#define FILES_VIEW_MILLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_VIEW_TYPE_MILLER, FilesViewMiller))
#define FILES_VIEW_MILLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_VIEW_TYPE_MILLER, FilesViewMillerClass))
#define FILES_VIEW_IS_MILLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_VIEW_TYPE_MILLER))
#define FILES_VIEW_IS_MILLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_VIEW_TYPE_MILLER))
#define FILES_VIEW_MILLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_VIEW_TYPE_MILLER, FilesViewMillerClass))

typedef struct _FilesViewMiller FilesViewMiller;
typedef struct _FilesViewMillerClass FilesViewMillerClass;
typedef struct _FilesAbstractDirectoryViewSetFileDisplayNameData FilesAbstractDirectoryViewSetFileDisplayNameData;
typedef struct _Block32Data Block32Data;
typedef struct _Block33Data Block33Data;
typedef struct _Block34Data Block34Data;
typedef struct _Block35Data Block35Data;
#define __vala_GtkTreeRowReference_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreeRowReference_free (var), NULL)))
#define __vala_GdkEventKey_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkEventKey_free (var), NULL)))
typedef struct _FilesAbstractDirectoryViewSortSubMenuItemPrivate FilesAbstractDirectoryViewSortSubMenuItemPrivate;
enum  {
	FILES_ABSTRACT_DIRECTORY_VIEW_SORT_SUB_MENU_ITEM_0_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_SORT_SUB_MENU_ITEM_NUM_PROPERTIES
};
static GParamSpec* files_abstract_directory_view_sort_sub_menu_item_properties[FILES_ABSTRACT_DIRECTORY_VIEW_SORT_SUB_MENU_ITEM_NUM_PROPERTIES];
typedef struct _FilesAbstractDirectoryViewNewSubMenuItemPrivate FilesAbstractDirectoryViewNewSubMenuItemPrivate;
enum  {
	FILES_ABSTRACT_DIRECTORY_VIEW_NEW_SUB_MENU_ITEM_0_PROPERTY,
	FILES_ABSTRACT_DIRECTORY_VIEW_NEW_SUB_MENU_ITEM_NUM_PROPERTIES
};
static GParamSpec* files_abstract_directory_view_new_sub_menu_item_properties[FILES_ABSTRACT_DIRECTORY_VIEW_NEW_SUB_MENU_ITEM_NUM_PROPERTIES];
enum  {
	FILES_ABSTRACT_DIRECTORY_VIEW_PATH_CHANGE_REQUEST_SIGNAL,
	FILES_ABSTRACT_DIRECTORY_VIEW_SELECTION_CHANGED_SIGNAL,
	FILES_ABSTRACT_DIRECTORY_VIEW_NUM_SIGNALS
};
static guint files_abstract_directory_view_signals[FILES_ABSTRACT_DIRECTORY_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 _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 _FilesAbstractDirectoryViewPrivate {
	GSimpleActionGroup* common_actions;
	GSimpleActionGroup* selection_actions;
	GSimpleActionGroup* background_actions;
	FilesZoomLevel _zoom_level;
	gdouble drag_x;
	gdouble drag_y;
	guint drag_scroll_timer_id;
	guint drag_enter_timer_id;
	gboolean destination_data_ready;
	gboolean drop_occurred;
	FilesFile* drop_target_file;
	GList* destination_drop_file_list;
	GdkDragAction current_suggested_action;
	GdkDragAction current_actions;
	gboolean _drop_highlight;
	gboolean button_press_disabled;
	void* drag_data;
	gint thumbnail_request;
	guint thumbnail_source_id;
	guint freeze_source_id;
	FilesThumbnailer* thumbnailer;
	guint add_remove_file_timeout_id;
	gboolean signal_free_space_change;
	gdouble total_delta_y;
	GtkTreePath* deleted_path;
	gboolean _singleclick_select;
	GdkCursor* editable_cursor;
	GdkCursor* activatable_cursor;
	GdkCursor* selectable_cursor;
	GList* open_with_apps;
	gboolean selected_files_invalid;
	GAppInfo* default_app;
	GtkTreePath* hover_path;
	gboolean _renaming;
	gboolean _is_frozen;
	gboolean _in_recent;
	gboolean _tree_frozen;
	gboolean in_trash;
	gboolean in_network_root;
	gboolean all_selected;
	GtkWidget* view;
	GtkLabel* empty_label;
	GtkOverlay* overlay;
	FilesClipboardManager* clipboard;
	guint set_cursor_timeout_id;
	gulong select_source_handler;
	guint draw_timeout_id;
};

struct _Block16Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	gboolean select;
};

struct _Block17Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	GeeLinkedList* files_to_select_list;
	GFile* focus_after_select;
};

struct _Block18Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	GdkScreen* screen;
	FilesOpenFlag flag;
};

struct _Block19Data {
	int _ref_count_;
	Block18Data * _data18_;
	FilesFile* file;
};

struct _Block20Data {
	int _ref_count_;
	Block18Data * _data18_;
	GList* files_to_open;
};

struct _Block21Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	gboolean only_folders;
};

struct _Block22Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	GList* locations;
};

struct _Block23Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	FilesFile* file;
};

struct _Block24Data {
	int _ref_count_;
	Block23Data * _data23_;
	gulong model_resorted;
};

struct _Block25Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	FilesFile* file_to_rename;
};

struct _Block26Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	GFile* target;
};

struct _Block27Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	GFile* target;
};

struct _Block28Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	FilesFile* file;
};

struct _Block29Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	FilesFile* file;
};

struct _Block30Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	GdkDevice* pointer;
};

struct _Block31Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	GList* action_files;
};

struct _FilesViewViewContainer {
	GtkBox parent_instance;
	FilesViewViewContainerPrivate * priv;
	GtkWidget* content_item;
	FilesAbstractSlot* view;
	FilesViewMode view_mode;
};

struct _FilesViewViewContainerClass {
	GtkBoxClass parent_class;
};

struct _FilesAbstractDirectoryViewSetFileDisplayNameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FilesAbstractDirectoryView* self;
	GFile* old_location;
	gchar* new_name;
	GCancellable* cancellable;
	GFile* result;
	FilesViewSlot* _tmp0_;
	FilesDirectory* _tmp1_;
	FilesDirectory* _tmp2_;
	GFile* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	GError* e;
	GError* _tmp6_;
	GError* _tmp7_;
	GError* _inner_error0_;
};

struct _Block32Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	FilesFile* new_file;
};

struct _Block33Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	guint button;
};

struct _Block34Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	GtkTreePath* path;
	guint count;
	gboolean ok_next_time;
	GtkTreePath* start_path;
};

struct _Block35Data {
	int _ref_count_;
	FilesAbstractDirectoryView* self;
	FilesDirectory* dir;
};

struct _FilesAbstractDirectoryViewSortSubMenuItem {
	GtkMenuItem parent_instance;
	FilesAbstractDirectoryViewSortSubMenuItemPrivate * priv;
};

struct _FilesAbstractDirectoryViewSortSubMenuItemClass {
	GtkMenuItemClass parent_class;
};

struct _FilesAbstractDirectoryViewNewSubMenuItem {
	GtkMenuItem parent_instance;
	FilesAbstractDirectoryViewNewSubMenuItemPrivate * priv;
};

struct _FilesAbstractDirectoryViewNewSubMenuItemClass {
	GtkMenuItemClass parent_class;
};

struct _FilesAbstractDirectoryViewNewSubMenuItemPrivate {
	guint total_item_count;
};

static gint FilesAbstractDirectoryView_private_offset;
static gpointer files_abstract_directory_view_parent_class = NULL;
VALA_EXTERN FilesDndHandler* files_abstract_directory_view_dnd_handler;
FilesDndHandler* files_abstract_directory_view_dnd_handler = NULL;
static GSettings* files_abstract_directory_view_app_settings;
static GSettings* files_abstract_directory_view_app_settings = NULL;
static gpointer files_abstract_directory_view_sort_sub_menu_item_parent_class = NULL;
static gint FilesAbstractDirectoryViewNewSubMenuItem_private_offset;
static gpointer files_abstract_directory_view_new_sub_menu_item_parent_class = NULL;

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 void files_abstract_directory_view_on_row_deleted (FilesAbstractDirectoryView* self,
                                                   GtkTreePath* path);
VALA_EXTERN gboolean files_abstract_directory_view_on_view_key_press_event (FilesAbstractDirectoryView* self,
                                                                guint original_keyval,
                                                                guint keycode,
                                                                GdkModifierType state);
VALA_EXTERN void files_abstract_directory_view_on_scroll_event (FilesAbstractDirectoryView* self,
                                                    gdouble dx,
                                                    gdouble dy);
VALA_EXTERN gboolean files_abstract_directory_view_handle_primary_button_click (FilesAbstractDirectoryView* self,
                                                                    guint n_press,
                                                                    GdkModifierType mods,
                                                                    GtkTreePath* path);
VALA_EXTERN void files_abstract_directory_view_on_view_button_press_event (FilesAbstractDirectoryView* self,
                                                               gint n_press,
                                                               gdouble x,
                                                               gdouble y);
VALA_EXTERN void files_abstract_directory_view_on_view_button_release_event (FilesAbstractDirectoryView* self,
                                                                 gint n_press,
                                                                 gdouble x,
                                                                 gdouble y);
VALA_EXTERN void files_abstract_directory_view_change_zoom_level (FilesAbstractDirectoryView* self);
VALA_EXTERN gboolean files_abstract_directory_view_expand_collapse (FilesAbstractDirectoryView* self,
                                                        GtkTreePath* path);
VALA_EXTERN gboolean files_abstract_directory_view_handle_default_button_click (FilesAbstractDirectoryView* self);
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);
VALA_EXTERN void files_abstract_directory_view_highlight_path (FilesAbstractDirectoryView* self,
                                                   GtkTreePath* path);
VALA_EXTERN GtkTreePath* files_abstract_directory_view_up (FilesAbstractDirectoryView* self,
                                               GtkTreePath* path);
VALA_EXTERN GtkTreePath* files_abstract_directory_view_down (FilesAbstractDirectoryView* self,
                                                 GtkTreePath* path);
VALA_EXTERN GSettings* files_abstract_directory_view_get_view_settings (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_set_up_zoom_level (FilesAbstractDirectoryView* self);
VALA_EXTERN gboolean files_abstract_directory_view_view_has_focus (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_scroll_to_cell (FilesAbstractDirectoryView* self,
                                                   GtkTreePath* path,
                                                   gboolean scroll_to_top);
VALA_EXTERN GList* files_abstract_directory_view_get_selected_paths (FilesAbstractDirectoryView* self);
VALA_EXTERN GtkTreePath* files_abstract_directory_view_get_path_at_pos (FilesAbstractDirectoryView* self,
                                                            gint x,
                                                            gint win);
VALA_EXTERN GtkTreePath* files_abstract_directory_view_get_path_at_cursor (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_tree_select_all (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_tree_unselect_all (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_tree_unselect_others (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_select_path (FilesAbstractDirectoryView* self,
                                                GtkTreePath* path,
                                                gboolean cursor_follows);
VALA_EXTERN void files_abstract_directory_view_unselect_path (FilesAbstractDirectoryView* self,
                                                  GtkTreePath* path);
VALA_EXTERN gboolean files_abstract_directory_view_path_is_selected (FilesAbstractDirectoryView* self,
                                                         GtkTreePath* path);
VALA_EXTERN gboolean files_abstract_directory_view_get_visible_range (FilesAbstractDirectoryView* self,
                                                          GtkTreePath** start_path,
                                                          GtkTreePath** end_path);
VALA_EXTERN void files_abstract_directory_view_set_cursor (FilesAbstractDirectoryView* self,
                                               GtkTreePath* path,
                                               gboolean start_editing,
                                               gboolean select,
                                               gboolean scroll_to_top);
VALA_EXTERN gboolean files_abstract_directory_view_move_cursor (FilesAbstractDirectoryView* self,
                                                    guint keyval,
                                                    gboolean only_shift_pressed,
                                                    gboolean control_pressed);
VALA_EXTERN gboolean files_abstract_directory_view_will_handle_button_press (FilesAbstractDirectoryView* self,
                                                                 gboolean no_mods,
                                                                 gboolean only_control_pressed,
                                                                 gboolean only_shift_pressed);
VALA_EXTERN gboolean files_abstract_directory_view_handle_multi_select (FilesAbstractDirectoryView* self,
                                                            GtkTreePath* path);
VALA_EXTERN GtkWidget* files_abstract_directory_view_create_view (FilesAbstractDirectoryView* self);
VALA_EXTERN guint files_abstract_directory_view_get_event_position_info (FilesAbstractDirectoryView* self,
                                                             gdouble x,
                                                             gdouble y,
                                                             GtkTreePath** path,
                                                             gboolean rubberband);
VALA_EXTERN void files_abstract_directory_view_scroll_to_path (FilesAbstractDirectoryView* self,
                                                   GtkTreePath* path,
                                                   gboolean scroll_to_top);
VALA_EXTERN void files_abstract_directory_view_set_cursor_on_cell (FilesAbstractDirectoryView* self,
                                                       GtkTreePath* path,
                                                       GtkCellRenderer* renderer,
                                                       gboolean start_editing,
                                                       gboolean scroll_to_top);
VALA_EXTERN void files_abstract_directory_view_freeze_tree (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_thaw_tree (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_freeze_child_notify (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_thaw_child_notify (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_connect_tree_signals (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_disconnect_tree_signals (FilesAbstractDirectoryView* self);
VALA_EXTERN GType files_abstract_directory_view_click_zone_get_type (void) G_GNUC_CONST ;
static void files_abstract_directory_view_on_selection_action_open_executable (FilesAbstractDirectoryView* self,
                                                                        GSimpleAction* action,
                                                                        GVariant* param);
static void _files_abstract_directory_view_on_selection_action_open_executable_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                          GVariant* parameter,
                                                                                                          gpointer self);
static void files_abstract_directory_view_on_selection_action_open_with_app (FilesAbstractDirectoryView* self,
                                                                      GSimpleAction* action,
                                                                      GVariant* param);
static void _files_abstract_directory_view_on_selection_action_open_with_app_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                        GVariant* parameter,
                                                                                                        gpointer self);
static void files_abstract_directory_view_on_selection_action_open_with_default (FilesAbstractDirectoryView* self,
                                                                          GSimpleAction* action,
                                                                          GVariant* param);
static void _files_abstract_directory_view_on_selection_action_open_with_default_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                            GVariant* parameter,
                                                                                                            gpointer self);
static void files_abstract_directory_view_on_selection_action_open_with_other_app (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_selection_action_open_with_other_app_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                              GVariant* parameter,
                                                                                                              gpointer self);
static void files_abstract_directory_view_on_selection_action_rename (FilesAbstractDirectoryView* self,
                                                               GSimpleAction* action,
                                                               GVariant* param);
static void _files_abstract_directory_view_on_selection_action_rename_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                 GVariant* parameter,
                                                                                                 gpointer self);
static void files_abstract_directory_view_on_selection_action_view_in_location (FilesAbstractDirectoryView* self,
                                                                         GSimpleAction* action,
                                                                         GVariant* param);
static void _files_abstract_directory_view_on_selection_action_view_in_location_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                           GVariant* parameter,
                                                                                                           gpointer self);
static void files_abstract_directory_view_on_selection_action_forget (FilesAbstractDirectoryView* self,
                                                               GSimpleAction* action,
                                                               GVariant* param);
static void _files_abstract_directory_view_on_selection_action_forget_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                 GVariant* parameter,
                                                                                                 gpointer self);
static void files_abstract_directory_view_on_selection_action_cut (FilesAbstractDirectoryView* self,
                                                            GSimpleAction* action,
                                                            GVariant* param);
static void _files_abstract_directory_view_on_selection_action_cut_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                              GVariant* parameter,
                                                                                              gpointer self);
static void files_abstract_directory_view_on_selection_action_trash (FilesAbstractDirectoryView* self,
                                                              GSimpleAction* action,
                                                              GVariant* param);
static void _files_abstract_directory_view_on_selection_action_trash_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                GVariant* parameter,
                                                                                                gpointer self);
static void files_abstract_directory_view_on_selection_action_delete (FilesAbstractDirectoryView* self,
                                                               GSimpleAction* action,
                                                               GVariant* param);
static void _files_abstract_directory_view_on_selection_action_delete_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                 GVariant* parameter,
                                                                                                 gpointer self);
static void files_abstract_directory_view_on_selection_action_restore (FilesAbstractDirectoryView* self,
                                                                GSimpleAction* action,
                                                                GVariant* param);
static void _files_abstract_directory_view_on_selection_action_restore_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                  GVariant* parameter,
                                                                                                  gpointer self);
VALA_EXTERN void files_abstract_directory_view_invert_selection (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_invert_selection_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                       GVariant* parameter,
                                                                                       gpointer self);
static void files_abstract_directory_view_on_background_action_new (FilesAbstractDirectoryView* self,
                                                             GSimpleAction* action,
                                                             GVariant* param);
static void _files_abstract_directory_view_on_background_action_new_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                               GVariant* parameter,
                                                                                               gpointer self);
static void files_abstract_directory_view_on_background_action_create_from (FilesAbstractDirectoryView* self,
                                                                     GSimpleAction* action,
                                                                     GVariant* param);
static void _files_abstract_directory_view_on_background_action_create_from_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                       GVariant* parameter,
                                                                                                       gpointer self);
static void files_abstract_directory_view_on_background_action_sort_by_changed (FilesAbstractDirectoryView* self,
                                                                         GSimpleAction* action,
                                                                         GVariant* val);
static void _files_abstract_directory_view_on_background_action_sort_by_changed_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                           GVariant* parameter,
                                                                                                           gpointer self);
static void files_abstract_directory_view_on_background_action_reverse_changed (FilesAbstractDirectoryView* self,
                                                                         GSimpleAction* action,
                                                                         GVariant* val);
static void _files_abstract_directory_view_on_background_action_reverse_changed_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                           GVariant* parameter,
                                                                                                           gpointer self);
static void files_abstract_directory_view_on_common_action_copy (FilesAbstractDirectoryView* self,
                                                          GSimpleAction* action,
                                                          GVariant* param);
static void _files_abstract_directory_view_on_common_action_copy_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                            GVariant* parameter,
                                                                                            gpointer self);
static void files_abstract_directory_view_on_common_action_paste_into (FilesAbstractDirectoryView* self,
                                                                GSimpleAction* action,
                                                                GVariant* param);
static void _files_abstract_directory_view_on_common_action_paste_into_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                  GVariant* parameter,
                                                                                                  gpointer self);
static void files_abstract_directory_view_on_common_action_paste (FilesAbstractDirectoryView* self,
                                                           GSimpleAction* action,
                                                           GVariant* param);
static void _files_abstract_directory_view_on_common_action_paste_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                             GVariant* parameter,
                                                                                             gpointer self);
static void files_abstract_directory_view_on_common_action_open_in (FilesAbstractDirectoryView* self,
                                                             GSimpleAction* action,
                                                             GVariant* param);
static void _files_abstract_directory_view_on_common_action_open_in_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                               GVariant* parameter,
                                                                                               gpointer self);
static void files_abstract_directory_view_on_common_action_bookmark (FilesAbstractDirectoryView* self,
                                                              GSimpleAction* action,
                                                              GVariant* param);
static void _files_abstract_directory_view_on_common_action_bookmark_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                GVariant* parameter,
                                                                                                gpointer self);
static void files_abstract_directory_view_on_common_action_properties (FilesAbstractDirectoryView* self,
                                                                GSimpleAction* action,
                                                                GVariant* param);
static void _files_abstract_directory_view_on_common_action_properties_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                  GVariant* parameter,
                                                                                                  gpointer self);
static void files_abstract_directory_view_on_common_action_copy_link (FilesAbstractDirectoryView* self,
                                                               GSimpleAction* action,
                                                               GVariant* param);
static void _files_abstract_directory_view_on_common_action_copy_link_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                 GVariant* parameter,
                                                                                                 gpointer self);
static void files_abstract_directory_view_toggle_select_all (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_toggle_select_all_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                        GVariant* parameter,
                                                                                        gpointer self);
static void files_abstract_directory_view_action_set_wallpaper (FilesAbstractDirectoryView* self,
                                                         GSimpleAction* action,
                                                         GVariant* param);
static void _files_abstract_directory_view_action_set_wallpaper_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                           GVariant* parameter,
                                                                                           gpointer self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void _vala_GtkTreePath_free (GtkTreePath* self);
VALA_EXTERN FilesAbstractDirectoryView* files_abstract_directory_view_construct (GType object_type,
                                                                     FilesViewSlot* _slot);
VALA_EXTERN gchar* files_view_slot_get_empty_message (FilesViewSlot* self);
VALA_EXTERN GType files_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesApplication, g_object_unref)
VALA_EXTERN FilesClipboardManager* files_application_get_clipboard_manager (FilesApplication* self);
VALA_EXTERN GtkRecentManager* files_application_get_recent_manager (FilesApplication* self);
static void __lambda119_ (FilesAbstractDirectoryView* self,
                   guint req);
static void files_abstract_directory_view_draw_when_idle (FilesAbstractDirectoryView* self);
static void ___lambda119__files_thumbnailer_finished (FilesThumbnailer* _sender,
                                               guint request,
                                               gpointer self);
static void files_abstract_directory_view_set_up__menu_actions (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_set_up_directory_view (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_connect_drag_drop_signals (FilesAbstractDirectoryView* self,
                                                              GtkWidget* widget);
static void ___lambda128_ (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_schedule_thumbnail_color_tag_timeout (FilesAbstractDirectoryView* self);
static void ____lambda128__gtk_widget_realize (GtkWidget* _sender,
                                        gpointer self);
static void _files_abstract_directory_view_on_scroll_event_gtk_event_controller_scroll_scroll (GtkEventControllerScroll* _sender,
                                                                                        gdouble dx,
                                                                                        gdouble dy,
                                                                                        gpointer self);
VALA_EXTERN void files_abstract_directory_view_enable_scroll (FilesAbstractDirectoryView* self,
                                                  gboolean enable);
static gboolean _files_abstract_directory_view_on_view_key_press_event_gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                                      guint keyval,
                                                                                                      guint keycode,
                                                                                                      GdkModifierType state,
                                                                                                      gpointer self);
static gboolean ___lambda129_ (FilesAbstractDirectoryView* self);
VALA_EXTERN gboolean files_abstract_directory_view_get_is_frozen (FilesAbstractDirectoryView* self);
VALA_EXTERN gboolean files_abstract_directory_view_get_renaming (FilesAbstractDirectoryView* self);
static gboolean ____lambda129__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                              guint keyval,
                                                              guint keycode,
                                                              GdkModifierType state,
                                                              gpointer self);
static void ___lambda130_ (FilesAbstractDirectoryView* self);
static void ____lambda130__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                           guint keyval,
                                                           guint keycode,
                                                           GdkModifierType state,
                                                           gpointer self);
static gboolean ___lambda131_ (FilesAbstractDirectoryView* self);
static gboolean ____lambda131__gtk_widget_button_press_event (GtkWidget* _sender,
                                                       GdkEventButton* event,
                                                       gpointer self);
static void _files_abstract_directory_view_on_view_button_press_event_gtk_gesture_multi_press_pressed (GtkGestureMultiPress* _sender,
                                                                                                gint n_press,
                                                                                                gdouble x,
                                                                                                gdouble y,
                                                                                                gpointer self);
static void _files_abstract_directory_view_on_view_button_release_event_gtk_gesture_multi_press_released (GtkGestureMultiPress* _sender,
                                                                                                   gint n_press,
                                                                                                   gdouble x,
                                                                                                   gdouble y,
                                                                                                   gpointer self);
VALA_EXTERN void files_abstract_directory_view_on_motion_notify_event (FilesAbstractDirectoryView* self,
                                                           gdouble x,
                                                           gdouble y);
static void _files_abstract_directory_view_on_motion_notify_event_gtk_event_controller_motion_motion (GtkEventControllerMotion* _sender,
                                                                                               gdouble x,
                                                                                               gdouble y,
                                                                                               gpointer self);
VALA_EXTERN void files_abstract_directory_view_on_leave_notify_event (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_leave_notify_event_gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                                             gpointer self);
VALA_EXTERN void files_abstract_directory_view_connect_directory_handlers (FilesAbstractDirectoryView* self,
                                                               FilesDirectory* dir);
VALA_EXTERN void files_abstract_directory_view_set_up_name_renderer (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_on_name_edited (FilesAbstractDirectoryView* self,
                                                   const gchar* path_string,
                                                   const gchar* _new_name);
static void _files_abstract_directory_view_on_name_edited_gtk_cell_renderer_text_edited (GtkCellRendererText* _sender,
                                                                                  const gchar* path,
                                                                                  const gchar* new_text,
                                                                                  gpointer self);
VALA_EXTERN void files_abstract_directory_view_on_name_editing_canceled (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_name_editing_canceled_gtk_cell_renderer_editing_canceled (GtkCellRenderer* _sender,
                                                                                                 gpointer self);
VALA_EXTERN void files_abstract_directory_view_on_name_editing_started (FilesAbstractDirectoryView* self,
                                                            GtkCellEditable* editable,
                                                            const gchar* path_string);
static void _files_abstract_directory_view_on_name_editing_started_gtk_cell_renderer_editing_started (GtkCellRenderer* _sender,
                                                                                               GtkCellEditable* editable,
                                                                                               const gchar* path,
                                                                                               gpointer self);
static gboolean files_abstract_directory_view_on_popup_menu (FilesAbstractDirectoryView* self);
static gboolean _files_abstract_directory_view_on_popup_menu_gtk_widget_popup_menu (GtkWidget* _sender,
                                                                             gpointer self);
static void __lambda120_ (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_on_clipboard_changed (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_clipboard_changed_files_clipboard_manager_changed (FilesClipboardManager* _sender,
                                                                                          gpointer self);
static void ___lambda120__gtk_widget_unrealize (GtkWidget* _sender,
                                         gpointer self);
static void __lambda121_ (FilesAbstractDirectoryView* self);
static void ___lambda121__gtk_widget_realize (GtkWidget* _sender,
                                       gpointer self);
static void __lambda122_ (FilesAbstractDirectoryView* self);
static void ___lambda122__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                 gpointer self);
static void __lambda123_ (FilesAbstractDirectoryView* self);
static void ___lambda123__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void files_abstract_directory_view_on_show_hidden_files_changed (FilesAbstractDirectoryView* self,
                                                                 GObject* prefs,
                                                                 GParamSpec* pspec);
static void _files_abstract_directory_view_on_show_hidden_files_changed_g_object_notify (GObject* _sender,
                                                                                  GParamSpec* pspec,
                                                                                  gpointer self);
static void files_abstract_directory_view_on_dateformat_changed (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_dateformat_changed_g_object_notify (GObject* _sender,
                                                                           GParamSpec* pspec,
                                                                           gpointer self);
static void files_abstract_directory_view_on_show_thumbnails_changed (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_show_thumbnails_changed_g_settings_changed (GSettings* _sender,
                                                                                   const gchar* key,
                                                                                   gpointer self);
static void files_abstract_directory_view_on_sort_directories_first_changed (FilesAbstractDirectoryView* self,
                                                                      GSettings* settings,
                                                                      const gchar* key);
static void _files_abstract_directory_view_on_sort_directories_first_changed_g_settings_changed (GSettings* _sender,
                                                                                          const gchar* key,
                                                                                          gpointer self);
static void _files_abstract_directory_view_on_row_deleted_gtk_tree_model_row_deleted (GtkTreeModel* _sender,
                                                                               GtkTreePath* path,
                                                                               gpointer self);
VALA_EXTERN void files_abstract_directory_view_on_sort_column_changed (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_sort_column_changed_gtk_tree_sortable_sort_column_changed (GtkTreeSortable* _sender,
                                                                                                  gpointer self);
VALA_EXTERN void files_abstract_directory_view_zoom_in (FilesAbstractDirectoryView* self);
VALA_EXTERN FilesZoomLevel files_abstract_directory_view_get_zoom_level (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_set_zoom_level (FilesAbstractDirectoryView* self,
                                                   FilesZoomLevel value);
VALA_EXTERN void files_abstract_directory_view_zoom_out (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_zoom_normal (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_focus_first_for_empty_selection (FilesAbstractDirectoryView* self,
                                                                    gboolean select);
static Block16Data* block16_data_ref (Block16Data* _data16_);
static void block16_data_unref (void * _userdata_);
static gboolean ___lambda52_ (Block16Data* _data16_);
VALA_EXTERN gboolean files_abstract_directory_view_get_tree_frozen (FilesAbstractDirectoryView* self);
static gboolean ____lambda52__gsource_func (gpointer self);
VALA_EXTERN void files_abstract_directory_view_select_glib_files_when_thawed (FilesAbstractDirectoryView* self,
                                                                  GList* location_list,
                                                                  GFile* focus_location);
static Block17Data* block17_data_ref (Block17Data* _data17_);
static void block17_data_unref (void * _userdata_);
static void __lambda50_ (Block17Data* _data17_,
                  GFile* loc);
static void ___lambda50__gfunc (gconstpointer data,
                         gpointer self);
static void ___lambda51_ (Block17Data* _data17_);
static void files_abstract_directory_view_select_files_and_update_if_thawed (FilesAbstractDirectoryView* self,
                                                                      GeeLinkedList* files_to_select,
                                                                      GFile* focus_file);
static void ____lambda51__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
VALA_EXTERN void files_abstract_directory_view_unselect_all (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_on_view_selection_changed (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_update_selected_files_and_menu (FilesAbstractDirectoryView* self);
static void _vala_GtkTreeIter_free (GtkTreeIter* self);
VALA_EXTERN GList* files_abstract_directory_view_get_open_with_apps (FilesAbstractDirectoryView* self);
VALA_EXTERN GAppInfo* files_abstract_directory_view_get_default_app (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_grab_focus (FilesAbstractDirectoryView* self);
VALA_EXTERN gboolean files_view_slot_get_is_active (FilesViewSlot* self);
VALA_EXTERN void files_abstract_directory_view_set_active_slot (FilesAbstractDirectoryView* self,
                                                    gboolean scroll);
VALA_EXTERN GList* files_abstract_directory_view_get_selected_files (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_load_location (FilesAbstractDirectoryView* self,
                                                  GFile* location);
VALA_EXTERN void files_abstract_directory_view_load_root_location (FilesAbstractDirectoryView* self,
                                                       GFile* location);
VALA_EXTERN void files_abstract_directory_view_activate_selected_items (FilesAbstractDirectoryView* self,
                                                            FilesOpenFlag flag,
                                                            GList* selection);
static Block18Data* block18_data_ref (Block18Data* _data18_);
static void block18_data_unref (void * _userdata_);
static void files_abstract_directory_view_activate_file (FilesAbstractDirectoryView* self,
                                                  FilesFile* _file,
                                                  GdkScreen* screen,
                                                  FilesOpenFlag flag,
                                                  gboolean only_one_file);
static gboolean files_abstract_directory_view_app_is_this_app (FilesAbstractDirectoryView* self,
                                                        GAppInfo* ai);
static Block19Data* block19_data_ref (Block19Data* _data19_);
static void block19_data_unref (void * _userdata_);
static gboolean _______lambda80_ (Block19Data* _data19_);
static gboolean ________lambda80__gsource_func (gpointer self);
static gboolean _______lambda81_ (Block19Data* _data19_);
static void files_abstract_directory_view_open_file (FilesAbstractDirectoryView* self,
                                              FilesFile* file,
                                              GdkScreen* screen,
                                              GAppInfo* app_info);
static gboolean ________lambda81__gsource_func (gpointer self);
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
static gboolean _____lambda82_ (Block20Data* _data20_);
static void files_abstract_directory_view_open_files_with (FilesAbstractDirectoryView* self,
                                                    GAppInfo* app,
                                                    GList* files);
static gboolean ______lambda82__gsource_func (gpointer self);
VALA_EXTERN void files_abstract_directory_view_select_gof_file (FilesAbstractDirectoryView* self,
                                                    FilesFile* file);
VALA_EXTERN void files_abstract_directory_view_select_and_scroll_to_gof_file (FilesAbstractDirectoryView* self,
                                                                  FilesFile* file);
VALA_EXTERN void files_abstract_directory_view_add_gof_file_to_selection (FilesAbstractDirectoryView* self,
                                                              FilesFile* file);
static void files_abstract_directory_view_on_directory_file_added (FilesAbstractDirectoryView* self,
                                                            FilesDirectory* dir,
                                                            FilesFile* file,
                                                            gboolean is_internal);
static void _files_abstract_directory_view_on_directory_file_added_files_directory_file_added (FilesDirectory* _sender,
                                                                                        FilesFile* file,
                                                                                        gboolean is_internal,
                                                                                        gpointer self);
static void files_abstract_directory_view_on_directory_file_changed (FilesAbstractDirectoryView* self,
                                                              FilesDirectory* dir,
                                                              FilesFile* file);
static void _files_abstract_directory_view_on_directory_file_changed_files_directory_file_changed (FilesDirectory* _sender,
                                                                                            FilesFile* file,
                                                                                            gpointer self);
static void files_abstract_directory_view_on_directory_file_deleted (FilesAbstractDirectoryView* self,
                                                              FilesDirectory* dir,
                                                              FilesFile* file);
static void _files_abstract_directory_view_on_directory_file_deleted_files_directory_file_deleted (FilesDirectory* _sender,
                                                                                            FilesFile* file,
                                                                                            gpointer self);
static void files_abstract_directory_view_on_directory_file_icon_changed (FilesAbstractDirectoryView* self,
                                                                   FilesDirectory* dir,
                                                                   FilesFile* file);
static void _files_abstract_directory_view_on_directory_file_icon_changed_files_directory_icon_changed (FilesDirectory* _sender,
                                                                                                 FilesFile* file,
                                                                                                 gpointer self);
VALA_EXTERN void files_abstract_directory_view_connect_directory_loading_handlers (FilesAbstractDirectoryView* self,
                                                                       FilesDirectory* dir);
static void files_abstract_directory_view_on_directory_file_loaded (FilesAbstractDirectoryView* self,
                                                             FilesDirectory* dir,
                                                             FilesFile* file);
static void _files_abstract_directory_view_on_directory_file_loaded_files_directory_file_loaded (FilesDirectory* _sender,
                                                                                          FilesFile* file,
                                                                                          gpointer self);
static void files_abstract_directory_view_on_directory_done_loading (FilesAbstractDirectoryView* self,
                                                              FilesDirectory* dir);
static void _files_abstract_directory_view_on_directory_done_loading_files_directory_done_loading (FilesDirectory* _sender,
                                                                                            gpointer self);
VALA_EXTERN void files_abstract_directory_view_disconnect_directory_loading_handlers (FilesAbstractDirectoryView* self,
                                                                          FilesDirectory* dir);
VALA_EXTERN void files_abstract_directory_view_disconnect_directory_handlers (FilesAbstractDirectoryView* self,
                                                                  FilesDirectory* dir);
VALA_EXTERN void files_abstract_directory_view_change_directory (FilesAbstractDirectoryView* self,
                                                     FilesDirectory* old_dir,
                                                     FilesDirectory* new_dir);
static void files_abstract_directory_view_clear (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_prepare_reload (FilesAbstractDirectoryView* self,
                                                   FilesDirectory* dir);
VALA_EXTERN void files_abstract_directory_view_block_model (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_unblock_model (FilesAbstractDirectoryView* self);
static gboolean files_abstract_directory_view_on_drag_drop (FilesAbstractDirectoryView* self,
                                                     GdkDragContext* context,
                                                     gint x,
                                                     gint y,
                                                     guint timestamp);
static gboolean _files_abstract_directory_view_on_drag_drop_gtk_widget_drag_drop (GtkWidget* _sender,
                                                                           GdkDragContext* context,
                                                                           gint x,
                                                                           gint y,
                                                                           guint time_,
                                                                           gpointer self);
static void files_abstract_directory_view_on_drag_data_received (FilesAbstractDirectoryView* self,
                                                          GdkDragContext* context,
                                                          gint x,
                                                          gint y,
                                                          GtkSelectionData* selection_data,
                                                          guint info,
                                                          guint timestamp);
static void _files_abstract_directory_view_on_drag_data_received_gtk_widget_drag_data_received (GtkWidget* _sender,
                                                                                         GdkDragContext* context,
                                                                                         gint x,
                                                                                         gint y,
                                                                                         GtkSelectionData* selection_data,
                                                                                         guint info,
                                                                                         guint time_,
                                                                                         gpointer self);
static void files_abstract_directory_view_on_drag_leave (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_drag_leave_gtk_widget_drag_leave (GtkWidget* _sender,
                                                                         GdkDragContext* context,
                                                                         guint time_,
                                                                         gpointer self);
static gboolean files_abstract_directory_view_on_drag_motion (FilesAbstractDirectoryView* self,
                                                       GdkDragContext* context,
                                                       gint x,
                                                       gint y,
                                                       guint timestamp);
static gboolean _files_abstract_directory_view_on_drag_motion_gtk_widget_drag_motion (GtkWidget* _sender,
                                                                               GdkDragContext* context,
                                                                               gint x,
                                                                               gint y,
                                                                               guint time_,
                                                                               gpointer self);
static void files_abstract_directory_view_on_drag_begin (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_drag_begin_gtk_widget_drag_begin (GtkWidget* _sender,
                                                                         GdkDragContext* context,
                                                                         gpointer self);
static void files_abstract_directory_view_on_drag_data_get (FilesAbstractDirectoryView* self,
                                                     GdkDragContext* context,
                                                     GtkSelectionData* selection_data,
                                                     guint info,
                                                     guint timestamp);
static void _files_abstract_directory_view_on_drag_data_get_gtk_widget_drag_data_get (GtkWidget* _sender,
                                                                               GdkDragContext* context,
                                                                               GtkSelectionData* selection_data,
                                                                               guint info,
                                                                               guint time_,
                                                                               gpointer self);
static void files_abstract_directory_view_on_drag_data_delete (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_drag_data_delete_gtk_widget_drag_data_delete (GtkWidget* _sender,
                                                                                     GdkDragContext* context,
                                                                                     gpointer self);
static void files_abstract_directory_view_on_drag_end (FilesAbstractDirectoryView* self);
static void _files_abstract_directory_view_on_drag_end_gtk_widget_drag_end (GtkWidget* _sender,
                                                                     GdkDragContext* context,
                                                                     gpointer self);
VALA_EXTERN void files_abstract_directory_view_cancel_thumbnailing (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_cancel_timeout (FilesAbstractDirectoryView* self,
                                                   guint* id);
VALA_EXTERN gboolean files_abstract_directory_view_selection_only_contains_folders (FilesAbstractDirectoryView* self,
                                                                        GList* list);
static Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
static void __lambda48_ (Block21Data* _data21_,
                  FilesFile* file);
static void ___lambda48__gfunc (gconstpointer data,
                         gpointer self);
VALA_EXTERN GList* files_abstract_directory_view_get_selected_files_for_transfer (FilesAbstractDirectoryView* self,
                                                                      GList* selection);
VALA_EXTERN gboolean files_abstract_directory_view_get_in_recent (FilesAbstractDirectoryView* self);
VALA_EXTERN GAppInfo* files_mime_actions_get_default_application_for_file (FilesFile* file);
VALA_EXTERN GType files_view_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesViewWindow, g_object_unref)
VALA_EXTERN FilesViewWindow* files_abstract_directory_view_get_window (FilesAbstractDirectoryView* self);
static gboolean files_abstract_directory_view_can_open_file (FilesAbstractDirectoryView* self,
                                                      FilesFile* file,
                                                      gboolean show_error_dialog);
VALA_EXTERN void files_mime_actions_open_glib_file_request (GFile* file_to_open,
                                                GtkWidget* parent,
                                                GAppInfo* app,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN void files_mime_actions_open_glib_file_request_finish (GAsyncResult* _res_);
static void files_abstract_directory_view_trash_or_delete_files (FilesAbstractDirectoryView* self,
                                                          GList* file_list,
                                                          gboolean delete_if_already_in_trash,
                                                          gboolean delete_immediately);
static Block22Data* block22_data_ref (Block22Data* _data22_);
static void block22_data_unref (void * _userdata_);
static void ___lambda106_ (Block22Data* _data22_,
                    FilesFile* file);
static void ____lambda106__gfunc (gconstpointer data,
                           gpointer self);
static void ___lambda107_ (Block22Data* _data22_,
                    FilesFile* file);
static void ____lambda107__gfunc (gconstpointer data,
                           gpointer self);
static void ___lambda108_ (FilesAbstractDirectoryView* self,
                    GObject* obj,
                    GAsyncResult* res);
VALA_EXTERN void files_abstract_directory_view_after_trash_or_delete (FilesAbstractDirectoryView* self);
static void ____lambda108__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void files_abstract_directory_view_add_file (FilesAbstractDirectoryView* self,
                                             FilesFile* file,
                                             FilesDirectory* dir,
                                             gboolean is_internal);
static Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_data_unref (void * _userdata_);
static Block24Data* block24_data_ref (Block24Data* _data24_);
static void block24_data_unref (void * _userdata_);
static void ___lambda58_ (Block24Data* _data24_);
static void ____lambda58__gtk_tree_model_rows_reordered (GtkTreeModel* _sender,
                                                  GtkTreePath* path,
                                                  GtkTreeIter* iter,
                                                  gint* new_order,
                                                  gpointer self);
static void files_abstract_directory_view_handle_free_space_change (FilesAbstractDirectoryView* self);
static gboolean ___lambda59_ (FilesAbstractDirectoryView* self);
static gboolean ____lambda59__gsource_func (gpointer self);
static void files_abstract_directory_view_new_empty_file (FilesAbstractDirectoryView* self,
                                                   const gchar* parent_uri);
static void __lambda115_ (FilesAbstractDirectoryView* self,
                   GObject* obj,
                   GAsyncResult* res);
VALA_EXTERN void files_abstract_directory_view_create_file_done (GFile* new_file,
                                                     FilesAbstractDirectoryView* self);
static void ___lambda115__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void files_abstract_directory_view_new_empty_folder (FilesAbstractDirectoryView* self);
static void __lambda111_ (FilesAbstractDirectoryView* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ___lambda111__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void files_abstract_directory_view_after_new_file_added (FilesAbstractDirectoryView* self,
                                                         FilesFile* file);
static void _files_abstract_directory_view_after_new_file_added_files_directory_file_added (FilesDirectory* _sender,
                                                                                     FilesFile* file,
                                                                                     gboolean is_internal,
                                                                                     gpointer self);
VALA_EXTERN void files_abstract_directory_view_rename_file (FilesAbstractDirectoryView* self,
                                                FilesFile* file_to_rename);
static Block25Data* block25_data_ref (Block25Data* _data25_);
static void block25_data_unref (void * _userdata_);
static gboolean ___lambda104_ (Block25Data* _data25_);
static void files_abstract_directory_view_start_renaming_file (FilesAbstractDirectoryView* self,
                                                        FilesFile* file);
static gboolean ____lambda104__gsource_func (gpointer self);
static void files_abstract_directory_view_unblock_directory_monitor (FilesAbstractDirectoryView* self);
static gboolean __lambda109_ (FilesAbstractDirectoryView* self);
static gboolean ___lambda109__gsource_func (gpointer self);
static gboolean __lambda110_ (FilesAbstractDirectoryView* self);
static gboolean ___lambda110__gsource_func (gpointer self);
static void files_abstract_directory_view_trash_or_delete_selected_files (FilesAbstractDirectoryView* self,
                                                                   gboolean delete_immediately);
static void files_abstract_directory_view_view_selected_file (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_forget_selected_file (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_rename_selection (FilesAbstractDirectoryView* self);
VALA_EXTERN GType files_renamer_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesRenamerDialog, g_object_unref)
VALA_EXTERN FilesViewWindow* files_view_slot_get_window (FilesViewSlot* self);
VALA_EXTERN FilesRenamerDialog* files_renamer_dialog_new (GList* files,
                                              const gchar* basename);
VALA_EXTERN FilesRenamerDialog* files_renamer_dialog_construct (GType object_type,
                                                    GList* files,
                                                    const gchar* basename);
VALA_EXTERN gboolean files_is_admin (void);
static GList* files_abstract_directory_view_get_files_for_action (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_create_from_template (FilesAbstractDirectoryView* self,
                                                         const gchar* path);
static void files_abstract_directory_view_set_sort (FilesAbstractDirectoryView* self,
                                             const gchar* col_name,
                                             gboolean reverse);
static void _vala_XdpParent_free (XdpParent* self);
static FilesOpenFlag _variant_get1 (GVariant* value);
VALA_EXTERN FilesViewPropertiesWindow* files_view_properties_window_new (GList* _files,
                                                             FilesAbstractDirectoryView* _view,
                                                             GtkWindow* parent);
VALA_EXTERN FilesViewPropertiesWindow* files_view_properties_window_construct (GType object_type,
                                                                   GList* _files,
                                                                   FilesAbstractDirectoryView* _view,
                                                                   GtkWindow* parent);
VALA_EXTERN GType files_view_abstract_properties_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesViewAbstractPropertiesDialog, g_object_unref)
VALA_EXTERN GType files_view_properties_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesViewPropertiesWindow, g_object_unref)
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_data_unref (void * _userdata_);
static void ___lambda118_ (Block26Data* _data26_,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda118__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static Block27Data* block27_data_ref (Block27Data* _data27_);
static void block27_data_unref (void * _userdata_);
static void ___lambda117_ (Block27Data* _data27_,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda117__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
VALA_EXTERN void files_abstract_directory_view_select_all (FilesAbstractDirectoryView* self);
static Block28Data* block28_data_ref (Block28Data* _data28_);
static void block28_data_unref (void * _userdata_);
static gboolean ___lambda60_ (Block28Data* _data28_);
static void files_abstract_directory_view_update_icon_and_plugins (FilesAbstractDirectoryView* self,
                                                            FilesFile* file);
static gboolean ____lambda60__gsource_func (gpointer self);
static Block29Data* block29_data_ref (Block29Data* _data29_);
static void block29_data_unref (void * _userdata_);
static gboolean __lambda61_ (Block29Data* _data29_);
static gboolean ___lambda61__gsource_func (gpointer self);
static void files_abstract_directory_view_set_in_recent (FilesAbstractDirectoryView* self,
                                                  gboolean value);
static void files_abstract_directory_view_set_should_thumbnail (FilesAbstractDirectoryView* self);
static gboolean __lambda53_ (FilesAbstractDirectoryView* self);
static gboolean ___lambda53__gsource_func (gpointer self);
static void files_abstract_directory_view_on_zoom_level_changed (FilesAbstractDirectoryView* self,
                                                          FilesZoomLevel zoom);
VALA_EXTERN gint files_abstract_directory_view_get_icon_size (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_directory_hidden_changed (FilesAbstractDirectoryView* self,
                                                             FilesDirectory* dir,
                                                             gboolean show);
VALA_EXTERN void files_abstract_directory_view_show_context_menu (FilesAbstractDirectoryView* self,
                                                      GdkEvent* event);
static void _vala_GdkEvent_free (GdkEvent* self);
static void files_abstract_directory_view_real_on_row_deleted (FilesAbstractDirectoryView* self,
                                                        GtkTreePath* path);
static void files_abstract_directory_view_check_destination_actions_and_target_file (FilesAbstractDirectoryView* self,
                                                                              GdkDragContext* context,
                                                                              gint x,
                                                                              gint y,
                                                                              guint timestamp);
static void files_abstract_directory_view_get_drag_data (FilesAbstractDirectoryView* self,
                                                  GdkDragContext* context,
                                                  gint x,
                                                  gint y,
                                                  guint timestamp);
static void files_abstract_directory_view_start_drag_scroll_timer (FilesAbstractDirectoryView* self,
                                                            GdkDevice* pointer);
static FilesFile* files_abstract_directory_view_get_drop_target_file (FilesAbstractDirectoryView* self,
                                                               gint win_x,
                                                               gint win_y);
VALA_EXTERN GtkWindow* files_get_active_window (void);
static gboolean ____lambda125_ (FilesAbstractDirectoryView* self);
static gboolean _____lambda125__gsource_func (gpointer self);
static void files_abstract_directory_view_clear_destination_drag_data (FilesAbstractDirectoryView* self);
static gboolean files_abstract_directory_view_get_drop_highlight (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_set_drop_highlight (FilesAbstractDirectoryView* self,
                                                       gboolean value);
static void files_abstract_directory_view_highlight_drop_file (FilesAbstractDirectoryView* self,
                                                        FilesFile* drop_file,
                                                        GdkDragAction action,
                                                        GtkTreePath* path);
static gboolean files_abstract_directory_view_is_valid_drop_folder (FilesAbstractDirectoryView* self,
                                                             FilesFile* file);
static gboolean _____lambda126_ (FilesAbstractDirectoryView* self);
static gboolean ______lambda126__gsource_func (gpointer self);
static void files_abstract_directory_view_update_menu_actions (FilesAbstractDirectoryView* self);
static GVariant* _variant_new1 (FilesOpenFlag value);
static GVariant* _variant_new2 (const gchar* value);
static GVariant* _variant_new3 (const gchar* value);
static GVariant* _variant_new4 (FilesOpenFlag value);
static GVariant* _variant_new5 (const gchar* value);
static GVariant* _variant_new6 (const gchar* value);
VALA_EXTERN GList* files_mime_actions_get_applications_for_files (GList* files);
static void files_abstract_directory_view_filter_default_app_from_open_with_apps (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_filter_this_app_from_open_with_apps (FilesAbstractDirectoryView* self);
static gboolean files_abstract_directory_view_valid_selection_for_restore (FilesAbstractDirectoryView* self);
static gboolean files_abstract_directory_view_valid_selection_for_edit (FilesAbstractDirectoryView* self);
static FilesAbstractDirectoryViewSortSubMenuItem* files_abstract_directory_view_sort_sub_menu_item_new (void);
static FilesAbstractDirectoryViewSortSubMenuItem* files_abstract_directory_view_sort_sub_menu_item_construct (GType object_type);
static GType files_abstract_directory_view_sort_sub_menu_item_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesAbstractDirectoryViewSortSubMenuItem, g_object_unref)
static FilesAbstractDirectoryViewNewSubMenuItem* files_abstract_directory_view_new_sub_menu_item_new (void);
static FilesAbstractDirectoryViewNewSubMenuItem* files_abstract_directory_view_new_sub_menu_item_construct (GType object_type);
static GType files_abstract_directory_view_new_sub_menu_item_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesAbstractDirectoryViewNewSubMenuItem, g_object_unref)
static void files_abstract_directory_view_action_set_enabled (FilesAbstractDirectoryView* self,
                                                       GSimpleActionGroup* action_group,
                                                       const gchar* name,
                                                       gboolean enabled);
static void files_abstract_directory_view_update_default_app (FilesAbstractDirectoryView* self,
                                                       GList* selection);
static void files_abstract_directory_view_update_menu_actions_sort (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_action_set_state (FilesAbstractDirectoryView* self,
                                                     GSimpleActionGroup* action_group,
                                                     const gchar* name,
                                                     GVariant* val);
VALA_EXTERN GAppInfo* files_mime_actions_get_default_application_for_files (GList* files);
static void __lambda116_ (FilesAbstractDirectoryView* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ___lambda116__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
VALA_EXTERN void files_mime_actions_open_multiple_gof_files_request (GList* gofs_to_open,
                                                         GtkWidget* parent,
                                                         GAppInfo* app);
static gboolean __lambda54_ (FilesAbstractDirectoryView* self);
static gboolean ___lambda54__gsource_func (gpointer self);
VALA_EXTERN gint files_view_slot_get_displayed_files_count (FilesViewSlot* self);
static gboolean __lambda55_ (FilesAbstractDirectoryView* self);
static GtkTreePath* _vala_GtkTreePath_copy (GtkTreePath* self);
static gboolean ___lambda55__gsource_func (gpointer self);
static gboolean __lambda56_ (FilesAbstractDirectoryView* self);
static gboolean ___lambda56__gsource_func (gpointer self);
static Block30Data* block30_data_ref (Block30Data* _data30_);
static void block30_data_unref (void * _userdata_);
static gboolean __lambda127_ (Block30Data* _data30_);
static void files_abstract_directory_view_scroll_if_near_edge (FilesAbstractDirectoryView* self,
                                                        gint pos,
                                                        gint dim,
                                                        gint threshold,
                                                        GtkAdjustment* adj);
static gboolean ___lambda127__gsource_func (gpointer self);
static Block31Data* block31_data_ref (Block31Data* _data31_);
static void block31_data_unref (void * _userdata_);
static void ____lambda47_ (Block31Data* _data31_,
                    FilesFile* file);
static void _____lambda47__gfunc (gconstpointer data,
                           gpointer self);
VALA_EXTERN void files_abstract_directory_view_on_view_items_activated (FilesAbstractDirectoryView* self);
static gboolean files_abstract_directory_view_real_on_view_key_press_event (FilesAbstractDirectoryView* self,
                                                                     guint original_keyval,
                                                                     guint keycode,
                                                                     GdkModifierType state);
static void files_abstract_directory_view_cancel_hover (FilesAbstractDirectoryView* self);
VALA_EXTERN guint files_abstract_directory_view_map_key (guint original_keyval,
                                             guint keycode,
                                             GdkModifierType* consumed_mods);
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_column_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesColumnView, g_object_unref)
VALA_EXTERN GType files_view_view_container_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesViewViewContainer, g_object_unref)
VALA_EXTERN FilesViewViewContainer* files_view_slot_get_ctab (FilesViewSlot* self);
VALA_EXTERN GType files_view_miller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesViewMiller, g_object_unref)
VALA_EXTERN gboolean files_view_miller_on_miller_key_pressed (FilesViewMiller* self,
                                                  guint keyval,
                                                  guint keycode,
                                                  GdkModifierType state);
static gboolean __lambda112_ (FilesAbstractDirectoryView* self);
static gboolean ___lambda112__gsource_func (gpointer self);
VALA_EXTERN gboolean files_abstract_directory_view_get_singleclick_select (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_on_scroll_event (FilesAbstractDirectoryView* self,
                                                         gdouble dx,
                                                         gdouble dy);
static GtkTreeIter* _vala_GtkTreeIter_copy (GtkTreeIter* self);
VALA_EXTERN void files_abstract_directory_view_set_is_frozen (FilesAbstractDirectoryView* self,
                                                  gboolean value);
VALA_EXTERN void files_abstract_directory_view_set_renaming (FilesAbstractDirectoryView* self,
                                                 gboolean value);
VALA_EXTERN void files_abstract_directory_view_set_file_display_name (FilesAbstractDirectoryView* self,
                                                          GFile* old_location,
                                                          const gchar* new_name,
                                                          GCancellable* cancellable,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
VALA_EXTERN GFile* files_abstract_directory_view_set_file_display_name_finish (FilesAbstractDirectoryView* self,
                                                                   GAsyncResult* _res_,
                                                                   GError** error);
static void ____lambda76_ (FilesAbstractDirectoryView* self,
                    GObject* obj,
                    GAsyncResult* res);
static void _____lambda76__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void files_abstract_directory_view_set_file_display_name_data_free (gpointer _data);
static gboolean files_abstract_directory_view_set_file_display_name_co (FilesAbstractDirectoryViewSetFileDisplayNameData* _data_);
static void files_abstract_directory_view_after_renamed_file_added (FilesAbstractDirectoryView* self,
                                                             FilesFile* new_file);
static void _files_abstract_directory_view_after_renamed_file_added_files_directory_file_added (FilesDirectory* _sender,
                                                                                         FilesFile* file,
                                                                                         gboolean is_internal,
                                                                                         gpointer self);
static void files_abstract_directory_view_set_file_display_name_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_);
static Block32Data* block32_data_ref (Block32Data* _data32_);
static void block32_data_unref (void * _userdata_);
static gboolean ___lambda75_ (Block32Data* _data32_);
static gboolean ____lambda75__gsource_func (gpointer self);
static gboolean files_abstract_directory_view_real_handle_primary_button_click (FilesAbstractDirectoryView* self,
                                                                         guint n_press,
                                                                         GdkModifierType mods,
                                                                         GtkTreePath* path);
VALA_EXTERN void files_abstract_directory_view_block_drag_and_drop (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_unblock_drag_and_drop (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_on_view_button_press_event (FilesAbstractDirectoryView* self,
                                                                    gint n_press,
                                                                    gdouble x,
                                                                    gdouble y);
static void files_abstract_directory_view_real_on_view_button_release_event (FilesAbstractDirectoryView* self,
                                                                      gint n_press,
                                                                      gdouble x,
                                                                      gdouble y);
static Block33Data* block33_data_ref (Block33Data* _data33_);
static void block33_data_unref (void * _userdata_);
static gboolean ____lambda132_ (Block33Data* _data33_);
static gboolean _____lambda132__gsource_func (gpointer self);
static gboolean __lambda133_ (FilesAbstractDirectoryView* self);
static gboolean ___lambda133__gsource_func (gpointer self);
static void files_abstract_directory_view_real_change_zoom_level (FilesAbstractDirectoryView* self);
static Block34Data* block34_data_ref (Block34Data* _data34_);
static void block34_data_unref (void * _userdata_);
static gboolean __lambda105_ (Block34Data* _data34_);
static gboolean ___lambda105__gsource_func (gpointer self);
static Block35Data* block35_data_ref (Block35Data* _data35_);
static void block35_data_unref (void * _userdata_);
static void ___lambda124_ (Block35Data* _data35_,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda124__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
VALA_EXTERN guint files_abstract_directory_view_get_selected_files_from_model (FilesAbstractDirectoryView* self,
                                                                   GList** selected_files);
static gboolean files_abstract_directory_view_real_expand_collapse (FilesAbstractDirectoryView* self,
                                                             GtkTreePath* path);
static gboolean files_abstract_directory_view_real_handle_default_button_click (FilesAbstractDirectoryView* self);
static gboolean files_abstract_directory_view_real_get_next_visible_iter (FilesAbstractDirectoryView* self,
                                                                   GtkTreeIter* iter,
                                                                   gboolean recurse);
static void files_abstract_directory_view_real_cancel (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_close (FilesAbstractDirectoryView* self);
static void __vala_GtkTreePath_free0_ (gpointer var);
static inline void _g_list_free___vala_GtkTreePath_free0_ (GList* self);
static GtkTreeRowReference* _vala_GtkTreeRowReference_copy (GtkTreeRowReference* 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);
VALA_EXTERN void files_abstract_directory_view_unselect_others (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_highlight_path (FilesAbstractDirectoryView* self,
                                                        GtkTreePath* path);
static GtkTreePath* files_abstract_directory_view_real_up (FilesAbstractDirectoryView* self,
                                                    GtkTreePath* path);
static GtkTreePath* files_abstract_directory_view_real_down (FilesAbstractDirectoryView* self,
                                                      GtkTreePath* path);
static GSettings* files_abstract_directory_view_real_get_view_settings (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_set_up_zoom_level (FilesAbstractDirectoryView* self);
static gboolean files_abstract_directory_view_real_view_has_focus (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_scroll_to_cell (FilesAbstractDirectoryView* self,
                                                        GtkTreePath* path,
                                                        gboolean scroll_to_top);
VALA_EXTERN gboolean files_abstract_directory_view_match_keycode (GdkKeymap* keymap,
                                                      guint keyval,
                                                      guint code,
                                                      gint level);
static void _vala_GdkEventKey_free (GdkEventKey* self);
static GList* files_abstract_directory_view_real_get_selected_paths (FilesAbstractDirectoryView* self);
static GtkTreePath* files_abstract_directory_view_real_get_path_at_pos (FilesAbstractDirectoryView* self,
                                                                 gint x,
                                                                 gint win);
static GtkTreePath* files_abstract_directory_view_real_get_path_at_cursor (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_tree_select_all (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_tree_unselect_all (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_tree_unselect_others (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_select_path (FilesAbstractDirectoryView* self,
                                                     GtkTreePath* path,
                                                     gboolean cursor_follows);
static void files_abstract_directory_view_real_unselect_path (FilesAbstractDirectoryView* self,
                                                       GtkTreePath* path);
static gboolean files_abstract_directory_view_real_path_is_selected (FilesAbstractDirectoryView* self,
                                                              GtkTreePath* path);
static gboolean files_abstract_directory_view_real_get_visible_range (FilesAbstractDirectoryView* self,
                                                               GtkTreePath** start_path,
                                                               GtkTreePath** end_path);
static void files_abstract_directory_view_real_set_cursor (FilesAbstractDirectoryView* self,
                                                    GtkTreePath* path,
                                                    gboolean start_editing,
                                                    gboolean select,
                                                    gboolean scroll_to_top);
static gboolean files_abstract_directory_view_real_move_cursor (FilesAbstractDirectoryView* self,
                                                         guint keyval,
                                                         gboolean only_shift_pressed,
                                                         gboolean control_pressed);
static gboolean files_abstract_directory_view_real_will_handle_button_press (FilesAbstractDirectoryView* self,
                                                                      gboolean no_mods,
                                                                      gboolean only_control_pressed,
                                                                      gboolean only_shift_pressed);
VALA_EXTERN gboolean files_abstract_directory_view_is_on_icon (FilesAbstractDirectoryView* self,
                                                   gint x,
                                                   gint y,
                                                   gboolean* on_helper);
static gboolean files_abstract_directory_view_real_handle_multi_select (FilesAbstractDirectoryView* self,
                                                                 GtkTreePath* path);
static GtkWidget* files_abstract_directory_view_real_create_view (FilesAbstractDirectoryView* self);
static guint files_abstract_directory_view_real_get_event_position_info (FilesAbstractDirectoryView* self,
                                                                  gdouble x,
                                                                  gdouble y,
                                                                  GtkTreePath** path,
                                                                  gboolean rubberband);
static void files_abstract_directory_view_real_scroll_to_path (FilesAbstractDirectoryView* self,
                                                        GtkTreePath* path,
                                                        gboolean scroll_to_top);
static void files_abstract_directory_view_real_set_cursor_on_cell (FilesAbstractDirectoryView* self,
                                                            GtkTreePath* path,
                                                            GtkCellRenderer* renderer,
                                                            gboolean start_editing,
                                                            gboolean scroll_to_top);
static void files_abstract_directory_view_real_freeze_tree (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_thaw_tree (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_freeze_child_notify (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_thaw_child_notify (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_connect_tree_signals (FilesAbstractDirectoryView* self);
static void files_abstract_directory_view_real_disconnect_tree_signals (FilesAbstractDirectoryView* self);
VALA_EXTERN void files_abstract_directory_view_set_singleclick_select (FilesAbstractDirectoryView* self,
                                                           gboolean value);
VALA_EXTERN void files_abstract_directory_view_set_tree_frozen (FilesAbstractDirectoryView* self,
                                                    gboolean value);
VALA_EXTERN FilesViewWindow* files_view_view_container_get_window (FilesViewViewContainer* self);
static void g_cclosure_user_marshal_VOID__OBJECT_ENUM_BOOLEAN (GClosure * closure,
                                                        GValue * return_value,
                                                        guint n_param_values,
                                                        const GValue * param_values,
                                                        gpointer invocation_hint,
                                                        gpointer marshal_data);
static GObject * files_abstract_directory_view_sort_sub_menu_item_constructor (GType type,
                                                                        guint n_construct_properties,
                                                                        GObjectConstructParam * construct_properties);
static GType files_abstract_directory_view_sort_sub_menu_item_get_type_once (void);
static gboolean files_abstract_directory_view_new_sub_menu_item_load_templates_from_folder (FilesAbstractDirectoryViewNewSubMenuItem* self,
                                                                                     GFile* template_folder,
                                                                                     GMenu* submenu);
static gint ___lambda86_ (GFile* a,
                   GFile* b);
static gint ____lambda86__gcompare_func (gconstpointer a,
                                  gconstpointer b);
static gint ___lambda87_ (GFile* a,
                   GFile* b);
static gint ____lambda87__gcompare_func (gconstpointer a,
                                  gconstpointer b);
static GObject * files_abstract_directory_view_new_sub_menu_item_constructor (GType type,
                                                                       guint n_construct_properties,
                                                                       GObjectConstructParam * construct_properties);
static GVariant* _variant_new7 (const gchar* value);
static void files_abstract_directory_view_new_sub_menu_item_finalize (GObject * obj);
static GType files_abstract_directory_view_new_sub_menu_item_get_type_once (void);
static void files_abstract_directory_view_finalize (GObject * obj);
static GType files_abstract_directory_view_get_type_once (void);
static void _vala_files_abstract_directory_view_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_files_abstract_directory_view_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static const GtkTargetEntry FILES_ABSTRACT_DIRECTORY_VIEW_DRAG_TARGETS[4] = {{"text/plain", (guint) GTK_TARGET_SAME_APP, (guint) FILES_TARGET_TYPE_STRING}, {"text/plain", (guint) GTK_TARGET_OTHER_APP, (guint) FILES_TARGET_TYPE_STRING}, {"text/uri-list", (guint) GTK_TARGET_SAME_APP, (guint) FILES_TARGET_TYPE_TEXT_URI_LIST}, {"text/uri-list", (guint) GTK_TARGET_OTHER_APP, (guint) FILES_TARGET_TYPE_TEXT_URI_LIST}};
static const GtkTargetEntry FILES_ABSTRACT_DIRECTORY_VIEW_DROP_TARGETS[4] = {{"text/uri-list", (guint) GTK_TARGET_SAME_APP, (guint) FILES_TARGET_TYPE_TEXT_URI_LIST}, {"text/uri-list", (guint) GTK_TARGET_OTHER_APP, (guint) FILES_TARGET_TYPE_TEXT_URI_LIST}, {"XdndDirectSave0", (guint) GTK_TARGET_OTHER_APP, (guint) FILES_TARGET_TYPE_XDND_DIRECT_SAVE0}, {"_NETSCAPE_URL", (guint) GTK_TARGET_OTHER_APP, (guint) FILES_TARGET_TYPE_NETSCAPE_URL}};
static const GActionEntry FILES_ABSTRACT_DIRECTORY_VIEW_SELECTION_ENTRIES[12] = {{"open", _files_abstract_directory_view_on_selection_action_open_executable_gsimple_action_activate_callback}, {"open-with-app", _files_abstract_directory_view_on_selection_action_open_with_app_gsimple_action_activate_callback, "u"}, {"open-with-default", _files_abstract_directory_view_on_selection_action_open_with_default_gsimple_action_activate_callback}, {"open-with-other-app", _files_abstract_directory_view_on_selection_action_open_with_other_app_gsimple_action_activate_callback}, {"rename", _files_abstract_directory_view_on_selection_action_rename_gsimple_action_activate_callback}, {"view-in-location", _files_abstract_directory_view_on_selection_action_view_in_location_gsimple_action_activate_callback}, {"forget", _files_abstract_directory_view_on_selection_action_forget_gsimple_action_activate_callback}, {"cut", _files_abstract_directory_view_on_selection_action_cut_gsimple_action_activate_callback}, {"trash", _files_abstract_directory_view_on_selection_action_trash_gsimple_action_activate_callback}, {"delete", _files_abstract_directory_view_on_selection_action_delete_gsimple_action_activate_callback}, {"restore", _files_abstract_directory_view_on_selection_action_restore_gsimple_action_activate_callback}, {"invert-selection", _files_abstract_directory_view_invert_selection_gsimple_action_activate_callback}};
static const GActionEntry FILES_ABSTRACT_DIRECTORY_VIEW_BACKGROUND_ENTRIES[4] = {{"new", _files_abstract_directory_view_on_background_action_new_gsimple_action_activate_callback, "s"}, {"create-from", _files_abstract_directory_view_on_background_action_create_from_gsimple_action_activate_callback, "s"}, {"sort-by", _files_abstract_directory_view_on_background_action_sort_by_changed_gsimple_action_activate_callback, "s", "'name'"}, {"reverse", _files_abstract_directory_view_on_background_action_reverse_changed_gsimple_action_activate_callback, NULL, "false"}};
static const GActionEntry FILES_ABSTRACT_DIRECTORY_VIEW_COMMON_ENTRIES[9] = {{"copy", _files_abstract_directory_view_on_common_action_copy_gsimple_action_activate_callback}, {"paste-into", _files_abstract_directory_view_on_common_action_paste_into_gsimple_action_activate_callback}, {"paste", _files_abstract_directory_view_on_common_action_paste_gsimple_action_activate_callback}, {"open-in", _files_abstract_directory_view_on_common_action_open_in_gsimple_action_activate_callback, "i"}, {"bookmark", _files_abstract_directory_view_on_common_action_bookmark_gsimple_action_activate_callback}, {"properties", _files_abstract_directory_view_on_common_action_properties_gsimple_action_activate_callback}, {"copy-link", _files_abstract_directory_view_on_common_action_copy_link_gsimple_action_activate_callback}, {"select-all", _files_abstract_directory_view_toggle_select_all_gsimple_action_activate_callback}, {"set-wallpaper", _files_abstract_directory_view_action_set_wallpaper_gsimple_action_activate_callback}};

static inline gpointer
files_abstract_directory_view_get_instance_private (FilesAbstractDirectoryView* self)
{
	return G_STRUCT_MEMBER_P (self, FilesAbstractDirectoryView_private_offset);
}

 G_GNUC_NO_INLINE static GType
files_abstract_directory_view_click_zone_get_type_once (void)
{
	static const GEnumValue values[] = {{FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_EXPANDER, "FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_EXPANDER", "expander"}, {FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_HELPER, "FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_HELPER", "helper"}, {FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_ICON, "FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_ICON", "icon"}, {FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_NAME, "FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_NAME", "name"}, {FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_PATH, "FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_PATH", "blank-path"}, {FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_NO_PATH, "FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_NO_PATH", "blank-no-path"}, {FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_INVALID, "FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_INVALID", "invalid"}, {0, NULL, NULL}};
	GType files_abstract_directory_view_click_zone_type_id;
	files_abstract_directory_view_click_zone_type_id = g_enum_register_static ("FilesAbstractDirectoryViewClickZone", values);
	return files_abstract_directory_view_click_zone_type_id;
}

GType
files_abstract_directory_view_click_zone_get_type (void)
{
	static volatile gsize files_abstract_directory_view_click_zone_type_id__once = 0;
	if (g_once_init_enter (&files_abstract_directory_view_click_zone_type_id__once)) {
		GType files_abstract_directory_view_click_zone_type_id;
		files_abstract_directory_view_click_zone_type_id = files_abstract_directory_view_click_zone_get_type_once ();
		g_once_init_leave (&files_abstract_directory_view_click_zone_type_id__once, files_abstract_directory_view_click_zone_type_id);
	}
	return files_abstract_directory_view_click_zone_type_id__once;
}

static void
_files_abstract_directory_view_on_selection_action_open_executable_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                     GVariant* parameter,
                                                                                                     gpointer self)
{
	files_abstract_directory_view_on_selection_action_open_executable ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_selection_action_open_with_app_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                   GVariant* parameter,
                                                                                                   gpointer self)
{
	files_abstract_directory_view_on_selection_action_open_with_app ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_selection_action_open_with_default_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                       GVariant* parameter,
                                                                                                       gpointer self)
{
	files_abstract_directory_view_on_selection_action_open_with_default ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_selection_action_open_with_other_app_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                         GVariant* parameter,
                                                                                                         gpointer self)
{
	files_abstract_directory_view_on_selection_action_open_with_other_app ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_on_selection_action_rename_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                            GVariant* parameter,
                                                                                            gpointer self)
{
	files_abstract_directory_view_on_selection_action_rename ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_selection_action_view_in_location_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                      GVariant* parameter,
                                                                                                      gpointer self)
{
	files_abstract_directory_view_on_selection_action_view_in_location ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_selection_action_forget_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                            GVariant* parameter,
                                                                                            gpointer self)
{
	files_abstract_directory_view_on_selection_action_forget ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_selection_action_cut_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                         GVariant* parameter,
                                                                                         gpointer self)
{
	files_abstract_directory_view_on_selection_action_cut ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_selection_action_trash_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                           GVariant* parameter,
                                                                                           gpointer self)
{
	files_abstract_directory_view_on_selection_action_trash ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_selection_action_delete_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                            GVariant* parameter,
                                                                                            gpointer self)
{
	files_abstract_directory_view_on_selection_action_delete ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_selection_action_restore_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                             GVariant* parameter,
                                                                                             gpointer self)
{
	files_abstract_directory_view_on_selection_action_restore ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_invert_selection_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                  GVariant* parameter,
                                                                                  gpointer self)
{
	files_abstract_directory_view_invert_selection ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_on_background_action_new_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                          GVariant* parameter,
                                                                                          gpointer self)
{
	files_abstract_directory_view_on_background_action_new ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_background_action_create_from_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                  GVariant* parameter,
                                                                                                  gpointer self)
{
	files_abstract_directory_view_on_background_action_create_from ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_background_action_sort_by_changed_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                      GVariant* parameter,
                                                                                                      gpointer self)
{
	files_abstract_directory_view_on_background_action_sort_by_changed ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_background_action_reverse_changed_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                                      GVariant* parameter,
                                                                                                      gpointer self)
{
	files_abstract_directory_view_on_background_action_reverse_changed ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_common_action_copy_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                       GVariant* parameter,
                                                                                       gpointer self)
{
	files_abstract_directory_view_on_common_action_copy ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_common_action_paste_into_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                             GVariant* parameter,
                                                                                             gpointer self)
{
	files_abstract_directory_view_on_common_action_paste_into ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_common_action_paste_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                        GVariant* parameter,
                                                                                        gpointer self)
{
	files_abstract_directory_view_on_common_action_paste ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_common_action_open_in_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                          GVariant* parameter,
                                                                                          gpointer self)
{
	files_abstract_directory_view_on_common_action_open_in ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_common_action_bookmark_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                           GVariant* parameter,
                                                                                           gpointer self)
{
	files_abstract_directory_view_on_common_action_bookmark ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_common_action_properties_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                             GVariant* parameter,
                                                                                             gpointer self)
{
	files_abstract_directory_view_on_common_action_properties ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_on_common_action_copy_link_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                            GVariant* parameter,
                                                                                            gpointer self)
{
	files_abstract_directory_view_on_common_action_copy_link ((FilesAbstractDirectoryView*) self, action, parameter);
}

static void
_files_abstract_directory_view_toggle_select_all_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                   GVariant* parameter,
                                                                                   gpointer self)
{
	files_abstract_directory_view_toggle_select_all ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_action_set_wallpaper_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                      GVariant* parameter,
                                                                                      gpointer self)
{
	files_abstract_directory_view_action_set_wallpaper ((FilesAbstractDirectoryView*) self, action, parameter);
}

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

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

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

static void
__lambda119_ (FilesAbstractDirectoryView* self,
              guint req)
{
	if (req == ((guint) self->priv->thumbnail_request)) {
		self->priv->thumbnail_request = -1;
	}
	files_abstract_directory_view_draw_when_idle (self);
}

static void
___lambda119__files_thumbnailer_finished (FilesThumbnailer* _sender,
                                          guint request,
                                          gpointer self)
{
	__lambda119_ ((FilesAbstractDirectoryView*) self, request);
}

static void
___lambda128_ (FilesAbstractDirectoryView* self)
{
	files_abstract_directory_view_schedule_thumbnail_color_tag_timeout (self);
}

static void
____lambda128__gtk_widget_realize (GtkWidget* _sender,
                                   gpointer self)
{
	___lambda128_ ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_on_scroll_event_gtk_event_controller_scroll_scroll (GtkEventControllerScroll* _sender,
                                                                                   gdouble dx,
                                                                                   gdouble dy,
                                                                                   gpointer self)
{
	files_abstract_directory_view_on_scroll_event ((FilesAbstractDirectoryView*) self, dx, dy);
}

static gboolean
_files_abstract_directory_view_on_view_key_press_event_gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                             guint keyval,
                                                                                             guint keycode,
                                                                                             GdkModifierType state,
                                                                                             gpointer self)
{
	gboolean result;
	result = files_abstract_directory_view_on_view_key_press_event ((FilesAbstractDirectoryView*) self, keyval, keycode, state);
	return result;
}

static gboolean
___lambda129_ (FilesAbstractDirectoryView* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	_tmp1_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		gboolean _tmp3_;
		_tmp3_ = self->priv->_renaming;
		_tmp0_ = !_tmp3_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkEventControllerScroll* _tmp4_;
		_tmp4_ = self->scroll_controller;
		gtk_event_controller_scroll_set_flags (_tmp4_, GTK_EVENT_CONTROLLER_SCROLL_VERTICAL);
	}
	result = FALSE;
	return result;
}

static gboolean
____lambda129__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                     guint keyval,
                                                     guint keycode,
                                                     GdkModifierType state,
                                                     gpointer self)
{
	gboolean result;
	result = ___lambda129_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
___lambda130_ (FilesAbstractDirectoryView* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp1_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		gboolean _tmp3_;
		_tmp3_ = self->priv->_renaming;
		_tmp0_ = !_tmp3_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkEventControllerScroll* _tmp4_;
		_tmp4_ = self->scroll_controller;
		gtk_event_controller_scroll_set_flags (_tmp4_, GTK_EVENT_CONTROLLER_SCROLL_NONE);
	}
}

static void
____lambda130__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                      guint keyval,
                                                      guint keycode,
                                                      GdkModifierType state,
                                                      gpointer self)
{
	___lambda130_ ((FilesAbstractDirectoryView*) self);
}

static gboolean
___lambda131_ (FilesAbstractDirectoryView* self)
{
	gboolean result;
	result = self->priv->button_press_disabled;
	return result;
}

static gboolean
____lambda131__gtk_widget_button_press_event (GtkWidget* _sender,
                                              GdkEventButton* event,
                                              gpointer self)
{
	gboolean result;
	result = ___lambda131_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
_files_abstract_directory_view_on_view_button_press_event_gtk_gesture_multi_press_pressed (GtkGestureMultiPress* _sender,
                                                                                           gint n_press,
                                                                                           gdouble x,
                                                                                           gdouble y,
                                                                                           gpointer self)
{
	files_abstract_directory_view_on_view_button_press_event ((FilesAbstractDirectoryView*) self, n_press, x, y);
}

static void
_files_abstract_directory_view_on_view_button_release_event_gtk_gesture_multi_press_released (GtkGestureMultiPress* _sender,
                                                                                              gint n_press,
                                                                                              gdouble x,
                                                                                              gdouble y,
                                                                                              gpointer self)
{
	files_abstract_directory_view_on_view_button_release_event ((FilesAbstractDirectoryView*) self, n_press, x, y);
}

static void
_files_abstract_directory_view_on_motion_notify_event_gtk_event_controller_motion_motion (GtkEventControllerMotion* _sender,
                                                                                          gdouble x,
                                                                                          gdouble y,
                                                                                          gpointer self)
{
	files_abstract_directory_view_on_motion_notify_event ((FilesAbstractDirectoryView*) self, x, y);
}

static void
_files_abstract_directory_view_on_leave_notify_event_gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                                        gpointer self)
{
	files_abstract_directory_view_on_leave_notify_event ((FilesAbstractDirectoryView*) self);
}

FilesAbstractDirectoryView*
files_abstract_directory_view_construct (GType object_type,
                                         FilesViewSlot* _slot)
{
	FilesAbstractDirectoryView * self = NULL;
	GdkDisplay* _tmp0_;
	GdkCursor* _tmp1_;
	GdkDisplay* _tmp2_;
	GdkCursor* _tmp3_;
	GdkDisplay* _tmp4_;
	GdkCursor* _tmp5_;
	GtkScrolledWindow* _tmp6_ = NULL;
	FilesViewSlot* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	GtkLabel* _tmp10_ = NULL;
	GtkLabel* _tmp11_;
	GtkStyleContext* _tmp12_;
	GtkLabel* _tmp13_;
	GtkScrolledWindow* _tmp14_;
	GtkWidget* _tmp15_;
	GtkOverlay* _tmp16_ = NULL;
	GtkOverlay* _tmp17_;
	GtkLabel* _tmp18_;
	GtkOverlay* _tmp19_;
	GtkLabel* _tmp20_;
	GtkOverlay* _tmp21_;
	GtkOverlay* _tmp22_;
	FilesApplication* app = NULL;
	GApplication* _tmp23_;
	FilesApplication* _tmp24_;
	FilesApplication* _tmp25_;
	FilesClipboardManager* _tmp26_;
	FilesApplication* _tmp27_;
	GtkRecentManager* _tmp28_;
	FilesApplication* _tmp29_;
	gchar* _tmp30_;
	gchar** _tmp31_;
	gchar** _tmp32_;
	gint _tmp32__length1;
	FilesApplication* _tmp33_;
	gchar* _tmp34_;
	gchar** _tmp35_;
	gchar** _tmp36_;
	gint _tmp36__length1;
	FilesThumbnailer* _tmp37_;
	FilesThumbnailer* _tmp38_;
	FilesListModel* _tmp39_;
	GtkWidget* _tmp40_;
	GtkWidget* _tmp41_;
	FilesViewSlot* _tmp63_;
	FilesDirectory* _tmp64_;
	FilesDirectory* _tmp65_;
	g_return_val_if_fail (_slot != NULL, NULL);
	self = (FilesAbstractDirectoryView*) g_object_new (object_type, NULL);
	self->slot = _slot;
	_tmp0_ = gdk_display_get_default ();
	_tmp1_ = gdk_cursor_new_from_name (_tmp0_, "text");
	_g_object_unref0 (self->priv->editable_cursor);
	self->priv->editable_cursor = _tmp1_;
	_tmp2_ = gdk_display_get_default ();
	_tmp3_ = gdk_cursor_new_from_name (_tmp2_, "pointer");
	_g_object_unref0 (self->priv->activatable_cursor);
	self->priv->activatable_cursor = _tmp3_;
	_tmp4_ = gdk_display_get_default ();
	_tmp5_ = gdk_cursor_new_from_name (_tmp4_, "default");
	_g_object_unref0 (self->priv->selectable_cursor);
	self->priv->selectable_cursor = _tmp5_;
	_tmp6_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	gtk_scrolled_window_set_kinetic_scrolling (_tmp6_, TRUE);
	gtk_scrolled_window_set_overlay_scrolling (_tmp6_, TRUE);
	g_object_set (_tmp6_, "window-placement", GTK_CORNER_TOP_LEFT, NULL);
	gtk_scrolled_window_set_shadow_type (_tmp6_, GTK_SHADOW_NONE);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->scrolled_window);
	self->scrolled_window = _tmp6_;
	_tmp7_ = self->slot;
	_tmp8_ = files_view_slot_get_empty_message (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = (GtkLabel*) gtk_label_new (_tmp9_);
	gtk_widget_set_halign ((GtkWidget*) _tmp10_, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) _tmp10_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp10_, FALSE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp10_, FALSE);
	g_object_set (_tmp10_, "wrap", TRUE, NULL);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->empty_label);
	self->priv->empty_label = _tmp10_;
	_g_free0 (_tmp9_);
	_tmp11_ = self->priv->empty_label;
	_tmp12_ = gtk_widget_get_style_context ((GtkWidget*) _tmp11_);
	gtk_style_context_add_class (_tmp12_, GRANITE_STYLE_CLASS_H2_LABEL);
	_tmp13_ = self->priv->empty_label;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp13_, TRUE);
	_tmp14_ = self->scrolled_window;
	_tmp15_ = _g_object_ref0 ((GtkWidget*) _tmp14_);
	_tmp16_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp16_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp16_, TRUE);
	g_object_set ((GtkContainer*) _tmp16_, "child", _tmp15_, NULL);
	_g_object_unref0 (_tmp15_);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->overlay);
	self->priv->overlay = _tmp16_;
	_tmp17_ = self->priv->overlay;
	_tmp18_ = self->priv->empty_label;
	gtk_overlay_add_overlay (_tmp17_, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->overlay;
	_tmp20_ = self->priv->empty_label;
	gtk_overlay_set_overlay_pass_through (_tmp19_, (GtkWidget*) _tmp20_, TRUE);
	_tmp21_ = self->priv->overlay;
	gtk_widget_add_events ((GtkWidget*) _tmp21_, (gint) GDK_ALL_EVENTS_MASK);
	_tmp22_ = self->priv->overlay;
	g_object_set ((GtkContainer*) self, "child", (GtkWidget*) _tmp22_, NULL);
	_tmp23_ = g_application_get_default ();
	_tmp24_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, FILES_TYPE_APPLICATION, FilesApplication));
	app = _tmp24_;
	_tmp25_ = app;
	_tmp26_ = files_application_get_clipboard_manager (_tmp25_);
	self->priv->clipboard = _tmp26_;
	_tmp27_ = app;
	_tmp28_ = files_application_get_recent_manager (_tmp27_);
	self->recent = _tmp28_;
	_tmp29_ = app;
	_tmp30_ = g_strdup ("<Ctrl>A");
	_tmp31_ = g_new0 (gchar*, 1 + 1);
	_tmp31_[0] = _tmp30_;
	_tmp32_ = _tmp31_;
	_tmp32__length1 = 1;
	gtk_application_set_accels_for_action ((GtkApplication*) _tmp29_, "common.select-all", _tmp32_);
	_tmp32_ = (_vala_array_free (_tmp32_, _tmp32__length1, (GDestroyNotify) g_free), NULL);
	_tmp33_ = app;
	_tmp34_ = g_strdup ("<Shift><Ctrl>A");
	_tmp35_ = g_new0 (gchar*, 1 + 1);
	_tmp35_[0] = _tmp34_;
	_tmp36_ = _tmp35_;
	_tmp36__length1 = 1;
	gtk_application_set_accels_for_action ((GtkApplication*) _tmp33_, "selection.invert-selection", _tmp36_);
	_tmp36_ = (_vala_array_free (_tmp36_, _tmp36__length1, (GDestroyNotify) g_free), NULL);
	_tmp37_ = files_thumbnailer_get ();
	_g_object_unref0 (self->priv->thumbnailer);
	self->priv->thumbnailer = _tmp37_;
	_tmp38_ = self->priv->thumbnailer;
	g_signal_connect_object (_tmp38_, "finished", (GCallback) ___lambda119__files_thumbnailer_finished, self, 0);
	_tmp39_ = files_list_model_new ();
	_g_object_unref0 (self->model);
	self->model = _tmp39_;
	files_abstract_directory_view_set_up__menu_actions (self);
	files_abstract_directory_view_set_up_directory_view (self);
	_tmp40_ = files_abstract_directory_view_create_view (self);
	_g_object_unref0 (self->priv->view);
	self->priv->view = _tmp40_;
	_tmp41_ = self->priv->view;
	if (_tmp41_ != NULL) {
		GtkScrolledWindow* _tmp42_;
		GtkWidget* _tmp43_;
		GtkWidget* _tmp44_;
		GtkWidget* _tmp45_;
		GtkWidget* _tmp46_;
		GtkEventControllerScroll* _tmp47_ = NULL;
		GtkEventControllerScroll* _tmp48_;
		GtkWidget* _tmp49_;
		GtkEventControllerKey* _tmp50_ = NULL;
		GtkEventControllerKey* _tmp51_;
		GtkEventControllerKey* _tmp52_;
		GtkEventControllerKey* _tmp53_;
		GtkWidget* _tmp54_;
		GtkWidget* _tmp55_;
		GtkGestureMultiPress* _tmp56_ = NULL;
		GtkGestureMultiPress* _tmp57_;
		GtkGestureMultiPress* _tmp58_;
		GtkWidget* _tmp59_;
		GtkEventControllerMotion* _tmp60_ = NULL;
		GtkEventControllerMotion* _tmp61_;
		GtkEventControllerMotion* _tmp62_;
		_tmp42_ = self->scrolled_window;
		_tmp43_ = self->priv->view;
		g_object_set ((GtkContainer*) _tmp42_, "child", _tmp43_, NULL);
		_tmp44_ = self->priv->view;
		files_abstract_directory_view_connect_drag_drop_signals (self, _tmp44_);
		_tmp45_ = self->priv->view;
		g_signal_connect_object (_tmp45_, "realize", (GCallback) ____lambda128__gtk_widget_realize, self, 0);
		_tmp46_ = self->priv->view;
		_tmp47_ = (GtkEventControllerScroll*) gtk_event_controller_scroll_new (_tmp46_, GTK_EVENT_CONTROLLER_SCROLL_NONE);
		gtk_event_controller_set_propagation_phase ((GtkEventController*) _tmp47_, GTK_PHASE_CAPTURE);
		_g_object_unref0 (self->scroll_controller);
		self->scroll_controller = _tmp47_;
		_tmp48_ = self->scroll_controller;
		g_signal_connect_object (_tmp48_, "scroll", (GCallback) _files_abstract_directory_view_on_scroll_event_gtk_event_controller_scroll_scroll, self, 0);
		files_abstract_directory_view_enable_scroll (self, TRUE);
		_tmp49_ = self->priv->view;
		_tmp50_ = (GtkEventControllerKey*) gtk_event_controller_key_new (_tmp49_);
		gtk_event_controller_set_propagation_phase ((GtkEventController*) _tmp50_, GTK_PHASE_BUBBLE);
		_g_object_unref0 (self->key_controller);
		self->key_controller = _tmp50_;
		_tmp51_ = self->key_controller;
		g_signal_connect_object (_tmp51_, "key-pressed", (GCallback) _files_abstract_directory_view_on_view_key_press_event_gtk_event_controller_key_key_pressed, self, 0);
		_tmp52_ = self->key_controller;
		g_signal_connect_object (_tmp52_, "key-pressed", (GCallback) ____lambda129__gtk_event_controller_key_key_pressed, self, 0);
		_tmp53_ = self->key_controller;
		g_signal_connect_object (_tmp53_, "key-released", (GCallback) ____lambda130__gtk_event_controller_key_key_released, self, 0);
		_tmp54_ = self->priv->view;
		g_signal_connect_object (_tmp54_, "button-press-event", (GCallback) ____lambda131__gtk_widget_button_press_event, self, 0);
		_tmp55_ = self->priv->view;
		_tmp56_ = (GtkGestureMultiPress*) gtk_gesture_multi_press_new (_tmp55_);
		gtk_event_controller_set_propagation_phase ((GtkEventController*) _tmp56_, GTK_PHASE_TARGET);
		gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp56_, (guint) 0);
		_g_object_unref0 (self->button_controller);
		self->button_controller = _tmp56_;
		_tmp57_ = self->button_controller;
		g_signal_connect_object (_tmp57_, "pressed", (GCallback) _files_abstract_directory_view_on_view_button_press_event_gtk_gesture_multi_press_pressed, self, 0);
		_tmp58_ = self->button_controller;
		g_signal_connect_object (_tmp58_, "released", (GCallback) _files_abstract_directory_view_on_view_button_release_event_gtk_gesture_multi_press_released, self, 0);
		_tmp59_ = self->priv->view;
		_tmp60_ = (GtkEventControllerMotion*) gtk_event_controller_motion_new (_tmp59_);
		gtk_event_controller_set_propagation_phase ((GtkEventController*) _tmp60_, GTK_PHASE_CAPTURE);
		_g_object_unref0 (self->motion_controller);
		self->motion_controller = _tmp60_;
		_tmp61_ = self->motion_controller;
		g_signal_connect_object (_tmp61_, "motion", (GCallback) _files_abstract_directory_view_on_motion_notify_event_gtk_event_controller_motion_motion, self, 0);
		_tmp62_ = self->motion_controller;
		g_signal_connect_object (_tmp62_, "leave", (GCallback) _files_abstract_directory_view_on_leave_notify_event_gtk_event_controller_motion_leave, self, 0);
	}
	files_abstract_directory_view_freeze_tree (self);
	files_abstract_directory_view_set_up_zoom_level (self);
	_tmp63_ = self->slot;
	_tmp64_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp63_);
	_tmp65_ = _tmp64_;
	files_abstract_directory_view_connect_directory_handlers (self, _tmp65_);
	_g_object_unref0 (app);
	return self;
}

static void
_files_abstract_directory_view_on_name_edited_gtk_cell_renderer_text_edited (GtkCellRendererText* _sender,
                                                                             const gchar* path,
                                                                             const gchar* new_text,
                                                                             gpointer self)
{
	files_abstract_directory_view_on_name_edited ((FilesAbstractDirectoryView*) self, path, new_text);
}

static void
_files_abstract_directory_view_on_name_editing_canceled_gtk_cell_renderer_editing_canceled (GtkCellRenderer* _sender,
                                                                                            gpointer self)
{
	files_abstract_directory_view_on_name_editing_canceled ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_on_name_editing_started_gtk_cell_renderer_editing_started (GtkCellRenderer* _sender,
                                                                                          GtkCellEditable* editable,
                                                                                          const gchar* path,
                                                                                          gpointer self)
{
	files_abstract_directory_view_on_name_editing_started ((FilesAbstractDirectoryView*) self, editable, path);
}

void
files_abstract_directory_view_set_up_name_renderer (FilesAbstractDirectoryView* self)
{
	FilesTextRenderer* _tmp0_;
	FilesTextRenderer* _tmp1_;
	FilesTextRenderer* _tmp2_;
	FilesTextRenderer* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->name_renderer;
	g_object_set ((GtkCellRendererText*) _tmp0_, "editable", FALSE, NULL);
	_tmp1_ = self->name_renderer;
	g_signal_connect_object ((GtkCellRendererText*) _tmp1_, "edited", (GCallback) _files_abstract_directory_view_on_name_edited_gtk_cell_renderer_text_edited, self, 0);
	_tmp2_ = self->name_renderer;
	g_signal_connect_object ((GtkCellRenderer*) _tmp2_, "editing-canceled", (GCallback) _files_abstract_directory_view_on_name_editing_canceled_gtk_cell_renderer_editing_canceled, self, 0);
	_tmp3_ = self->name_renderer;
	g_signal_connect_object ((GtkCellRenderer*) _tmp3_, "editing-started", (GCallback) _files_abstract_directory_view_on_name_editing_started_gtk_cell_renderer_editing_started, self, 0);
}

static gboolean
_files_abstract_directory_view_on_popup_menu_gtk_widget_popup_menu (GtkWidget* _sender,
                                                                    gpointer self)
{
	gboolean result;
	result = files_abstract_directory_view_on_popup_menu ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
_files_abstract_directory_view_on_clipboard_changed_files_clipboard_manager_changed (FilesClipboardManager* _sender,
                                                                                     gpointer self)
{
	files_abstract_directory_view_on_clipboard_changed ((FilesAbstractDirectoryView*) self);
}

static void
__lambda120_ (FilesAbstractDirectoryView* self)
{
	FilesClipboardManager* _tmp0_;
	guint _tmp1_;
	_tmp0_ = self->priv->clipboard;
	g_signal_parse_name ("changed", FILES_TYPE_CLIPBOARD_MANAGER, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _files_abstract_directory_view_on_clipboard_changed_files_clipboard_manager_changed, self);
}

static void
___lambda120__gtk_widget_unrealize (GtkWidget* _sender,
                                    gpointer self)
{
	__lambda120_ ((FilesAbstractDirectoryView*) self);
}

static void
__lambda121_ (FilesAbstractDirectoryView* self)
{
	FilesClipboardManager* _tmp0_;
	_tmp0_ = self->priv->clipboard;
	g_signal_connect_object (_tmp0_, "changed", (GCallback) _files_abstract_directory_view_on_clipboard_changed_files_clipboard_manager_changed, self, 0);
	files_abstract_directory_view_on_clipboard_changed (self);
}

static void
___lambda121__gtk_widget_realize (GtkWidget* _sender,
                                  gpointer self)
{
	__lambda121_ ((FilesAbstractDirectoryView*) self);
}

static void
__lambda122_ (FilesAbstractDirectoryView* self)
{
	files_abstract_directory_view_schedule_thumbnail_color_tag_timeout (self);
}

static void
___lambda122__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                            gpointer self)
{
	__lambda122_ ((FilesAbstractDirectoryView*) self);
}

static void
__lambda123_ (FilesAbstractDirectoryView* self)
{
	GtkWidget* vscroll_bar = NULL;
	GtkScrolledWindow* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = self->scrolled_window;
	_tmp1_ = gtk_scrolled_window_get_vscrollbar (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	vscroll_bar = _tmp2_;
	_tmp3_ = self->priv->_renaming;
	gtk_widget_set_visible (vscroll_bar, !_tmp3_);
	_g_object_unref0 (vscroll_bar);
}

static void
___lambda123__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda123_ ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_on_show_hidden_files_changed_g_object_notify (GObject* _sender,
                                                                             GParamSpec* pspec,
                                                                             gpointer self)
{
	files_abstract_directory_view_on_show_hidden_files_changed ((FilesAbstractDirectoryView*) self, _sender, pspec);
}

static void
_files_abstract_directory_view_on_dateformat_changed_g_object_notify (GObject* _sender,
                                                                      GParamSpec* pspec,
                                                                      gpointer self)
{
	files_abstract_directory_view_on_dateformat_changed ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_on_show_thumbnails_changed_g_settings_changed (GSettings* _sender,
                                                                              const gchar* key,
                                                                              gpointer self)
{
	files_abstract_directory_view_on_show_thumbnails_changed ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_on_sort_directories_first_changed_g_settings_changed (GSettings* _sender,
                                                                                     const gchar* key,
                                                                                     gpointer self)
{
	files_abstract_directory_view_on_sort_directories_first_changed ((FilesAbstractDirectoryView*) self, _sender, key);
}

static void
_files_abstract_directory_view_on_row_deleted_gtk_tree_model_row_deleted (GtkTreeModel* _sender,
                                                                          GtkTreePath* path,
                                                                          gpointer self)
{
	files_abstract_directory_view_on_row_deleted ((FilesAbstractDirectoryView*) self, path);
}

static void
_files_abstract_directory_view_on_sort_column_changed_gtk_tree_sortable_sort_column_changed (GtkTreeSortable* _sender,
                                                                                             gpointer self)
{
	files_abstract_directory_view_on_sort_column_changed ((FilesAbstractDirectoryView*) self);
}

static void
files_abstract_directory_view_set_up_directory_view (FilesAbstractDirectoryView* self)
{
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	FilesPreferences* prefs = NULL;
	FilesPreferences* _tmp2_;
	GSettings* _tmp3_;
	GSettings* _tmp4_;
	GSettings* _tmp5_;
	GSettings* _tmp6_;
	FilesListModel* _tmp7_;
	GSettings* _tmp8_;
	FilesListModel* _tmp9_;
	FilesListModel* _tmp10_;
	g_return_if_fail (self != NULL);
	g_signal_connect_object ((GtkWidget*) self, "popup-menu", (GCallback) _files_abstract_directory_view_on_popup_menu_gtk_widget_popup_menu, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "unrealize", (GCallback) ___lambda120__gtk_widget_unrealize, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "realize", (GCallback) ___lambda121__gtk_widget_realize, self, 0);
	_tmp0_ = self->scrolled_window;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	g_signal_connect_object (_tmp1_, "value-changed", (GCallback) ___lambda122__gtk_adjustment_value_changed, self, G_CONNECT_AFTER);
	g_signal_connect_object ((GObject*) self, "notify::renaming", (GCallback) ___lambda123__g_object_notify, self, 0);
	_tmp2_ = files_preferences_get_default ();
	prefs = _tmp2_;
	g_signal_connect_object ((GObject*) prefs, "notify::show-hidden-files", (GCallback) _files_abstract_directory_view_on_show_hidden_files_changed_g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) prefs, "notify::date-format", (GCallback) _files_abstract_directory_view_on_dateformat_changed_g_object_notify, self, 0);
	_tmp3_ = files_abstract_directory_view_app_settings;
	g_settings_bind (_tmp3_, "singleclick-select", (GObject*) self, "singleclick_select", G_SETTINGS_BIND_DEFAULT);
	_tmp4_ = files_abstract_directory_view_app_settings;
	g_signal_connect_object (_tmp4_, "changed::show-remote-thumbnails", (GCallback) _files_abstract_directory_view_on_show_thumbnails_changed_g_settings_changed, self, 0);
	_tmp5_ = files_abstract_directory_view_app_settings;
	g_signal_connect_object (_tmp5_, "changed::show-local-thumbnails", (GCallback) _files_abstract_directory_view_on_show_thumbnails_changed_g_settings_changed, self, 0);
	_tmp6_ = files_abstract_directory_view_app_settings;
	g_signal_connect_object (_tmp6_, "changed::sort-directories-first", (GCallback) _files_abstract_directory_view_on_sort_directories_first_changed_g_settings_changed, self, 0);
	_tmp7_ = self->model;
	_tmp8_ = files_abstract_directory_view_app_settings;
	files_list_model_set_should_sort_directories_first (_tmp7_, g_settings_get_boolean (_tmp8_, "sort-directories-first"));
	_tmp9_ = self->model;
	g_signal_connect_object ((GtkTreeModel*) _tmp9_, "row-deleted", (GCallback) _files_abstract_directory_view_on_row_deleted_gtk_tree_model_row_deleted, self, 0);
	_tmp10_ = self->model;
	g_signal_connect_object ((GtkTreeSortable*) _tmp10_, "sort-column-changed", (GCallback) _files_abstract_directory_view_on_sort_column_changed_gtk_tree_sortable_sort_column_changed, self, 0);
	_g_object_unref0 (prefs);
}

static void
files_abstract_directory_view_set_up__menu_actions (FilesAbstractDirectoryView* self)
{
	GSimpleActionGroup* _tmp0_;
	GSimpleActionGroup* _tmp1_;
	GSimpleActionGroup* _tmp2_;
	GSimpleActionGroup* _tmp3_;
	GSimpleActionGroup* _tmp4_;
	GSimpleActionGroup* _tmp5_;
	GSimpleActionGroup* _tmp6_;
	GSimpleActionGroup* _tmp7_;
	GSimpleActionGroup* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_simple_action_group_new ();
	_g_object_unref0 (self->priv->selection_actions);
	self->priv->selection_actions = _tmp0_;
	_tmp1_ = self->priv->selection_actions;
	g_action_map_add_action_entries ((GActionMap*) _tmp1_, FILES_ABSTRACT_DIRECTORY_VIEW_SELECTION_ENTRIES, (gint) G_N_ELEMENTS (FILES_ABSTRACT_DIRECTORY_VIEW_SELECTION_ENTRIES), self);
	_tmp2_ = self->priv->selection_actions;
	gtk_widget_insert_action_group ((GtkWidget*) self, "selection", (GActionGroup*) _tmp2_);
	_tmp3_ = g_simple_action_group_new ();
	_g_object_unref0 (self->priv->background_actions);
	self->priv->background_actions = _tmp3_;
	_tmp4_ = self->priv->background_actions;
	g_action_map_add_action_entries ((GActionMap*) _tmp4_, FILES_ABSTRACT_DIRECTORY_VIEW_BACKGROUND_ENTRIES, (gint) G_N_ELEMENTS (FILES_ABSTRACT_DIRECTORY_VIEW_BACKGROUND_ENTRIES), self);
	_tmp5_ = self->priv->background_actions;
	gtk_widget_insert_action_group ((GtkWidget*) self, "background", (GActionGroup*) _tmp5_);
	_tmp6_ = g_simple_action_group_new ();
	_g_object_unref0 (self->priv->common_actions);
	self->priv->common_actions = _tmp6_;
	_tmp7_ = self->priv->common_actions;
	g_action_map_add_action_entries ((GActionMap*) _tmp7_, FILES_ABSTRACT_DIRECTORY_VIEW_COMMON_ENTRIES, (gint) G_N_ELEMENTS (FILES_ABSTRACT_DIRECTORY_VIEW_COMMON_ENTRIES), self);
	_tmp8_ = self->priv->common_actions;
	gtk_widget_insert_action_group ((GtkWidget*) self, "common", (GActionGroup*) _tmp8_);
}

void
files_abstract_directory_view_zoom_in (FilesAbstractDirectoryView* self)
{
	FilesZoomLevel _tmp0_;
	FilesZoomLevel _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = files_abstract_directory_view_get_zoom_level (self);
	_tmp1_ = _tmp0_;
	files_abstract_directory_view_set_zoom_level (self, _tmp1_ + 1);
}

void
files_abstract_directory_view_zoom_out (FilesAbstractDirectoryView* self)
{
	FilesZoomLevel _tmp0_;
	FilesZoomLevel _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = files_abstract_directory_view_get_zoom_level (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ > 0) {
		FilesZoomLevel _tmp2_;
		FilesZoomLevel _tmp3_;
		_tmp2_ = files_abstract_directory_view_get_zoom_level (self);
		_tmp3_ = _tmp2_;
		files_abstract_directory_view_set_zoom_level (self, _tmp3_ - 1);
	}
}

void
files_abstract_directory_view_zoom_normal (FilesAbstractDirectoryView* self)
{
	GSettings* view_settings = NULL;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = files_abstract_directory_view_get_view_settings (self);
	view_settings = _tmp0_;
	_tmp1_ = view_settings;
	if (_tmp1_ == NULL) {
		files_abstract_directory_view_set_zoom_level (self, FILES_ZOOM_LEVEL_NORMAL);
	} else {
		GSettings* _tmp2_;
		_tmp2_ = view_settings;
		files_abstract_directory_view_set_zoom_level (self, (FilesZoomLevel) g_settings_get_enum (_tmp2_, "default-zoom-level"));
	}
	_g_object_unref0 (view_settings);
}

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

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

static gboolean
___lambda52_ (Block16Data* _data16_)
{
	FilesAbstractDirectoryView* self;
	gboolean _tmp0_;
	gboolean result;
	self = _data16_->self;
	_tmp0_ = self->priv->_tree_frozen;
	if (!_tmp0_) {
		GtkTreePath* _tmp1_;
		GtkTreePath* _tmp2_;
		self->priv->set_cursor_timeout_id = (guint) 0;
		_tmp1_ = gtk_tree_path_new_from_indices (0, -1);
		_tmp2_ = _tmp1_;
		files_abstract_directory_view_set_cursor (self, _tmp2_, FALSE, _data16_->select, TRUE);
		__vala_GtkTreePath_free0 (_tmp2_);
		result = G_SOURCE_REMOVE;
		return result;
	} else {
		result = G_SOURCE_CONTINUE;
		return result;
	}
}

static gboolean
____lambda52__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda52_ (self);
	return result;
}

void
files_abstract_directory_view_focus_first_for_empty_selection (FilesAbstractDirectoryView* self,
                                                               gboolean select)
{
	Block16Data* _data16_;
	GList* _tmp0_;
	g_return_if_fail (self != NULL);
	_data16_ = g_slice_new0 (Block16Data);
	_data16_->_ref_count_ = 1;
	_data16_->self = g_object_ref (self);
	_data16_->select = select;
	_tmp0_ = self->selected_files;
	if (_tmp0_ == NULL) {
		self->priv->set_cursor_timeout_id = g_idle_add_full (G_PRIORITY_LOW, ____lambda52__gsource_func, block16_data_ref (_data16_), block16_data_unref);
	}
	block16_data_unref (_data16_);
	_data16_ = NULL;
}

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

static void
block17_data_unref (void * _userdata_)
{
	Block17Data* _data17_;
	_data17_ = (Block17Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data17_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data17_->self;
		_g_object_unref0 (_data17_->focus_after_select);
		_g_object_unref0 (_data17_->files_to_select_list);
		_g_object_unref0 (self);
		g_slice_free (Block17Data, _data17_);
	}
}

static void
__lambda50_ (Block17Data* _data17_,
             GFile* loc)
{
	FilesAbstractDirectoryView* self;
	GeeLinkedList* _tmp0_;
	FilesFile* _tmp1_;
	FilesFile* _tmp2_;
	self = _data17_->self;
	g_return_if_fail (loc != NULL);
	_tmp0_ = _data17_->files_to_select_list;
	_tmp1_ = files_file_get (loc);
	_tmp2_ = _tmp1_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
___lambda50__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda50_ (self, (GFile*) data);
}

static void
___lambda51_ (Block17Data* _data17_)
{
	FilesAbstractDirectoryView* self;
	GeeLinkedList* _tmp0_;
	GFile* _tmp1_;
	self = _data17_->self;
	_tmp0_ = _data17_->files_to_select_list;
	_tmp1_ = _data17_->focus_after_select;
	files_abstract_directory_view_select_files_and_update_if_thawed (self, _tmp0_, _tmp1_);
}

static void
____lambda51__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	___lambda51_ (self);
}

void
files_abstract_directory_view_select_glib_files_when_thawed (FilesAbstractDirectoryView* self,
                                                             GList* location_list,
                                                             GFile* focus_location)
{
	Block17Data* _data17_;
	GeeLinkedList* _tmp0_;
	GFile* _tmp1_ = NULL;
	GFile* _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	_data17_ = g_slice_new0 (Block17Data);
	_data17_->_ref_count_ = 1;
	_data17_->self = g_object_ref (self);
	_tmp0_ = gee_linked_list_new (FILES_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_data17_->files_to_select_list = _tmp0_;
	g_list_foreach (location_list, ___lambda50__gfunc, _data17_);
	if (focus_location != NULL) {
		GFile* _tmp2_;
		_tmp2_ = g_file_dup (focus_location);
		_g_object_unref0 (_tmp1_);
		_tmp1_ = _tmp2_;
	} else {
		_g_object_unref0 (_tmp1_);
		_tmp1_ = NULL;
	}
	_tmp3_ = _tmp1_;
	_tmp1_ = NULL;
	_data17_->focus_after_select = _tmp3_;
	_tmp4_ = self->priv->_tree_frozen;
	if (_tmp4_) {
		gulong _tmp5_;
		_tmp5_ = g_signal_connect_data ((GObject*) self, "notify::tree-frozen", (GCallback) ____lambda51__g_object_notify, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
		self->priv->select_source_handler = _tmp5_;
	} else {
		GeeLinkedList* _tmp6_;
		GFile* _tmp7_;
		_tmp6_ = _data17_->files_to_select_list;
		_tmp7_ = _data17_->focus_after_select;
		files_abstract_directory_view_select_files_and_update_if_thawed (self, _tmp6_, _tmp7_);
	}
	_g_object_unref0 (_tmp1_);
	block17_data_unref (_data17_);
	_data17_ = NULL;
}

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

static void
files_abstract_directory_view_select_files_and_update_if_thawed (FilesAbstractDirectoryView* self,
                                                                 GeeLinkedList* files_to_select,
                                                                 GFile* focus_file)
{
	gboolean _tmp0_;
	guint count = 0U;
	GtkTreeIter* iter = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (files_to_select != NULL);
	_tmp0_ = self->priv->_tree_frozen;
	if (_tmp0_) {
		return;
	}
	if (self->priv->set_cursor_timeout_id > ((guint) 0)) {
		g_source_remove (self->priv->set_cursor_timeout_id);
		self->priv->set_cursor_timeout_id = (guint) 0;
	}
	if (self->priv->select_source_handler > ((gulong) 0)) {
		g_signal_handler_disconnect ((GObject*) self, self->priv->select_source_handler);
		self->priv->select_source_handler = (gulong) 0;
	}
	files_abstract_directory_view_disconnect_tree_signals (self);
	files_abstract_directory_view_unselect_all (self);
	count = (guint) 0;
	{
		GeeLinkedList* _f_list = NULL;
		gint _f_size = 0;
		GeeLinkedList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _f_index = 0;
		_f_list = files_to_select;
		_tmp1_ = _f_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_f_size = _tmp3_;
		_f_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			FilesFile* f = NULL;
			GeeLinkedList* _tmp6_;
			gpointer _tmp7_;
			GtkTreePath* path = NULL;
			FilesListModel* _tmp8_;
			FilesFile* _tmp9_;
			GtkTreePath* _tmp10_;
			GtkTreePath* _tmp11_;
			_f_index = _f_index + 1;
			_tmp4_ = _f_index;
			_tmp5_ = _f_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _f_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _f_index);
			f = (FilesFile*) _tmp7_;
			_tmp8_ = self->model;
			_tmp9_ = f;
			_tmp10_ = files_list_model_get_path_for_first_file (_tmp8_, _tmp9_);
			path = _tmp10_;
			_tmp11_ = path;
			if (_tmp11_ != NULL) {
				guint _tmp12_;
				gboolean _tmp13_ = FALSE;
				GtkTreePath* _tmp17_;
				_tmp12_ = count;
				count = _tmp12_ + 1;
				if (focus_file != NULL) {
					FilesFile* _tmp14_;
					GFile* _tmp15_;
					GFile* _tmp16_;
					_tmp14_ = f;
					_tmp15_ = files_file_get_location (_tmp14_);
					_tmp16_ = _tmp15_;
					_tmp13_ = g_file_equal (focus_file, _tmp16_);
				} else {
					_tmp13_ = FALSE;
				}
				_tmp17_ = path;
				files_abstract_directory_view_select_path (self, _tmp17_, _tmp13_);
			}
			__vala_GtkTreePath_free0 (path);
			_g_object_unref0 (f);
		}
	}
	if (count == ((guint) 0)) {
		files_abstract_directory_view_focus_first_for_empty_selection (self, FALSE);
	}
	files_abstract_directory_view_connect_tree_signals (self);
	files_abstract_directory_view_on_view_selection_changed (self);
	files_abstract_directory_view_update_selected_files_and_menu (self);
	__vala_GtkTreeIter_free0 (iter);
}

GList*
files_abstract_directory_view_get_open_with_apps (FilesAbstractDirectoryView* self)
{
	GList* _tmp0_;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->open_with_apps;
	result = _tmp0_;
	return result;
}

GAppInfo*
files_abstract_directory_view_get_default_app (FilesAbstractDirectoryView* self)
{
	GAppInfo* _tmp0_;
	GAppInfo* _tmp1_;
	GAppInfo* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->default_app;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

void
files_abstract_directory_view_grab_focus (FilesAbstractDirectoryView* self)
{
	GtkWidget* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->view;
	if (gtk_widget_get_realized (_tmp0_)) {
		FilesViewSlot* _tmp1_;
		gboolean _tmp2_;
		gboolean _tmp3_;
		GtkWidget* _tmp4_;
		_tmp1_ = self->slot;
		_tmp2_ = files_view_slot_get_is_active (_tmp1_);
		_tmp3_ = _tmp2_;
		if (!_tmp3_) {
			files_abstract_directory_view_set_active_slot (self, TRUE);
		}
		_tmp4_ = self->priv->view;
		gtk_widget_grab_focus (_tmp4_);
	}
}

GList*
files_abstract_directory_view_get_selected_files (FilesAbstractDirectoryView* self)
{
	GList* _tmp0_;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	files_abstract_directory_view_update_selected_files_and_menu (self);
	_tmp0_ = self->selected_files;
	result = _tmp0_;
	return result;
}

/*** Protected Methods */
void
files_abstract_directory_view_set_active_slot (FilesAbstractDirectoryView* self,
                                               gboolean scroll)
{
	FilesViewSlot* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->slot;
	g_signal_emit_by_name ((FilesAbstractSlot*) _tmp0_, "active", scroll, TRUE);
}

void
files_abstract_directory_view_load_location (FilesAbstractDirectoryView* self,
                                             GFile* location)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (location != NULL);
	g_signal_emit (self, files_abstract_directory_view_signals[FILES_ABSTRACT_DIRECTORY_VIEW_PATH_CHANGE_REQUEST_SIGNAL], 0, location, FILES_OPEN_FLAG_DEFAULT, FALSE);
}

void
files_abstract_directory_view_load_root_location (FilesAbstractDirectoryView* self,
                                                  GFile* location)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (location != NULL);
	g_signal_emit (self, files_abstract_directory_view_signals[FILES_ABSTRACT_DIRECTORY_VIEW_PATH_CHANGE_REQUEST_SIGNAL], 0, location, FILES_OPEN_FLAG_DEFAULT, TRUE);
}

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

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

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

static void
block19_data_unref (void * _userdata_)
{
	Block19Data* _data19_;
	_data19_ = (Block19Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data19_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data19_->_data18_->self;
		_g_object_unref0 (_data19_->file);
		block18_data_unref (_data19_->_data18_);
		_data19_->_data18_ = NULL;
		g_slice_free (Block19Data, _data19_);
	}
}

static gboolean
_______lambda80_ (Block19Data* _data19_)
{
	Block18Data* _data18_;
	FilesAbstractDirectoryView* self;
	FilesFile* _tmp0_;
	GdkScreen* _tmp1_;
	gboolean result;
	_data18_ = _data19_->_data18_;
	self = _data18_->self;
	_tmp0_ = _data19_->file;
	_tmp1_ = _data18_->screen;
	files_abstract_directory_view_activate_file (self, _tmp0_, _tmp1_, _data18_->flag, FALSE);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
________lambda80__gsource_func (gpointer self)
{
	gboolean result;
	result = _______lambda80_ (self);
	return result;
}

static gboolean
_______lambda81_ (Block19Data* _data19_)
{
	Block18Data* _data18_;
	FilesAbstractDirectoryView* self;
	FilesFile* _tmp0_;
	GdkScreen* _tmp1_;
	gboolean result;
	_data18_ = _data19_->_data18_;
	self = _data18_->self;
	_tmp0_ = _data19_->file;
	_tmp1_ = _data18_->screen;
	files_abstract_directory_view_open_file (self, _tmp0_, _tmp1_, NULL);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
________lambda81__gsource_func (gpointer self)
{
	gboolean result;
	result = _______lambda81_ (self);
	return result;
}

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

static void
block20_data_unref (void * _userdata_)
{
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data20_->_data18_->self;
		(_data20_->files_to_open == NULL) ? NULL : (_data20_->files_to_open = (_g_list_free__g_object_unref0_ (_data20_->files_to_open), NULL));
		block18_data_unref (_data20_->_data18_);
		_data20_->_data18_ = NULL;
		g_slice_free (Block20Data, _data20_);
	}
}

static gboolean
_____lambda82_ (Block20Data* _data20_)
{
	Block18Data* _data18_;
	FilesAbstractDirectoryView* self;
	GAppInfo* _tmp0_;
	GList* _tmp1_;
	gboolean result;
	_data18_ = _data20_->_data18_;
	self = _data18_->self;
	_tmp0_ = self->priv->default_app;
	_tmp1_ = _data20_->files_to_open;
	files_abstract_directory_view_open_files_with (self, _tmp0_, _tmp1_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
______lambda82__gsource_func (gpointer self)
{
	gboolean result;
	result = _____lambda82_ (self);
	return result;
}

void
files_abstract_directory_view_activate_selected_items (FilesAbstractDirectoryView* self,
                                                       FilesOpenFlag flag,
                                                       GList* selection)
{
	Block18Data* _data18_;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GdkScreen* _tmp3_;
	GList* _tmp4_;
	GList* _tmp5_;
	g_return_if_fail (self != NULL);
	_data18_ = g_slice_new0 (Block18Data);
	_data18_->_ref_count_ = 1;
	_data18_->self = g_object_ref (self);
	_data18_->flag = flag;
	_tmp1_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = selection == NULL;
	}
	if (_tmp0_) {
		block18_data_unref (_data18_);
		_data18_ = NULL;
		return;
	}
	_tmp3_ = gtk_widget_get_screen ((GtkWidget*) self);
	_data18_->screen = _tmp3_;
	_tmp4_ = g_list_first (selection);
	_tmp5_ = _tmp4_->next;
	if (_tmp5_ == NULL) {
		gconstpointer _tmp6_;
		GdkScreen* _tmp7_;
		_tmp6_ = selection->data;
		_tmp7_ = _data18_->screen;
		files_abstract_directory_view_activate_file (self, (FilesFile*) _tmp6_, _tmp7_, _data18_->flag, TRUE);
		block18_data_unref (_data18_);
		_data18_ = NULL;
		return;
	}
	if (!self->priv->in_trash) {
		gboolean _tmp8_ = FALSE;
		gconstpointer _tmp9_;
		_tmp9_ = g_list_nth_data (selection, (guint) 11);
		if (((FilesFile*) _tmp9_) == NULL) {
			gboolean _tmp10_ = FALSE;
			GAppInfo* _tmp11_;
			_tmp11_ = self->priv->default_app;
			if (_tmp11_ == NULL) {
				_tmp10_ = TRUE;
			} else {
				GAppInfo* _tmp12_;
				_tmp12_ = self->priv->default_app;
				_tmp10_ = files_abstract_directory_view_app_is_this_app (self, _tmp12_);
			}
			_tmp8_ = _tmp10_;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			{
				GList* file_collection = NULL;
				GList* file_it = NULL;
				file_collection = selection;
				for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
					FilesFile* _tmp13_;
					FilesFile* file = NULL;
					_tmp13_ = _g_object_ref0 ((FilesFile*) file_it->data);
					file = _tmp13_;
					{
						Block19Data* _data19_;
						FilesFile* _tmp14_;
						_data19_ = g_slice_new0 (Block19Data);
						_data19_->_ref_count_ = 1;
						_data19_->_data18_ = block18_data_ref (_data18_);
						_data19_->file = file;
						_tmp14_ = _data19_->file;
						if (files_file_is_folder (_tmp14_)) {
							if (_data18_->flag == FILES_OPEN_FLAG_DEFAULT) {
								_data18_->flag = FILES_OPEN_FLAG_NEW_TAB;
							}
							g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ________lambda80__gsource_func, block19_data_ref (_data19_), block19_data_unref);
						} else {
							g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ________lambda81__gsource_func, block19_data_ref (_data19_), block19_data_unref);
						}
						block19_data_unref (_data19_);
						_data19_ = NULL;
					}
				}
			}
		} else {
			GAppInfo* _tmp15_;
			_tmp15_ = self->priv->default_app;
			if (_tmp15_ != NULL) {
				Block20Data* _data20_;
				GList* _tmp16_;
				_data20_ = g_slice_new0 (Block20Data);
				_data20_->_ref_count_ = 1;
				_data20_->_data18_ = block18_data_ref (_data18_);
				_tmp16_ = g_list_copy_deep (selection, (GCopyFunc) g_object_ref, NULL);
				_data20_->files_to_open = _tmp16_;
				g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ______lambda82__gsource_func, block20_data_ref (_data20_), block20_data_unref);
				block20_data_unref (_data20_);
				_data20_ = NULL;
			}
		}
	} else {
		g_warning ("AbstractDirectoryView.vala:672: Cannot open files in trash");
	}
	block18_data_unref (_data18_);
	_data18_ = NULL;
}

void
files_abstract_directory_view_select_gof_file (FilesAbstractDirectoryView* self,
                                               FilesFile* file)
{
	GtkTreePath* path = NULL;
	FilesListModel* _tmp0_;
	GtkTreePath* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = self->model;
	_tmp1_ = files_list_model_get_path_for_first_file (_tmp0_, file);
	path = _tmp1_;
	files_abstract_directory_view_set_cursor (self, path, FALSE, TRUE, FALSE);
	__vala_GtkTreePath_free0 (path);
}

void
files_abstract_directory_view_select_and_scroll_to_gof_file (FilesAbstractDirectoryView* self,
                                                             FilesFile* file)
{
	GtkTreePath* path = NULL;
	FilesListModel* _tmp0_;
	GtkTreePath* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = self->model;
	_tmp1_ = files_list_model_get_path_for_first_file (_tmp0_, file);
	path = _tmp1_;
	files_abstract_directory_view_set_cursor (self, path, FALSE, TRUE, TRUE);
	__vala_GtkTreePath_free0 (path);
}

void
files_abstract_directory_view_add_gof_file_to_selection (FilesAbstractDirectoryView* self,
                                                         FilesFile* file)
{
	FilesListModel* _tmp0_;
	GtkTreePath* _tmp1_;
	GtkTreePath* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = self->model;
	_tmp1_ = files_list_model_get_path_for_first_file (_tmp0_, file);
	_tmp2_ = _tmp1_;
	files_abstract_directory_view_select_path (self, _tmp2_, FALSE);
	__vala_GtkTreePath_free0 (_tmp2_);
}

/** Directory signal handlers. */
static void
_files_abstract_directory_view_on_directory_file_added_files_directory_file_added (FilesDirectory* _sender,
                                                                                   FilesFile* file,
                                                                                   gboolean is_internal,
                                                                                   gpointer self)
{
	files_abstract_directory_view_on_directory_file_added ((FilesAbstractDirectoryView*) self, _sender, file, is_internal);
}

static void
_files_abstract_directory_view_on_directory_file_changed_files_directory_file_changed (FilesDirectory* _sender,
                                                                                       FilesFile* file,
                                                                                       gpointer self)
{
	files_abstract_directory_view_on_directory_file_changed ((FilesAbstractDirectoryView*) self, _sender, file);
}

static void
_files_abstract_directory_view_on_directory_file_deleted_files_directory_file_deleted (FilesDirectory* _sender,
                                                                                       FilesFile* file,
                                                                                       gpointer self)
{
	files_abstract_directory_view_on_directory_file_deleted ((FilesAbstractDirectoryView*) self, _sender, file);
}

static void
_files_abstract_directory_view_on_directory_file_icon_changed_files_directory_icon_changed (FilesDirectory* _sender,
                                                                                            FilesFile* file,
                                                                                            gpointer self)
{
	files_abstract_directory_view_on_directory_file_icon_changed ((FilesAbstractDirectoryView*) self, _sender, file);
}

void
files_abstract_directory_view_connect_directory_handlers (FilesAbstractDirectoryView* self,
                                                          FilesDirectory* dir)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	g_signal_connect_object (dir, "file-added", (GCallback) _files_abstract_directory_view_on_directory_file_added_files_directory_file_added, self, 0);
	g_signal_connect_object (dir, "file-changed", (GCallback) _files_abstract_directory_view_on_directory_file_changed_files_directory_file_changed, self, 0);
	g_signal_connect_object (dir, "file-deleted", (GCallback) _files_abstract_directory_view_on_directory_file_deleted_files_directory_file_deleted, self, 0);
	g_signal_connect_object (dir, "icon-changed", (GCallback) _files_abstract_directory_view_on_directory_file_icon_changed_files_directory_icon_changed, self, 0);
	files_abstract_directory_view_connect_directory_loading_handlers (self, dir);
}

static void
_files_abstract_directory_view_on_directory_file_loaded_files_directory_file_loaded (FilesDirectory* _sender,
                                                                                     FilesFile* file,
                                                                                     gpointer self)
{
	files_abstract_directory_view_on_directory_file_loaded ((FilesAbstractDirectoryView*) self, _sender, file);
}

static void
_files_abstract_directory_view_on_directory_done_loading_files_directory_done_loading (FilesDirectory* _sender,
                                                                                       gpointer self)
{
	files_abstract_directory_view_on_directory_done_loading ((FilesAbstractDirectoryView*) self, _sender);
}

void
files_abstract_directory_view_connect_directory_loading_handlers (FilesAbstractDirectoryView* self,
                                                                  FilesDirectory* dir)
{
	FilesListModel* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	_tmp0_ = self->model;
	files_list_model_set_sorting_off (_tmp0_);
	g_signal_connect_object (dir, "file-loaded", (GCallback) _files_abstract_directory_view_on_directory_file_loaded_files_directory_file_loaded, self, 0);
	g_signal_connect_object (dir, "done-loading", (GCallback) _files_abstract_directory_view_on_directory_done_loading_files_directory_done_loading, self, 0);
}

void
files_abstract_directory_view_disconnect_directory_loading_handlers (FilesAbstractDirectoryView* self,
                                                                     FilesDirectory* dir)
{
	FilesListModel* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	_tmp0_ = self->model;
	files_list_model_set_sorting_on (_tmp0_);
	g_signal_parse_name ("file-loaded", FILES_TYPE_DIRECTORY, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (dir, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _files_abstract_directory_view_on_directory_file_loaded_files_directory_file_loaded, self);
	g_signal_parse_name ("done-loading", FILES_TYPE_DIRECTORY, &_tmp2_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (dir, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _files_abstract_directory_view_on_directory_done_loading_files_directory_done_loading, self);
}

void
files_abstract_directory_view_disconnect_directory_handlers (FilesAbstractDirectoryView* self,
                                                             FilesDirectory* dir)
{
	guint _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	guint _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	if (files_directory_is_loading (dir)) {
		files_abstract_directory_view_disconnect_directory_loading_handlers (self, dir);
	}
	g_signal_parse_name ("file-added", FILES_TYPE_DIRECTORY, &_tmp0_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (dir, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _files_abstract_directory_view_on_directory_file_added_files_directory_file_added, self);
	g_signal_parse_name ("file-changed", FILES_TYPE_DIRECTORY, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (dir, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _files_abstract_directory_view_on_directory_file_changed_files_directory_file_changed, self);
	g_signal_parse_name ("file-deleted", FILES_TYPE_DIRECTORY, &_tmp2_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (dir, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _files_abstract_directory_view_on_directory_file_deleted_files_directory_file_deleted, self);
	g_signal_parse_name ("icon-changed", FILES_TYPE_DIRECTORY, &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (dir, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _files_abstract_directory_view_on_directory_file_icon_changed_files_directory_icon_changed, self);
	g_signal_parse_name ("done-loading", FILES_TYPE_DIRECTORY, &_tmp4_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (dir, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _files_abstract_directory_view_on_directory_done_loading_files_directory_done_loading, self);
}

void
files_abstract_directory_view_change_directory (FilesAbstractDirectoryView* self,
                                                FilesDirectory* old_dir,
                                                FilesDirectory* new_dir)
{
	GtkStyleContext* style_context = NULL;
	GtkStyleContext* _tmp0_;
	GtkStyleContext* _tmp1_;
	GtkStyleContext* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (old_dir != NULL);
	g_return_if_fail (new_dir != NULL);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	style_context = _tmp1_;
	_tmp2_ = style_context;
	if (gtk_style_context_has_class (_tmp2_, GRANITE_STYLE_CLASS_H2_LABEL)) {
		GtkStyleContext* _tmp3_;
		GtkStyleContext* _tmp4_;
		_tmp3_ = style_context;
		gtk_style_context_remove_class (_tmp3_, GRANITE_STYLE_CLASS_H2_LABEL);
		_tmp4_ = style_context;
		gtk_style_context_remove_class (_tmp4_, GTK_STYLE_CLASS_VIEW);
	}
	files_abstract_directory_view_cancel (self);
	files_abstract_directory_view_clear (self);
	files_abstract_directory_view_disconnect_directory_handlers (self, old_dir);
	files_abstract_directory_view_connect_directory_handlers (self, new_dir);
	_g_object_unref0 (style_context);
}

void
files_abstract_directory_view_prepare_reload (FilesAbstractDirectoryView* self,
                                              FilesDirectory* dir)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	files_abstract_directory_view_cancel (self);
	files_abstract_directory_view_clear (self);
	files_abstract_directory_view_connect_directory_loading_handlers (self, dir);
}

static void
files_abstract_directory_view_clear (FilesAbstractDirectoryView* self)
{
	FilesListModel* _tmp0_;
	g_return_if_fail (self != NULL);
	files_abstract_directory_view_freeze_tree (self);
	files_abstract_directory_view_block_model (self);
	_tmp0_ = self->model;
	files_list_model_clear (_tmp0_);
	self->priv->all_selected = FALSE;
	self->on_directory = FALSE;
	files_abstract_directory_view_unblock_model (self);
}

static gboolean
_files_abstract_directory_view_on_drag_drop_gtk_widget_drag_drop (GtkWidget* _sender,
                                                                  GdkDragContext* context,
                                                                  gint x,
                                                                  gint y,
                                                                  guint time_,
                                                                  gpointer self)
{
	gboolean result;
	result = files_abstract_directory_view_on_drag_drop ((FilesAbstractDirectoryView*) self, context, x, y, time_);
	return result;
}

static void
_files_abstract_directory_view_on_drag_data_received_gtk_widget_drag_data_received (GtkWidget* _sender,
                                                                                    GdkDragContext* context,
                                                                                    gint x,
                                                                                    gint y,
                                                                                    GtkSelectionData* selection_data,
                                                                                    guint info,
                                                                                    guint time_,
                                                                                    gpointer self)
{
	files_abstract_directory_view_on_drag_data_received ((FilesAbstractDirectoryView*) self, context, x, y, selection_data, info, time_);
}

static void
_files_abstract_directory_view_on_drag_leave_gtk_widget_drag_leave (GtkWidget* _sender,
                                                                    GdkDragContext* context,
                                                                    guint time_,
                                                                    gpointer self)
{
	files_abstract_directory_view_on_drag_leave ((FilesAbstractDirectoryView*) self);
}

static gboolean
_files_abstract_directory_view_on_drag_motion_gtk_widget_drag_motion (GtkWidget* _sender,
                                                                      GdkDragContext* context,
                                                                      gint x,
                                                                      gint y,
                                                                      guint time_,
                                                                      gpointer self)
{
	gboolean result;
	result = files_abstract_directory_view_on_drag_motion ((FilesAbstractDirectoryView*) self, context, x, y, time_);
	return result;
}

static void
_files_abstract_directory_view_on_drag_begin_gtk_widget_drag_begin (GtkWidget* _sender,
                                                                    GdkDragContext* context,
                                                                    gpointer self)
{
	files_abstract_directory_view_on_drag_begin ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_on_drag_data_get_gtk_widget_drag_data_get (GtkWidget* _sender,
                                                                          GdkDragContext* context,
                                                                          GtkSelectionData* selection_data,
                                                                          guint info,
                                                                          guint time_,
                                                                          gpointer self)
{
	files_abstract_directory_view_on_drag_data_get ((FilesAbstractDirectoryView*) self, context, selection_data, info, time_);
}

static void
_files_abstract_directory_view_on_drag_data_delete_gtk_widget_drag_data_delete (GtkWidget* _sender,
                                                                                GdkDragContext* context,
                                                                                gpointer self)
{
	files_abstract_directory_view_on_drag_data_delete ((FilesAbstractDirectoryView*) self);
}

static void
_files_abstract_directory_view_on_drag_end_gtk_widget_drag_end (GtkWidget* _sender,
                                                                GdkDragContext* context,
                                                                gpointer self)
{
	files_abstract_directory_view_on_drag_end ((FilesAbstractDirectoryView*) self);
}

void
files_abstract_directory_view_connect_drag_drop_signals (FilesAbstractDirectoryView* self,
                                                         GtkWidget* widget)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	gtk_drag_dest_set (widget, GTK_DEST_DEFAULT_MOTION, FILES_ABSTRACT_DIRECTORY_VIEW_DROP_TARGETS, (gint) G_N_ELEMENTS (FILES_ABSTRACT_DIRECTORY_VIEW_DROP_TARGETS), GDK_ACTION_ASK | FILES_ABSTRACT_DIRECTORY_VIEW_FILE_DRAG_ACTIONS);
	g_signal_connect_object (widget, "drag-drop", (GCallback) _files_abstract_directory_view_on_drag_drop_gtk_widget_drag_drop, self, 0);
	g_signal_connect_object (widget, "drag-data-received", (GCallback) _files_abstract_directory_view_on_drag_data_received_gtk_widget_drag_data_received, self, 0);
	g_signal_connect_object (widget, "drag-leave", (GCallback) _files_abstract_directory_view_on_drag_leave_gtk_widget_drag_leave, self, 0);
	g_signal_connect_object (widget, "drag-motion", (GCallback) _files_abstract_directory_view_on_drag_motion_gtk_widget_drag_motion, self, 0);
	gtk_drag_source_set (widget, GDK_BUTTON1_MASK | GDK_CONTROL_MASK, FILES_ABSTRACT_DIRECTORY_VIEW_DRAG_TARGETS, (gint) G_N_ELEMENTS (FILES_ABSTRACT_DIRECTORY_VIEW_DRAG_TARGETS), FILES_ABSTRACT_DIRECTORY_VIEW_FILE_DRAG_ACTIONS);
	g_signal_connect_object (widget, "drag-begin", (GCallback) _files_abstract_directory_view_on_drag_begin_gtk_widget_drag_begin, self, 0);
	g_signal_connect_object (widget, "drag-data-get", (GCallback) _files_abstract_directory_view_on_drag_data_get_gtk_widget_drag_data_get, self, 0);
	g_signal_connect_object (widget, "drag-data-delete", (GCallback) _files_abstract_directory_view_on_drag_data_delete_gtk_widget_drag_data_delete, self, 0);
	g_signal_connect_object (widget, "drag-end", (GCallback) _files_abstract_directory_view_on_drag_end_gtk_widget_drag_end, self, 0);
}

void
files_abstract_directory_view_cancel_thumbnailing (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->thumbnail_request >= 0) {
		FilesThumbnailer* _tmp0_;
		_tmp0_ = self->priv->thumbnailer;
		files_thumbnailer_dequeue (_tmp0_, self->priv->thumbnail_request);
		self->priv->thumbnail_request = -1;
	}
	files_abstract_directory_view_cancel_timeout (self, &self->priv->thumbnail_source_id);
}

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

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

static void
__lambda48_ (Block21Data* _data21_,
             FilesFile* file)
{
	FilesAbstractDirectoryView* self;
	gboolean _tmp0_ = FALSE;
	self = _data21_->self;
	g_return_if_fail (file != NULL);
	if (files_file_is_folder (file)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = files_file_is_root_network_folder (file);
	}
	if (!_tmp0_) {
		_data21_->only_folders = FALSE;
	}
}

static void
___lambda48__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda48_ (self, (FilesFile*) data);
}

gboolean
files_abstract_directory_view_selection_only_contains_folders (FilesAbstractDirectoryView* self,
                                                               GList* list)
{
	Block21Data* _data21_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_data21_ = g_slice_new0 (Block21Data);
	_data21_->_ref_count_ = 1;
	_data21_->self = g_object_ref (self);
	_data21_->only_folders = TRUE;
	g_list_foreach (list, ___lambda48__gfunc, _data21_);
	result = _data21_->only_folders;
	block21_data_unref (_data21_);
	_data21_ = NULL;
	return result;
}

GList*
files_abstract_directory_view_get_selected_files_for_transfer (FilesAbstractDirectoryView* self,
                                                               GList* selection)
{
	GList* _tmp0_;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_list_copy_deep (selection, (GCopyFunc) g_object_ref, NULL);
	result = _tmp0_;
	return result;
}

/** File operations */
static void
files_abstract_directory_view_activate_file (FilesAbstractDirectoryView* self,
                                             FilesFile* _file,
                                             GdkScreen* screen,
                                             FilesOpenFlag flag,
                                             gboolean only_one_file)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	FilesFile* file = NULL;
	FilesFile* _tmp2_;
	gboolean _tmp3_;
	FilesFile* _tmp8_;
	GAppInfo* _tmp9_;
	GFile* location = NULL;
	FilesFile* _tmp10_;
	GFile* _tmp11_;
	GFile* _tmp12_;
	gboolean _tmp14_ = FALSE;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (_file != NULL);
	_tmp0_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		return;
	}
	_tmp2_ = _g_object_ref0 (_file);
	file = _tmp2_;
	_tmp3_ = self->priv->_in_recent;
	if (_tmp3_) {
		FilesFile* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		FilesFile* _tmp7_;
		_tmp4_ = file;
		_tmp5_ = files_file_get_display_target_uri (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = files_file_get_by_uri (_tmp6_);
		_g_object_unref0 (file);
		file = _tmp7_;
		_g_free0 (_tmp6_);
	}
	_tmp8_ = file;
	_tmp9_ = files_mime_actions_get_default_application_for_file (_tmp8_);
	_g_object_unref0 (self->priv->default_app);
	self->priv->default_app = _tmp9_;
	_tmp10_ = file;
	_tmp11_ = files_file_get_target_location (_tmp10_);
	_tmp12_ = _g_object_ref0 (_tmp11_);
	location = _tmp12_;
	if (screen == NULL) {
		GdkScreen* _tmp13_;
		_tmp13_ = gtk_widget_get_screen ((GtkWidget*) self);
		screen = _tmp13_;
	}
	if (flag != FILES_OPEN_FLAG_APP) {
		gboolean _tmp15_ = FALSE;
		gboolean _tmp16_ = FALSE;
		FilesFile* _tmp17_;
		_tmp17_ = file;
		if (files_file_is_folder (_tmp17_)) {
			_tmp16_ = TRUE;
		} else {
			FilesFile* _tmp18_;
			const gchar* _tmp19_;
			const gchar* _tmp20_;
			_tmp18_ = file;
			_tmp19_ = files_file_get_content_type (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp16_ = g_strcmp0 (_tmp20_, "inode/directory") == 0;
		}
		if (_tmp16_) {
			_tmp15_ = TRUE;
		} else {
			FilesFile* _tmp21_;
			_tmp21_ = file;
			_tmp15_ = files_file_is_root_network_folder (_tmp21_);
		}
		_tmp14_ = _tmp15_;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		switch (flag) {
			case FILES_OPEN_FLAG_NEW_TAB:
			case FILES_OPEN_FLAG_NEW_WINDOW:
			{
				GFile* _tmp22_;
				_tmp22_ = location;
				g_signal_emit (self, files_abstract_directory_view_signals[FILES_ABSTRACT_DIRECTORY_VIEW_PATH_CHANGE_REQUEST_SIGNAL], 0, _tmp22_, flag, TRUE);
				break;
			}
			default:
			{
				if (only_one_file) {
					GFile* _tmp23_;
					_tmp23_ = location;
					files_abstract_directory_view_load_location (self, _tmp23_);
				}
				break;
			}
		}
	} else {
		if (!self->priv->in_trash) {
			if (only_one_file) {
				FilesFile* _tmp24_;
				_tmp24_ = file;
				if (files_file_is_executable (_tmp24_)) {
					gchar* content_type = NULL;
					FilesFile* _tmp25_;
					const gchar* _tmp26_;
					const gchar* _tmp27_;
					gchar* _tmp28_;
					const gchar* _tmp29_;
					_tmp25_ = file;
					_tmp26_ = files_file_get_content_type (_tmp25_);
					_tmp27_ = _tmp26_;
					_tmp28_ = g_strdup (_tmp27_);
					content_type = _tmp28_;
					_tmp29_ = content_type;
					if (g_content_type_is_a (_tmp29_, "text/plain")) {
						FilesFile* _tmp30_;
						GAppInfo* _tmp31_;
						_tmp30_ = file;
						_tmp31_ = self->priv->default_app;
						files_abstract_directory_view_open_file (self, _tmp30_, screen, _tmp31_);
					} else {
						{
							FilesFile* _tmp32_;
							_tmp32_ = file;
							files_file_execute (_tmp32_, NULL, &_inner_error0_);
							if (G_UNLIKELY (_inner_error0_ != NULL)) {
								goto __catch0_g_error;
							}
						}
						goto __finally0;
						__catch0_g_error:
						{
							GError* e = NULL;
							GError* _tmp33_;
							const gchar* _tmp34_;
							FilesViewWindow* _tmp35_;
							FilesViewWindow* _tmp36_;
							GraniteMessageDialog* _tmp37_;
							GraniteMessageDialog* _tmp38_;
							e = _inner_error0_;
							_inner_error0_ = NULL;
							_tmp33_ = e;
							_tmp34_ = _tmp33_->message;
							_tmp35_ = files_abstract_directory_view_get_window (self);
							_tmp36_ = _tmp35_;
							_tmp37_ = pf_dialogs_show_warning_dialog (_ ("Cannot execute this file"), _tmp34_, (GtkWindow*) _tmp36_);
							_tmp38_ = _tmp37_;
							_g_object_unref0 (_tmp38_);
							_g_error_free0 (e);
						}
						__finally0:
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							_g_free0 (content_type);
							_g_object_unref0 (location);
							_g_object_unref0 (file);
							g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
							g_clear_error (&_inner_error0_);
							return;
						}
					}
					_g_free0 (content_type);
				} else {
					FilesFile* _tmp39_;
					GAppInfo* _tmp40_;
					_tmp39_ = file;
					_tmp40_ = self->priv->default_app;
					files_abstract_directory_view_open_file (self, _tmp39_, screen, _tmp40_);
				}
			}
		} else {
			FilesFile* _tmp41_;
			const gchar* _tmp42_;
			const gchar* _tmp43_;
			gchar* _tmp44_;
			gchar* _tmp45_;
			FilesViewWindow* _tmp46_;
			FilesViewWindow* _tmp47_;
			GraniteMessageDialog* _tmp48_;
			GraniteMessageDialog* _tmp49_;
			_tmp41_ = file;
			_tmp42_ = files_file_get_basename (_tmp41_);
			_tmp43_ = _tmp42_;
			_tmp44_ = g_strdup_printf (_ ("“%s” must be moved from Trash before opening"), _tmp43_);
			_tmp45_ = _tmp44_;
			_tmp46_ = files_abstract_directory_view_get_window (self);
			_tmp47_ = _tmp46_;
			_tmp48_ = pf_dialogs_show_error_dialog (_tmp45_, _ ("Files inside Trash cannot be opened. To open this file, it must be mov" \
"ed elsewhere."), (GtkWindow*) _tmp47_);
			_tmp49_ = _tmp48_;
			_g_object_unref0 (_tmp49_);
			_g_free0 (_tmp45_);
		}
	}
	_g_object_unref0 (location);
	_g_object_unref0 (file);
}

static void
files_abstract_directory_view_open_file (FilesAbstractDirectoryView* self,
                                         FilesFile* file,
                                         GdkScreen* screen,
                                         GAppInfo* app_info)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	if (files_abstract_directory_view_can_open_file (self, file, TRUE)) {
		GFile* _tmp0_;
		GFile* _tmp1_;
		_tmp0_ = files_file_get_location (file);
		_tmp1_ = _tmp0_;
		files_mime_actions_open_glib_file_request (_tmp1_, (GtkWidget*) self, app_info, NULL, NULL);
	}
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

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
files_abstract_directory_view_can_open_file (FilesAbstractDirectoryView* self,
                                             FilesFile* file,
                                             gboolean show_error_dialog)
{
	gchar* err_msg1 = NULL;
	gchar* _tmp0_;
	gchar* err_msg2 = NULL;
	gchar* _tmp1_;
	gchar* content_type = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp13_;
	gboolean success = FALSE;
	const gchar* _tmp41_;
	gint _tmp42_;
	gint _tmp43_;
	gboolean _tmp44_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (file != NULL, FALSE);
	_tmp0_ = g_strdup (_ ("Cannot open this file"));
	err_msg1 = _tmp0_;
	_tmp1_ = g_strdup ("");
	err_msg2 = _tmp1_;
	_tmp2_ = files_file_get_content_type (file);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	content_type = _tmp4_;
	_tmp5_ = content_type;
	if (_tmp5_ == NULL) {
		gboolean result_uncertain = FALSE;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gboolean _tmp8_ = FALSE;
		gchar* _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		result_uncertain = TRUE;
		_tmp6_ = files_file_get_basename (file);
		_tmp7_ = _tmp6_;
		_tmp9_ = g_content_type_guess (_tmp7_, NULL, (gsize) 0, &_tmp8_);
		result_uncertain = _tmp8_;
		_g_free0 (content_type);
		content_type = _tmp9_;
		_tmp10_ = content_type;
		_tmp11_ = bool_to_string (result_uncertain);
		_tmp12_ = _tmp11_;
		g_debug ("AbstractDirectoryView.vala:885: Guessed content type to be %s from nam" \
"e - result_uncertain %s", _tmp10_, _tmp12_);
		_g_free0 (_tmp12_);
	}
	_tmp13_ = content_type;
	if (_tmp13_ == NULL) {
		gchar* _tmp14_;
		_tmp14_ = g_strdup (_ ("Cannot identify file type to open"));
		_g_free0 (err_msg2);
		err_msg2 = _tmp14_;
	} else {
		FilesViewSlot* _tmp15_;
		FilesDirectory* _tmp16_;
		FilesDirectory* _tmp17_;
		gboolean _tmp18_;
		gboolean _tmp19_;
		_tmp15_ = self->slot;
		_tmp16_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = files_directory_get_can_open_files (_tmp17_);
		_tmp19_ = _tmp18_;
		if (!_tmp19_) {
			FilesViewSlot* _tmp20_;
			FilesDirectory* _tmp21_;
			FilesDirectory* _tmp22_;
			const gchar* _tmp23_;
			const gchar* _tmp24_;
			gchar* _tmp25_;
			_tmp20_ = self->slot;
			_tmp21_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp20_);
			_tmp22_ = _tmp21_;
			_tmp23_ = files_directory_get_scheme (_tmp22_);
			_tmp24_ = _tmp23_;
			_tmp25_ = g_strdup_printf ("Cannot open files with this protocol (%s)", _tmp24_);
			_g_free0 (err_msg2);
			err_msg2 = _tmp25_;
		} else {
			gboolean _tmp26_ = FALSE;
			FilesViewSlot* _tmp27_;
			FilesDirectory* _tmp28_;
			FilesDirectory* _tmp29_;
			gboolean _tmp30_;
			gboolean _tmp31_;
			_tmp27_ = self->slot;
			_tmp28_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = files_directory_get_can_stream_files (_tmp29_);
			_tmp31_ = _tmp30_;
			if (!_tmp31_) {
				gboolean _tmp32_ = FALSE;
				const gchar* _tmp33_;
				_tmp33_ = content_type;
				if (string_contains (_tmp33_, "video")) {
					_tmp32_ = TRUE;
				} else {
					const gchar* _tmp34_;
					_tmp34_ = content_type;
					_tmp32_ = string_contains (_tmp34_, "audio");
				}
				_tmp26_ = _tmp32_;
			} else {
				_tmp26_ = FALSE;
			}
			if (_tmp26_) {
				FilesViewSlot* _tmp35_;
				FilesDirectory* _tmp36_;
				FilesDirectory* _tmp37_;
				const gchar* _tmp38_;
				const gchar* _tmp39_;
				gchar* _tmp40_;
				_tmp35_ = self->slot;
				_tmp36_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp35_);
				_tmp37_ = _tmp36_;
				_tmp38_ = files_directory_get_scheme (_tmp37_);
				_tmp39_ = _tmp38_;
				_tmp40_ = g_strdup_printf ("Cannot stream from this protocol (%s)", _tmp39_);
				_g_free0 (err_msg2);
				err_msg2 = _tmp40_;
			}
		}
	}
	_tmp41_ = err_msg2;
	_tmp42_ = strlen (_tmp41_);
	_tmp43_ = _tmp42_;
	success = _tmp43_ < 1;
	if (!success) {
		_tmp44_ = show_error_dialog;
	} else {
		_tmp44_ = FALSE;
	}
	if (_tmp44_) {
		const gchar* _tmp45_;
		const gchar* _tmp46_;
		FilesViewWindow* _tmp47_;
		FilesViewWindow* _tmp48_;
		GraniteMessageDialog* _tmp49_;
		GraniteMessageDialog* _tmp50_;
		_tmp45_ = err_msg1;
		_tmp46_ = err_msg2;
		_tmp47_ = files_abstract_directory_view_get_window (self);
		_tmp48_ = _tmp47_;
		_tmp49_ = pf_dialogs_show_warning_dialog (_tmp45_, _tmp46_, (GtkWindow*) _tmp48_);
		_tmp50_ = _tmp49_;
		_g_object_unref0 (_tmp50_);
	}
	result = success;
	_g_free0 (content_type);
	_g_free0 (err_msg2);
	_g_free0 (err_msg1);
	return result;
}

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

static void
block22_data_unref (void * _userdata_)
{
	Block22Data* _data22_;
	_data22_ = (Block22Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data22_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data22_->self;
		(_data22_->locations == NULL) ? NULL : (_data22_->locations = (_g_list_free__g_object_unref0_ (_data22_->locations), NULL));
		_g_object_unref0 (self);
		g_slice_free (Block22Data, _data22_);
	}
}

static void
___lambda106_ (Block22Data* _data22_,
               FilesFile* file)
{
	FilesAbstractDirectoryView* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	GFile* _tmp2_;
	self = _data22_->self;
	g_return_if_fail (file != NULL);
	_tmp0_ = files_file_get_display_target_uri (file);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_file_new_for_uri (_tmp1_);
	_data22_->locations = g_list_prepend (_data22_->locations, _tmp2_);
	_g_free0 (_tmp1_);
}

static void
____lambda106__gfunc (gconstpointer data,
                      gpointer self)
{
	___lambda106_ (self, (FilesFile*) data);
}

static void
___lambda107_ (Block22Data* _data22_,
               FilesFile* file)
{
	FilesAbstractDirectoryView* self;
	GFile* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	self = _data22_->self;
	g_return_if_fail (file != NULL);
	_tmp0_ = files_file_get_location (file);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data22_->locations = g_list_prepend (_data22_->locations, _tmp2_);
}

static void
____lambda107__gfunc (gconstpointer data,
                      gpointer self)
{
	___lambda107_ (self, (FilesFile*) data);
}

static void
___lambda108_ (FilesAbstractDirectoryView* self,
               GObject* obj,
               GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		marlin_file_operations_delete_finish (res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp0_;
		const gchar* _tmp1_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp0_ = e;
		_tmp1_ = _tmp0_->message;
		g_debug ("AbstractDirectoryView.vala:938: %s", _tmp1_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	files_abstract_directory_view_after_trash_or_delete (self);
}

static void
____lambda108__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda108_ ((FilesAbstractDirectoryView*) self, source_object, res);
	g_object_unref (self);
}

static void
files_abstract_directory_view_trash_or_delete_files (FilesAbstractDirectoryView* self,
                                                     GList* file_list,
                                                     gboolean delete_if_already_in_trash,
                                                     gboolean delete_immediately)
{
	Block22Data* _data22_;
	gboolean _tmp0_;
	FilesListModel* _tmp1_;
	GList* _tmp2_;
	gconstpointer _tmp3_;
	GtkTreePath* _tmp4_;
	GList* _tmp5_;
	gboolean _tmp12_;
	g_return_if_fail (self != NULL);
	_data22_ = g_slice_new0 (Block22Data);
	_data22_->_ref_count_ = 1;
	_data22_->self = g_object_ref (self);
	_data22_->locations = NULL;
	_tmp0_ = self->priv->_in_recent;
	if (_tmp0_) {
		g_list_foreach (file_list, ____lambda106__gfunc, _data22_);
	} else {
		g_list_foreach (file_list, ____lambda107__gfunc, _data22_);
	}
	_tmp1_ = self->model;
	_tmp2_ = g_list_first (file_list);
	_tmp3_ = _tmp2_->data;
	_tmp4_ = files_list_model_get_path_for_first_file (_tmp1_, (FilesFile*) _tmp3_);
	__vala_GtkTreePath_free0 (self->priv->deleted_path);
	self->priv->deleted_path = _tmp4_;
	_tmp5_ = _data22_->locations;
	if (_tmp5_ != NULL) {
		FilesViewSlot* _tmp6_;
		FilesDirectory* _tmp7_;
		FilesDirectory* _tmp8_;
		GList* _tmp9_;
		FilesViewWindow* _tmp10_;
		FilesViewWindow* _tmp11_;
		_data22_->locations = g_list_reverse (_data22_->locations);
		_tmp6_ = self->slot;
		_tmp7_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp6_);
		_tmp8_ = _tmp7_;
		files_directory_block_monitor (_tmp8_);
		_tmp9_ = _data22_->locations;
		_tmp10_ = files_abstract_directory_view_get_window (self);
		_tmp11_ = _tmp10_;
		marlin_file_operations_delete (_tmp9_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp11_) : NULL, !delete_immediately, NULL, ____lambda108__gasync_ready_callback, g_object_ref (self));
	}
	_tmp12_ = self->priv->_in_recent;
	if (_tmp12_) {
		FilesViewSlot* _tmp13_;
		_tmp13_ = self->slot;
		files_abstract_slot_reload ((FilesAbstractSlot*) _tmp13_, FALSE);
	}
	block22_data_unref (_data22_);
	_data22_ = NULL;
}

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

static void
block23_data_unref (void * _userdata_)
{
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data23_->self;
		_g_object_unref0 (_data23_->file);
		_g_object_unref0 (self);
		g_slice_free (Block23Data, _data23_);
	}
}

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

static void
block24_data_unref (void * _userdata_)
{
	Block24Data* _data24_;
	_data24_ = (Block24Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data24_->_data23_->self;
		block23_data_unref (_data24_->_data23_);
		_data24_->_data23_ = NULL;
		g_slice_free (Block24Data, _data24_);
	}
}

static void
___lambda58_ (Block24Data* _data24_)
{
	Block23Data* _data23_;
	FilesAbstractDirectoryView* self;
	FilesListModel* _tmp0_;
	_data23_ = _data24_->_data23_;
	self = _data23_->self;
	_tmp0_ = self->model;
	g_signal_handler_disconnect ((GObject*) _tmp0_, _data24_->model_resorted);
	files_abstract_directory_view_add_gof_file_to_selection (self, _data23_->file);
}

static void
____lambda58__gtk_tree_model_rows_reordered (GtkTreeModel* _sender,
                                             GtkTreePath* path,
                                             GtkTreeIter* iter,
                                             gint* new_order,
                                             gpointer self)
{
	___lambda58_ (self);
}

static void
files_abstract_directory_view_add_file (FilesAbstractDirectoryView* self,
                                        FilesFile* file,
                                        FilesDirectory* dir,
                                        gboolean is_internal)
{
	Block23Data* _data23_;
	FilesFile* _tmp0_;
	GtkLabel* _tmp1_;
	FilesListModel* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	g_return_if_fail (dir != NULL);
	_data23_ = g_slice_new0 (Block23Data);
	_data23_->_ref_count_ = 1;
	_data23_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (file);
	_g_object_unref0 (_data23_->file);
	_data23_->file = _tmp0_;
	_tmp1_ = self->priv->empty_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
	_tmp2_ = self->model;
	files_list_model_insert_sorted (_tmp2_, _data23_->file, dir);
	if (is_internal) {
		Block24Data* _data24_;
		FilesListModel* _tmp3_;
		gulong _tmp4_;
		_data24_ = g_slice_new0 (Block24Data);
		_data24_->_ref_count_ = 1;
		_data24_->_data23_ = block23_data_ref (_data23_);
		_data24_->model_resorted = (gulong) 0;
		_tmp3_ = self->model;
		_tmp4_ = g_signal_connect_data ((GtkTreeModel*) _tmp3_, "rows-reordered", (GCallback) ____lambda58__gtk_tree_model_rows_reordered, block24_data_ref (_data24_), (GClosureNotify) block24_data_unref, 0);
		_data24_->model_resorted = _tmp4_;
		block24_data_unref (_data24_);
		_data24_ = NULL;
	}
	block23_data_unref (_data23_);
	_data23_ = NULL;
}

static gboolean
___lambda59_ (FilesAbstractDirectoryView* self)
{
	gboolean result;
	if (self->priv->signal_free_space_change) {
		FilesViewWindow* _tmp0_;
		FilesViewWindow* _tmp1_;
		self->priv->add_remove_file_timeout_id = (guint) 0;
		_tmp0_ = files_abstract_directory_view_get_window (self);
		_tmp1_ = _tmp0_;
		g_signal_emit_by_name (_tmp1_, "free-space-change");
		result = G_SOURCE_REMOVE;
		return result;
	} else {
		self->priv->signal_free_space_change = TRUE;
		result = G_SOURCE_CONTINUE;
		return result;
	}
}

static gboolean
____lambda59__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda59_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
files_abstract_directory_view_handle_free_space_change (FilesAbstractDirectoryView* self)
{
	FilesViewWindow* _tmp0_;
	FilesViewWindow* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = files_abstract_directory_view_get_window (self);
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (_tmp1_ != NULL, "window != null");
	if (self->priv->add_remove_file_timeout_id == ((guint) 0)) {
		self->priv->signal_free_space_change = FALSE;
		self->priv->add_remove_file_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ____lambda59__gsource_func, g_object_ref (self), g_object_unref);
	} else {
		self->priv->signal_free_space_change = FALSE;
	}
}

static void
__lambda115_ (FilesAbstractDirectoryView* self,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		GFile* file = NULL;
		GFile* _tmp0_;
		_tmp0_ = marlin_file_operations_new_file_finish (res, &_inner_error0_);
		file = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		files_abstract_directory_view_create_file_done (file, self);
		_g_object_unref0 (file);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_critical ("AbstractDirectoryView.vala:1005: %s", _tmp2_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda115__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda115_ ((FilesAbstractDirectoryView*) self, source_object, res);
	g_object_unref (self);
}

static void
files_abstract_directory_view_new_empty_file (FilesAbstractDirectoryView* self,
                                              const gchar* parent_uri)
{
	FilesViewSlot* _tmp7_;
	FilesDirectory* _tmp8_;
	FilesDirectory* _tmp9_;
	g_return_if_fail (self != NULL);
	if (parent_uri == NULL) {
		FilesViewSlot* _tmp0_;
		FilesDirectory* _tmp1_;
		FilesDirectory* _tmp2_;
		FilesFile* _tmp3_;
		FilesFile* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp0_ = self->slot;
		_tmp1_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = files_directory_get_file (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = files_file_get_uri (_tmp4_);
		_tmp6_ = _tmp5_;
		parent_uri = _tmp6_;
	}
	_tmp7_ = self->slot;
	_tmp8_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp7_);
	_tmp9_ = _tmp8_;
	files_directory_block_monitor (_tmp9_);
	marlin_file_operations_new_file ((GtkWidget*) self, parent_uri, NULL, NULL, 0, NULL, ___lambda115__gasync_ready_callback, g_object_ref (self));
}

static void
__lambda111_ (FilesAbstractDirectoryView* self,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		GFile* file = NULL;
		GFile* _tmp0_;
		_tmp0_ = marlin_file_operations_new_folder_finish (res, &_inner_error0_);
		file = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		files_abstract_directory_view_create_file_done (file, self);
		_g_object_unref0 (file);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_critical ("AbstractDirectoryView.vala:1019: %s", _tmp2_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda111__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda111_ ((FilesAbstractDirectoryView*) self, source_object, res);
	g_object_unref (self);
}

static void
files_abstract_directory_view_new_empty_folder (FilesAbstractDirectoryView* self)
{
	FilesViewSlot* _tmp0_;
	FilesDirectory* _tmp1_;
	FilesDirectory* _tmp2_;
	FilesViewSlot* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->slot;
	_tmp1_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp0_);
	_tmp2_ = _tmp1_;
	files_directory_block_monitor (_tmp2_);
	_tmp3_ = self->slot;
	_tmp4_ = files_abstract_slot_get_location ((FilesAbstractSlot*) _tmp3_);
	_tmp5_ = _tmp4_;
	marlin_file_operations_new_folder ((GtkWidget*) self, _tmp5_, NULL, ___lambda111__gasync_ready_callback, g_object_ref (self));
}

static void
_files_abstract_directory_view_after_new_file_added_files_directory_file_added (FilesDirectory* _sender,
                                                                                FilesFile* file,
                                                                                gboolean is_internal,
                                                                                gpointer self)
{
	files_abstract_directory_view_after_new_file_added ((FilesAbstractDirectoryView*) self, file);
}

static void
files_abstract_directory_view_after_new_file_added (FilesAbstractDirectoryView* self,
                                                    FilesFile* file)
{
	FilesViewSlot* _tmp0_;
	FilesDirectory* _tmp1_;
	FilesDirectory* _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->slot;
	_tmp1_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp0_);
	_tmp2_ = _tmp1_;
	g_signal_parse_name ("file-added", FILES_TYPE_DIRECTORY, &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _files_abstract_directory_view_after_new_file_added_files_directory_file_added, self);
	if (file != NULL) {
		files_abstract_directory_view_rename_file (self, file);
	}
}

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

static void
block25_data_unref (void * _userdata_)
{
	Block25Data* _data25_;
	_data25_ = (Block25Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data25_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data25_->self;
		_g_object_unref0 (_data25_->file_to_rename);
		_g_object_unref0 (self);
		g_slice_free (Block25Data, _data25_);
	}
}

static gboolean
___lambda104_ (Block25Data* _data25_)
{
	FilesAbstractDirectoryView* self;
	FilesListModel* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	self = _data25_->self;
	_tmp0_ = self->model;
	_tmp1_ = files_list_model_get_sort_pending (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		result = G_SOURCE_CONTINUE;
		return result;
	} else {
		files_abstract_directory_view_start_renaming_file (self, _data25_->file_to_rename);
		result = G_SOURCE_REMOVE;
		return result;
	}
}

static gboolean
____lambda104__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda104_ (self);
	return result;
}

void
files_abstract_directory_view_rename_file (FilesAbstractDirectoryView* self,
                                           FilesFile* file_to_rename)
{
	Block25Data* _data25_;
	FilesFile* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp4_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file_to_rename != NULL);
	_data25_ = g_slice_new0 (Block25Data);
	_data25_->_ref_count_ = 1;
	_data25_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (file_to_rename);
	_g_object_unref0 (_data25_->file_to_rename);
	_data25_->file_to_rename = _tmp0_;
	_tmp1_ = self->priv->_renaming;
	if (_tmp1_) {
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp2_ = files_file_get_basename (_data25_->file_to_rename);
		_tmp3_ = _tmp2_;
		g_warning ("AbstractDirectoryView.vala:1033: already renaming %s", _tmp3_);
		block25_data_unref (_data25_);
		_data25_ = NULL;
		return;
	}
	if (self->is_writable) {
		_tmp4_ = TRUE;
	} else {
		FilesViewSlot* _tmp5_;
		FilesDirectory* _tmp6_;
		FilesDirectory* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp5_ = self->slot;
		_tmp6_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = files_directory_get_is_local (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp4_ = !_tmp9_;
	}
	if (_tmp4_) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 50, ____lambda104__gsource_func, block25_data_ref (_data25_), block25_data_unref);
	} else {
		g_warning ("AbstractDirectoryView.vala:1050: You do not have permission to rename " \
"this file");
	}
	block25_data_unref (_data25_);
	_data25_ = NULL;
}

/** File operation callbacks */
void
files_abstract_directory_view_create_file_done (GFile* new_file,
                                                FilesAbstractDirectoryView* self)
{
	FilesViewSlot* _tmp0_;
	FilesDirectory* _tmp1_;
	FilesDirectory* _tmp2_;
	g_return_if_fail (self != NULL);
	if (new_file == NULL) {
		return;
	}
	_tmp0_ = self->slot;
	_tmp1_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp0_);
	_tmp2_ = _tmp1_;
	g_signal_connect_object (_tmp2_, "file-added", (GCallback) _files_abstract_directory_view_after_new_file_added_files_directory_file_added, self, G_CONNECT_AFTER);
	files_abstract_directory_view_unblock_directory_monitor (self);
}

static gboolean
__lambda109_ (FilesAbstractDirectoryView* self)
{
	GtkLabel* _tmp0_;
	FilesViewSlot* _tmp1_;
	FilesDirectory* _tmp2_;
	FilesDirectory* _tmp3_;
	GtkTreePath* _tmp4_;
	gboolean result;
	_tmp0_ = self->priv->empty_label;
	_tmp1_ = self->slot;
	_tmp2_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, files_directory_is_empty (_tmp3_));
	_tmp4_ = self->priv->deleted_path;
	files_abstract_directory_view_set_cursor (self, _tmp4_, FALSE, FALSE, FALSE);
	files_abstract_directory_view_unblock_directory_monitor (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda109__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda109_ ((FilesAbstractDirectoryView*) self);
	return result;
}

void
files_abstract_directory_view_after_trash_or_delete (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda109__gsource_func, g_object_ref (self), g_object_unref);
}

static gboolean
__lambda110_ (FilesAbstractDirectoryView* self)
{
	FilesViewSlot* _tmp0_;
	FilesDirectory* _tmp1_;
	FilesDirectory* _tmp2_;
	gboolean result;
	_tmp0_ = self->slot;
	_tmp1_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp0_);
	_tmp2_ = _tmp1_;
	files_directory_unblock_monitor (_tmp2_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda110__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda110_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
files_abstract_directory_view_unblock_directory_monitor (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	g_idle_add_full (G_PRIORITY_LOW, ___lambda110__gsource_func, g_object_ref (self), g_object_unref);
}

static void
files_abstract_directory_view_trash_or_delete_selected_files (FilesAbstractDirectoryView* self,
                                                              gboolean delete_immediately)
{
	GList* selection = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = files_abstract_directory_view_get_selected_files (self);
	_tmp1_ = files_abstract_directory_view_get_selected_files_for_transfer (self, _tmp0_);
	selection = _tmp1_;
	_tmp2_ = selection;
	if (_tmp2_ != NULL) {
		GList* _tmp3_;
		_tmp3_ = selection;
		files_abstract_directory_view_trash_or_delete_files (self, _tmp3_, TRUE, delete_immediately);
	}
	(selection == NULL) ? NULL : (selection = (_g_list_free__g_object_unref0_ (selection), NULL));
}

/** Selection actions */
static void
files_abstract_directory_view_on_selection_action_view_in_location (FilesAbstractDirectoryView* self,
                                                                    GSimpleAction* action,
                                                                    GVariant* param)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	files_abstract_directory_view_view_selected_file (self);
}

static void
files_abstract_directory_view_view_selected_file (FilesAbstractDirectoryView* self)
{
	GList* _tmp0_;
	GList* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->selected_files;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->selected_files;
	{
		GList* file_collection = NULL;
		GList* file_it = NULL;
		file_collection = _tmp1_;
		for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
			FilesFile* _tmp2_;
			FilesFile* file = NULL;
			_tmp2_ = _g_object_ref0 ((FilesFile*) file_it->data);
			file = _tmp2_;
			{
				GFile* loc = NULL;
				FilesFile* _tmp3_;
				gchar* _tmp4_;
				gchar* _tmp5_;
				GFile* _tmp6_;
				GFile* _tmp7_;
				GFile* _tmp8_;
				_tmp3_ = file;
				_tmp4_ = files_file_get_display_target_uri (_tmp3_);
				_tmp5_ = _tmp4_;
				_tmp6_ = g_file_new_for_uri (_tmp5_);
				_tmp7_ = _tmp6_;
				_g_free0 (_tmp5_);
				loc = _tmp7_;
				_tmp8_ = loc;
				g_signal_emit (self, files_abstract_directory_view_signals[FILES_ABSTRACT_DIRECTORY_VIEW_PATH_CHANGE_REQUEST_SIGNAL], 0, _tmp8_, FILES_OPEN_FLAG_NEW_TAB, TRUE);
				_g_object_unref0 (loc);
				_g_object_unref0 (file);
			}
		}
	}
}

static void
files_abstract_directory_view_on_selection_action_forget (FilesAbstractDirectoryView* self,
                                                          GSimpleAction* action,
                                                          GVariant* param)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	files_abstract_directory_view_forget_selected_file (self);
}

static void
files_abstract_directory_view_forget_selected_file (FilesAbstractDirectoryView* self)
{
	GList* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->selected_files;
	if (_tmp0_ == NULL) {
		return;
	}
	{
		GList* _tmp1_;
		_tmp1_ = self->selected_files;
		{
			GList* file_collection = NULL;
			GList* file_it = NULL;
			file_collection = _tmp1_;
			for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
				FilesFile* _tmp2_;
				FilesFile* file = NULL;
				_tmp2_ = _g_object_ref0 ((FilesFile*) file_it->data);
				file = _tmp2_;
				{
					GtkRecentManager* _tmp3_;
					FilesFile* _tmp4_;
					gchar* _tmp5_;
					gchar* _tmp6_;
					_tmp3_ = self->recent;
					_tmp4_ = file;
					_tmp5_ = files_file_get_display_target_uri (_tmp4_);
					_tmp6_ = _tmp5_;
					gtk_recent_manager_remove_item (_tmp3_, _tmp6_, &_inner_error0_);
					_g_free0 (_tmp6_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						_g_object_unref0 (file);
						goto __catch0_g_error;
					}
					_g_object_unref0 (file);
				}
			}
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp7_ = err;
		_tmp8_ = _tmp7_->message;
		g_critical ("AbstractDirectoryView.vala:1131: %s", _tmp8_);
		_g_error_free0 (err);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
files_abstract_directory_view_on_selection_action_rename (FilesAbstractDirectoryView* self,
                                                          GSimpleAction* action,
                                                          GVariant* param)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	files_abstract_directory_view_rename_selection (self);
}

static void
files_abstract_directory_view_rename_selection (FilesAbstractDirectoryView* self)
{
	GList* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->selected_files;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->selected_files;
	_tmp2_ = _tmp1_->next;
	if (_tmp2_ != NULL) {
		FilesRenamerDialog* rename_dialog = NULL;
		GList* _tmp3_;
		FilesViewSlot* _tmp4_;
		FilesViewWindow* _tmp5_;
		FilesViewWindow* _tmp6_;
		GtkWindow* _tmp7_;
		FilesRenamerDialog* _tmp8_ = NULL;
		FilesRenamerDialog* _tmp9_;
		_tmp3_ = self->selected_files;
		_tmp4_ = self->slot;
		_tmp5_ = files_view_slot_get_window (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = _g_object_ref0 ((GtkWindow*) _tmp6_);
		_tmp8_ = files_renamer_dialog_new (_tmp3_, NULL);
		gtk_window_set_transient_for ((GtkWindow*) _tmp8_, _tmp7_);
		_g_object_unref0 (_tmp7_);
		g_object_ref_sink (_tmp8_);
		rename_dialog = _tmp8_;
		_tmp9_ = rename_dialog;
		gtk_window_present ((GtkWindow*) _tmp9_);
		_g_object_unref0 (rename_dialog);
	} else {
		GList* _tmp10_;
		gconstpointer _tmp11_;
		_tmp10_ = self->selected_files;
		_tmp11_ = _tmp10_->data;
		files_abstract_directory_view_rename_file (self, (FilesFile*) _tmp11_);
	}
}

static void
files_abstract_directory_view_on_selection_action_cut (FilesAbstractDirectoryView* self,
                                                       GSimpleAction* action,
                                                       GVariant* param)
{
	GList* selection = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	FilesClipboardManager* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = files_abstract_directory_view_get_selected_files (self);
	_tmp1_ = files_abstract_directory_view_get_selected_files_for_transfer (self, _tmp0_);
	selection = _tmp1_;
	_tmp2_ = self->priv->clipboard;
	files_clipboard_manager_cut_files (_tmp2_, selection);
	(selection == NULL) ? NULL : (selection = (_g_list_free__g_object_unref0_ (selection), NULL));
}

static void
files_abstract_directory_view_on_selection_action_trash (FilesAbstractDirectoryView* self,
                                                         GSimpleAction* action,
                                                         GVariant* param)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	files_abstract_directory_view_trash_or_delete_selected_files (self, files_is_admin ());
}

static void
files_abstract_directory_view_on_selection_action_delete (FilesAbstractDirectoryView* self,
                                                          GSimpleAction* action,
                                                          GVariant* param)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	files_abstract_directory_view_trash_or_delete_selected_files (self, TRUE);
}

static void
files_abstract_directory_view_on_selection_action_restore (FilesAbstractDirectoryView* self,
                                                           GSimpleAction* action,
                                                           GVariant* param)
{
	GList* selection = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	FilesViewWindow* _tmp2_;
	FilesViewWindow* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = files_abstract_directory_view_get_selected_files (self);
	_tmp1_ = files_abstract_directory_view_get_selected_files_for_transfer (self, _tmp0_);
	selection = _tmp1_;
	_tmp2_ = files_abstract_directory_view_get_window (self);
	_tmp3_ = _tmp2_;
	files_file_utils_restore_files_from_trash (selection, (GtkWidget*) _tmp3_, NULL, NULL);
	(selection == NULL) ? NULL : (selection = (_g_list_free__g_object_unref0_ (selection), NULL));
}

static void
files_abstract_directory_view_on_selection_action_open_executable (FilesAbstractDirectoryView* self,
                                                                   GSimpleAction* action,
                                                                   GVariant* param)
{
	GList* selection = NULL;
	GList* _tmp0_;
	FilesFile* file = NULL;
	gconstpointer _tmp1_;
	FilesFile* _tmp2_;
	FilesFile* _tmp3_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = files_abstract_directory_view_get_files_for_action (self);
	selection = _tmp0_;
	_tmp1_ = selection->data;
	_tmp2_ = (FilesFile*) _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, FILES_TYPE_FILE) ? ((FilesFile*) _tmp2_) : NULL);
	file = _tmp3_;
	{
		files_file_execute (file, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		FilesViewWindow* _tmp6_;
		FilesViewWindow* _tmp7_;
		GraniteMessageDialog* _tmp8_;
		GraniteMessageDialog* _tmp9_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		_tmp6_ = files_abstract_directory_view_get_window (self);
		_tmp7_ = _tmp6_;
		_tmp8_ = pf_dialogs_show_warning_dialog (_ ("Cannot execute this file"), _tmp5_, (GtkWindow*) _tmp7_);
		_tmp9_ = _tmp8_;
		_g_object_unref0 (_tmp9_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (file);
		(selection == NULL) ? NULL : (selection = (_g_list_free__g_object_unref0_ (selection), NULL));
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_object_unref0 (file);
	(selection == NULL) ? NULL : (selection = (_g_list_free__g_object_unref0_ (selection), NULL));
}

static void
files_abstract_directory_view_on_selection_action_open_with_default (FilesAbstractDirectoryView* self,
                                                                     GSimpleAction* action,
                                                                     GVariant* param)
{
	GList* _tmp0_;
	GList* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = files_abstract_directory_view_get_files_for_action (self);
	_tmp1_ = _tmp0_;
	files_abstract_directory_view_activate_selected_items (self, FILES_OPEN_FLAG_APP, _tmp1_);
	(_tmp1_ == NULL) ? NULL : (_tmp1_ = (_g_list_free__g_object_unref0_ (_tmp1_), NULL));
}

static void
files_abstract_directory_view_on_selection_action_open_with_app (FilesAbstractDirectoryView* self,
                                                                 GSimpleAction* action,
                                                                 GVariant* param)
{
	GList* _tmp0_;
	gconstpointer _tmp1_;
	GList* _tmp2_;
	GList* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = self->priv->open_with_apps;
	_tmp1_ = g_list_nth_data (_tmp0_, (guint) g_variant_get_uint32 (param));
	_tmp2_ = files_abstract_directory_view_get_files_for_action (self);
	_tmp3_ = _tmp2_;
	files_abstract_directory_view_open_files_with (self, (GAppInfo*) _tmp1_, _tmp3_);
	(_tmp3_ == NULL) ? NULL : (_tmp3_ = (_g_list_free__g_object_unref0_ (_tmp3_), NULL));
}

static void
files_abstract_directory_view_on_selection_action_open_with_other_app (FilesAbstractDirectoryView* self)
{
	GList* selection = NULL;
	GList* _tmp0_;
	FilesFile* file = NULL;
	gconstpointer _tmp1_;
	FilesFile* _tmp2_;
	FilesFile* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = files_abstract_directory_view_get_files_for_action (self);
	selection = _tmp0_;
	_tmp1_ = selection->data;
	_tmp2_ = (FilesFile*) _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, FILES_TYPE_FILE) ? ((FilesFile*) _tmp2_) : NULL);
	file = _tmp3_;
	files_abstract_directory_view_open_file (self, file, NULL, NULL);
	_g_object_unref0 (file);
	(selection == NULL) ? NULL : (selection = (_g_list_free__g_object_unref0_ (selection), NULL));
}

static void
files_abstract_directory_view_on_common_action_bookmark (FilesAbstractDirectoryView* self,
                                                         GSimpleAction* action,
                                                         GVariant* param)
{
	FilesViewWindow* _tmp0_;
	FilesViewWindow* _tmp1_;
	GFile* location = NULL;
	GList* _tmp2_;
	FilesBookmarkList* _tmp14_;
	FilesBookmarkList* _tmp15_;
	GFile* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	FilesBookmark* _tmp19_;
	FilesBookmark* _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = files_abstract_directory_view_get_window (self);
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (_tmp1_ != NULL, "window != null");
	_tmp2_ = self->selected_files;
	if (_tmp2_ != NULL) {
		GList* _tmp3_;
		gconstpointer _tmp4_;
		GFile* _tmp5_;
		GFile* _tmp6_;
		_tmp3_ = self->selected_files;
		_tmp4_ = _tmp3_->data;
		_tmp5_ = files_file_get_target_location ((FilesFile*) _tmp4_);
		_tmp6_ = _g_object_ref0 (_tmp5_);
		_g_object_unref0 (location);
		location = _tmp6_;
	} else {
		FilesViewSlot* _tmp7_;
		FilesDirectory* _tmp8_;
		FilesDirectory* _tmp9_;
		FilesFile* _tmp10_;
		FilesFile* _tmp11_;
		GFile* _tmp12_;
		GFile* _tmp13_;
		_tmp7_ = self->slot;
		_tmp8_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = files_directory_get_file (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = files_file_get_target_location (_tmp11_);
		_tmp13_ = _g_object_ref0 (_tmp12_);
		_g_object_unref0 (location);
		location = _tmp13_;
	}
	_tmp14_ = files_bookmark_list_get_instance ();
	_tmp15_ = _tmp14_;
	_tmp16_ = location;
	_tmp17_ = g_file_get_uri (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = files_bookmark_list_insert_uri_at_end (_tmp15_, _tmp18_, "");
	_tmp20_ = _tmp19_;
	_files_bookmark_unref0 (_tmp20_);
	_g_free0 (_tmp18_);
	_g_object_unref0 (_tmp15_);
	_g_object_unref0 (location);
}

/** Background actions */
static void
files_abstract_directory_view_on_background_action_new (FilesAbstractDirectoryView* self,
                                                        GSimpleAction* action,
                                                        GVariant* param)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = g_variant_get_string (param, NULL);
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("FOLDER")))) {
		switch (0) {
			default:
			{
				files_abstract_directory_view_new_empty_folder (self);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("FILE")))) {
		switch (0) {
			default:
			{
				files_abstract_directory_view_new_empty_file (self, NULL);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				break;
			}
		}
	}
}

static void
files_abstract_directory_view_on_background_action_create_from (FilesAbstractDirectoryView* self,
                                                                GSimpleAction* action,
                                                                GVariant* param)
{
	gchar* path = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = g_variant_get_string (param, NULL);
	_tmp1_ = g_strdup (_tmp0_);
	path = _tmp1_;
	files_abstract_directory_view_create_from_template (self, path);
	_g_free0 (path);
}

static void
files_abstract_directory_view_on_background_action_sort_by_changed (FilesAbstractDirectoryView* self,
                                                                    GSimpleAction* action,
                                                                    GVariant* val)
{
	const gchar* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	if (val != NULL) {
		const gchar* _tmp1_;
		_tmp1_ = g_variant_get_string (val, NULL);
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = NULL;
	}
	files_abstract_directory_view_set_sort (self, _tmp0_, FALSE);
}

static void
files_abstract_directory_view_on_background_action_reverse_changed (FilesAbstractDirectoryView* self,
                                                                    GSimpleAction* action,
                                                                    GVariant* val)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	files_abstract_directory_view_set_sort (self, NULL, TRUE);
}

static void
files_abstract_directory_view_set_sort (FilesAbstractDirectoryView* self,
                                        const gchar* col_name,
                                        gboolean reverse)
{
	gint sort_column_id = 0;
	GtkSortType sort_order = 0;
	FilesListModel* _tmp0_;
	gint _tmp1_ = 0;
	GtkSortType _tmp2_ = 0;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->model;
	_tmp3_ = gtk_tree_sortable_get_sort_column_id ((GtkTreeSortable*) _tmp0_, &_tmp1_, &_tmp2_);
	sort_column_id = _tmp1_;
	sort_order = _tmp2_;
	if (_tmp3_) {
		FilesListModel* _tmp4_;
		if (col_name != NULL) {
			sort_column_id = (gint) files_list_model_column_id_from_string (col_name);
		}
		if (reverse) {
			if (sort_order == GTK_SORT_ASCENDING) {
				sort_order = GTK_SORT_DESCENDING;
			} else {
				sort_order = GTK_SORT_ASCENDING;
			}
		}
		_tmp4_ = self->model;
		gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp4_, sort_column_id, sort_order);
	} else {
		g_warning ("AbstractDirectoryView.vala:1255: Set Sort: The model is unsorted - thi" \
"s should not happen");
	}
}

/** Common actions */
static void
_vala_XdpParent_free (XdpParent* self)
{
	g_boxed_free (xdp_parent_get_type (), self);
}

static void
files_abstract_directory_view_action_set_wallpaper (FilesAbstractDirectoryView* self,
                                                    GSimpleAction* action,
                                                    GVariant* param)
{
	FilesFile* file = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	gconstpointer _tmp2_;
	FilesFile* _tmp3_;
	FilesFile* _tmp4_;
	GtkWindow* active_window = NULL;
	GtkWidget* _tmp5_;
	GtkWindow* _tmp6_;
	XdpParent* _tmp7_ = NULL;
	GtkWindow* _tmp8_;
	XdpParent* parent = NULL;
	XdpParent* _tmp11_;
	XdpPortal* portal = NULL;
	XdpPortal* _tmp12_;
	FilesFile* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = files_abstract_directory_view_get_files_for_action (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_list_nth_data (_tmp1_, (guint) 0);
	_tmp3_ = _g_object_ref0 ((FilesFile*) _tmp2_);
	_tmp4_ = _tmp3_;
	(_tmp1_ == NULL) ? NULL : (_tmp1_ = (_g_list_free__g_object_unref0_ (_tmp1_), NULL));
	file = _tmp4_;
	_tmp5_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_window_get_type (), GtkWindow));
	active_window = _tmp6_;
	_tmp8_ = active_window;
	if (_tmp8_ != NULL) {
		GtkWindow* _tmp9_;
		XdpParent* _tmp10_;
		_tmp9_ = active_window;
		_tmp10_ = xdp_parent_new_gtk (_tmp9_);
		__vala_XdpParent_free0 (_tmp7_);
		_tmp7_ = _tmp10_;
	} else {
		__vala_XdpParent_free0 (_tmp7_);
		_tmp7_ = NULL;
	}
	_tmp11_ = _tmp7_;
	_tmp7_ = NULL;
	parent = _tmp11_;
	_tmp12_ = xdp_portal_new ();
	portal = _tmp12_;
	_tmp13_ = file;
	_tmp14_ = files_file_get_uri (_tmp13_);
	_tmp15_ = _tmp14_;
	xdp_portal_set_wallpaper (portal, parent, _tmp15_, XDP_WALLPAPER_FLAG_NONE, NULL, NULL, NULL);
	_g_object_unref0 (portal);
	__vala_XdpParent_free0 (parent);
	__vala_XdpParent_free0 (_tmp7_);
	_g_object_unref0 (active_window);
	_g_object_unref0 (file);
}

static FilesOpenFlag
_variant_get1 (GVariant* value)
{
	return g_variant_get_int32 (value);
}

static void
files_abstract_directory_view_on_common_action_open_in (FilesAbstractDirectoryView* self,
                                                        GSimpleAction* action,
                                                        GVariant* param)
{
	FilesOpenFlag _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_vala_return_if_fail (param != NULL, "param != null");
	_g_object_unref0 (self->priv->default_app);
	self->priv->default_app = NULL;
	_tmp0_ = _variant_get1 (param);
	_tmp1_ = files_abstract_directory_view_get_files_for_action (self);
	_tmp2_ = _tmp1_;
	files_abstract_directory_view_activate_selected_items (self, _tmp0_, _tmp2_);
	(_tmp2_ == NULL) ? NULL : (_tmp2_ = (_g_list_free__g_object_unref0_ (_tmp2_), NULL));
}

static void
files_abstract_directory_view_on_common_action_properties (FilesAbstractDirectoryView* self,
                                                           GSimpleAction* action,
                                                           GVariant* param)
{
	GList* _tmp0_;
	GList* _tmp1_;
	FilesViewWindow* _tmp2_;
	FilesViewWindow* _tmp3_;
	FilesViewPropertiesWindow* _tmp4_;
	FilesViewPropertiesWindow* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = files_abstract_directory_view_get_files_for_action (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = files_abstract_directory_view_get_window (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = files_view_properties_window_new (_tmp1_, self, (GtkWindow*) _tmp3_);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp5_);
	(_tmp1_ == NULL) ? NULL : (_tmp1_ = (_g_list_free__g_object_unref0_ (_tmp1_), NULL));
}

static void
files_abstract_directory_view_on_common_action_copy_link (FilesAbstractDirectoryView* self,
                                                          GSimpleAction* action,
                                                          GVariant* param)
{
	FilesClipboardManager* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	GList* _tmp3_;
	GList* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = self->priv->clipboard;
	_tmp1_ = files_abstract_directory_view_get_files_for_action (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = files_abstract_directory_view_get_selected_files_for_transfer (self, _tmp2_);
	_tmp4_ = _tmp3_;
	files_clipboard_manager_copy_link_files (_tmp0_, _tmp4_);
	(_tmp4_ == NULL) ? NULL : (_tmp4_ = (_g_list_free__g_object_unref0_ (_tmp4_), NULL));
	(_tmp2_ == NULL) ? NULL : (_tmp2_ = (_g_list_free__g_object_unref0_ (_tmp2_), NULL));
}

static void
files_abstract_directory_view_on_common_action_copy (FilesAbstractDirectoryView* self,
                                                     GSimpleAction* action,
                                                     GVariant* param)
{
	FilesClipboardManager* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	GList* _tmp3_;
	GList* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = self->priv->clipboard;
	_tmp1_ = files_abstract_directory_view_get_files_for_action (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = files_abstract_directory_view_get_selected_files_for_transfer (self, _tmp2_);
	_tmp4_ = _tmp3_;
	files_clipboard_manager_copy_files (_tmp0_, _tmp4_);
	(_tmp4_ == NULL) ? NULL : (_tmp4_ = (_g_list_free__g_object_unref0_ (_tmp4_), NULL));
	(_tmp2_ == NULL) ? NULL : (_tmp2_ = (_g_list_free__g_object_unref0_ (_tmp2_), NULL));
}

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

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

static void
___lambda118_ (Block26Data* _data26_,
               GObject* obj,
               GAsyncResult* res)
{
	FilesAbstractDirectoryView* self;
	FilesClipboardManager* _tmp0_;
	GFile* _tmp1_;
	self = _data26_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->clipboard;
	files_clipboard_manager_paste_files_finish (_tmp0_, res);
	_tmp1_ = _data26_->target;
	if (g_file_has_uri_scheme (_tmp1_, "trash")) {
		files_abstract_directory_view_after_trash_or_delete (self);
	}
}

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

static void
files_abstract_directory_view_on_common_action_paste (FilesAbstractDirectoryView* self,
                                                      GSimpleAction* action,
                                                      GVariant* param)
{
	gboolean _tmp0_ = FALSE;
	FilesClipboardManager* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp1_ = self->priv->clipboard;
	_tmp2_ = files_clipboard_manager_get_can_paste (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		gboolean _tmp4_ = FALSE;
		FilesClipboardManager* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = self->priv->clipboard;
		_tmp6_ = files_clipboard_manager_get_files_linked (_tmp5_);
		_tmp7_ = _tmp6_;
		if (_tmp7_) {
			_tmp4_ = self->priv->in_trash;
		} else {
			_tmp4_ = FALSE;
		}
		_tmp0_ = !_tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		Block26Data* _data26_;
		FilesViewSlot* _tmp8_;
		GFile* _tmp9_;
		GFile* _tmp10_;
		GFile* _tmp11_;
		FilesClipboardManager* _tmp12_;
		GFile* _tmp13_;
		_data26_ = g_slice_new0 (Block26Data);
		_data26_->_ref_count_ = 1;
		_data26_->self = g_object_ref (self);
		_tmp8_ = self->slot;
		_tmp9_ = files_abstract_slot_get_location ((FilesAbstractSlot*) _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = _g_object_ref0 (_tmp10_);
		_data26_->target = _tmp11_;
		_tmp12_ = self->priv->clipboard;
		_tmp13_ = _data26_->target;
		files_clipboard_manager_paste_files (_tmp12_, _tmp13_, G_TYPE_CHECK_INSTANCE_TYPE (self, gtk_widget_get_type ()) ? ((GtkWidget*) self) : NULL, ____lambda118__gasync_ready_callback, block26_data_ref (_data26_));
		block26_data_unref (_data26_);
		_data26_ = NULL;
	}
}

static Block27Data*
block27_data_ref (Block27Data* _data27_)
{
	g_atomic_int_inc (&_data27_->_ref_count_);
	return _data27_;
}

static void
block27_data_unref (void * _userdata_)
{
	Block27Data* _data27_;
	_data27_ = (Block27Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data27_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data27_->self;
		_g_object_unref0 (_data27_->target);
		_g_object_unref0 (self);
		g_slice_free (Block27Data, _data27_);
	}
}

static void
___lambda117_ (Block27Data* _data27_,
               GObject* obj,
               GAsyncResult* res)
{
	FilesAbstractDirectoryView* self;
	FilesClipboardManager* _tmp0_;
	GFile* _tmp1_;
	self = _data27_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->clipboard;
	files_clipboard_manager_paste_files_finish (_tmp0_, res);
	_tmp1_ = _data27_->target;
	if (g_file_has_uri_scheme (_tmp1_, "trash")) {
		files_abstract_directory_view_after_trash_or_delete (self);
	}
}

static void
____lambda117__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda117_ (self, source_object, res);
	block27_data_unref (self);
}

static void
files_abstract_directory_view_on_common_action_paste_into (FilesAbstractDirectoryView* self,
                                                           GSimpleAction* action,
                                                           GVariant* param)
{
	FilesFile* file = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	gconstpointer _tmp2_;
	FilesFile* _tmp3_;
	FilesFile* _tmp4_;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	FilesFile* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = files_abstract_directory_view_get_files_for_action (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_list_nth_data (_tmp1_, (guint) 0);
	_tmp3_ = _g_object_ref0 ((FilesFile*) _tmp2_);
	_tmp4_ = _tmp3_;
	(_tmp1_ == NULL) ? NULL : (_tmp1_ = (_g_list_free__g_object_unref0_ (_tmp1_), NULL));
	file = _tmp4_;
	_tmp7_ = file;
	if (_tmp7_ != NULL) {
		FilesClipboardManager* _tmp8_;
		gboolean _tmp9_;
		gboolean _tmp10_;
		_tmp8_ = self->priv->clipboard;
		_tmp9_ = files_clipboard_manager_get_can_paste (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp6_ = _tmp10_;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		gboolean _tmp11_ = FALSE;
		FilesClipboardManager* _tmp12_;
		gboolean _tmp13_;
		gboolean _tmp14_;
		_tmp12_ = self->priv->clipboard;
		_tmp13_ = files_clipboard_manager_get_files_linked (_tmp12_);
		_tmp14_ = _tmp13_;
		if (_tmp14_) {
			_tmp11_ = self->priv->in_trash;
		} else {
			_tmp11_ = FALSE;
		}
		_tmp5_ = !_tmp11_;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		Block27Data* _data27_;
		gboolean _tmp15_ = FALSE;
		FilesFile* _tmp16_;
		FilesClipboardManager* _tmp26_;
		GFile* _tmp27_;
		_data27_ = g_slice_new0 (Block27Data);
		_data27_->_ref_count_ = 1;
		_data27_->self = g_object_ref (self);
		_tmp16_ = file;
		if (files_file_is_folder (_tmp16_)) {
			FilesClipboardManager* _tmp17_;
			FilesFile* _tmp18_;
			_tmp17_ = self->priv->clipboard;
			_tmp18_ = file;
			_tmp15_ = !files_clipboard_manager_has_file (_tmp17_, _tmp18_);
		} else {
			_tmp15_ = FALSE;
		}
		if (_tmp15_) {
			FilesFile* _tmp19_;
			GFile* _tmp20_;
			GFile* _tmp21_;
			_tmp19_ = file;
			_tmp20_ = files_file_get_target_location (_tmp19_);
			_tmp21_ = _g_object_ref0 (_tmp20_);
			_g_object_unref0 (_data27_->target);
			_data27_->target = _tmp21_;
		} else {
			FilesViewSlot* _tmp22_;
			GFile* _tmp23_;
			GFile* _tmp24_;
			GFile* _tmp25_;
			_tmp22_ = self->slot;
			_tmp23_ = files_abstract_slot_get_location ((FilesAbstractSlot*) _tmp22_);
			_tmp24_ = _tmp23_;
			_tmp25_ = _g_object_ref0 (_tmp24_);
			_g_object_unref0 (_data27_->target);
			_data27_->target = _tmp25_;
		}
		_tmp26_ = self->priv->clipboard;
		_tmp27_ = _data27_->target;
		files_clipboard_manager_paste_files (_tmp26_, _tmp27_, G_TYPE_CHECK_INSTANCE_TYPE (self, gtk_widget_get_type ()) ? ((GtkWidget*) self) : NULL, ____lambda117__gasync_ready_callback, block27_data_ref (_data27_));
		block27_data_unref (_data27_);
		_data27_ = NULL;
	}
	_g_object_unref0 (file);
}

static void
files_abstract_directory_view_toggle_select_all (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	files_abstract_directory_view_update_selected_files_and_menu (self);
	if (self->priv->all_selected) {
		files_abstract_directory_view_unselect_all (self);
	} else {
		files_abstract_directory_view_select_all (self);
	}
}

static Block28Data*
block28_data_ref (Block28Data* _data28_)
{
	g_atomic_int_inc (&_data28_->_ref_count_);
	return _data28_;
}

static void
block28_data_unref (void * _userdata_)
{
	Block28Data* _data28_;
	_data28_ = (Block28Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data28_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data28_->self;
		_g_object_unref0 (_data28_->file);
		_g_object_unref0 (self);
		g_slice_free (Block28Data, _data28_);
	}
}

static gboolean
___lambda60_ (Block28Data* _data28_)
{
	FilesAbstractDirectoryView* self;
	gboolean result;
	self = _data28_->self;
	files_abstract_directory_view_update_icon_and_plugins (self, _data28_->file);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda60__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda60_ (self);
	return result;
}

static void
files_abstract_directory_view_on_directory_file_added (FilesAbstractDirectoryView* self,
                                                       FilesDirectory* dir,
                                                       FilesFile* file,
                                                       gboolean is_internal)
{
	Block28Data* _data28_;
	FilesFile* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	_data28_ = g_slice_new0 (Block28Data);
	_data28_->_ref_count_ = 1;
	_data28_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (file);
	_g_object_unref0 (_data28_->file);
	_data28_->file = _tmp0_;
	if (_data28_->file != NULL) {
		files_abstract_directory_view_add_file (self, _data28_->file, dir, is_internal);
		files_abstract_directory_view_handle_free_space_change (self);
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda60__gsource_func, block28_data_ref (_data28_), block28_data_unref);
	} else {
		g_critical ("AbstractDirectoryView.vala:1340: Null file added");
	}
	block28_data_unref (_data28_);
	_data28_ = NULL;
}

static void
files_abstract_directory_view_on_directory_file_loaded (FilesAbstractDirectoryView* self,
                                                        FilesDirectory* dir,
                                                        FilesFile* file)
{
	GtkLabel* _tmp0_;
	FilesListModel* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = self->priv->empty_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = self->model;
	files_list_model_add_file (_tmp1_, file, dir);
}

static void
files_abstract_directory_view_on_directory_file_changed (FilesAbstractDirectoryView* self,
                                                         FilesDirectory* dir,
                                                         FilesFile* file)
{
	GFile* _tmp0_;
	GFile* _tmp1_;
	FilesFile* _tmp2_;
	FilesFile* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = files_file_get_location (file);
	_tmp1_ = _tmp0_;
	_tmp2_ = files_directory_get_file (dir);
	_tmp3_ = _tmp2_;
	_tmp4_ = files_file_get_location (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_file_equal (_tmp1_, _tmp5_)) {
		FilesViewSlot* _tmp6_;
		FilesDirectory* _tmp7_;
		FilesDirectory* _tmp8_;
		FilesFile* _tmp9_;
		FilesFile* _tmp10_;
		_tmp6_ = self->slot;
		_tmp7_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = files_directory_get_file (_tmp8_);
		_tmp10_ = _tmp9_;
		self->is_writable = files_file_is_writable (_tmp10_);
	} else {
		files_abstract_directory_view_on_directory_file_icon_changed (self, dir, file);
	}
}

static Block29Data*
block29_data_ref (Block29Data* _data29_)
{
	g_atomic_int_inc (&_data29_->_ref_count_);
	return _data29_;
}

static void
block29_data_unref (void * _userdata_)
{
	Block29Data* _data29_;
	_data29_ = (Block29Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data29_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data29_->self;
		_g_object_unref0 (_data29_->file);
		_g_object_unref0 (self);
		g_slice_free (Block29Data, _data29_);
	}
}

static gboolean
__lambda61_ (Block29Data* _data29_)
{
	FilesAbstractDirectoryView* self;
	gboolean result;
	self = _data29_->self;
	files_abstract_directory_view_update_icon_and_plugins (self, _data29_->file);
	if (self->should_thumbnail) {
		FilesThumbnailer* _tmp0_;
		_tmp0_ = self->priv->thumbnailer;
		files_thumbnailer_queue_file (_tmp0_, _data29_->file, NULL);
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda61__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda61_ (self);
	return result;
}

static void
files_abstract_directory_view_on_directory_file_icon_changed (FilesAbstractDirectoryView* self,
                                                              FilesDirectory* dir,
                                                              FilesFile* file)
{
	Block29Data* _data29_;
	FilesFile* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	FilesListModel* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	g_return_if_fail (file != NULL);
	_data29_ = g_slice_new0 (Block29Data);
	_data29_->_ref_count_ = 1;
	_data29_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (file);
	_g_object_unref0 (_data29_->file);
	_data29_->file = _tmp0_;
	_tmp1_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		block29_data_unref (_data29_);
		_data29_ = NULL;
		return;
	}
	_tmp3_ = self->model;
	files_list_model_file_changed (_tmp3_, _data29_->file, dir);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda61__gsource_func, block29_data_ref (_data29_), block29_data_unref);
	files_abstract_directory_view_draw_when_idle (self);
	block29_data_unref (_data29_);
	_data29_ = NULL;
}

static void
files_abstract_directory_view_on_directory_file_deleted (FilesAbstractDirectoryView* self,
                                                         FilesDirectory* dir,
                                                         FilesFile* file)
{
	GtkLabel* _tmp0_;
	FilesListModel* _tmp1_;
	FilesPluginManager* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	g_return_if_fail (file != NULL);
	files_file_set_exists (file, FALSE);
	_tmp0_ = self->priv->empty_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, files_directory_is_empty (dir));
	_tmp1_ = self->model;
	files_list_model_remove_file (_tmp1_, file, dir);
	_tmp2_ = plugins;
	if (_tmp2_ != NULL) {
		FilesPluginManager* _tmp3_;
		_tmp3_ = plugins;
		files_plugin_manager_update_file_info (_tmp3_, file);
	}
	if (files_file_is_folder (file)) {
		FilesDirectory* file_dir = NULL;
		GFile* _tmp4_;
		GFile* _tmp5_;
		FilesDirectory* _tmp6_;
		FilesDirectory* _tmp7_;
		_tmp4_ = files_file_get_location (file);
		_tmp5_ = _tmp4_;
		_tmp6_ = files_directory_cache_lookup (_tmp5_);
		file_dir = _tmp6_;
		_tmp7_ = file_dir;
		if (_tmp7_ != NULL) {
			FilesDirectory* _tmp8_;
			FilesViewSlot* _tmp9_;
			FilesDirectory* _tmp10_;
			_tmp8_ = file_dir;
			files_directory_purge_dir_from_cache (_tmp8_);
			_tmp9_ = self->slot;
			_tmp10_ = file_dir;
			g_signal_emit_by_name (_tmp9_, "folder-deleted", file, _tmp10_);
		}
		_g_object_unref0 (file_dir);
	}
	files_abstract_directory_view_handle_free_space_change (self);
}

static gboolean
__lambda53_ (FilesAbstractDirectoryView* self)
{
	GtkLabel* _tmp0_;
	FilesViewSlot* _tmp1_;
	FilesDirectory* _tmp2_;
	FilesDirectory* _tmp3_;
	gboolean result;
	_tmp0_ = self->priv->empty_label;
	_tmp1_ = self->slot;
	_tmp2_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, files_directory_is_empty (_tmp3_));
	files_abstract_directory_view_thaw_tree (self);
	files_abstract_directory_view_schedule_thumbnail_color_tag_timeout (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda53__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda53_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
files_abstract_directory_view_on_directory_done_loading (FilesAbstractDirectoryView* self,
                                                         FilesDirectory* dir)
{
	FilesViewSlot* _tmp0_;
	FilesDirectory* _tmp1_;
	FilesDirectory* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	FilesViewSlot* _tmp5_;
	FilesDirectory* _tmp6_;
	FilesDirectory* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	FilesViewSlot* _tmp10_;
	FilesDirectory* _tmp11_;
	FilesDirectory* _tmp12_;
	FilesFile* _tmp13_;
	FilesFile* _tmp14_;
	FilesViewSlot* _tmp15_;
	FilesDirectory* _tmp16_;
	FilesDirectory* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	files_abstract_directory_view_disconnect_directory_loading_handlers (self, dir);
	_tmp0_ = self->slot;
	_tmp1_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = files_directory_get_is_trash (_tmp2_);
	_tmp4_ = _tmp3_;
	self->priv->in_trash = _tmp4_;
	_tmp5_ = self->slot;
	_tmp6_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = files_directory_get_is_recent (_tmp7_);
	_tmp9_ = _tmp8_;
	files_abstract_directory_view_set_in_recent (self, _tmp9_);
	_tmp10_ = self->slot;
	_tmp11_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = files_directory_get_file (_tmp12_);
	_tmp14_ = _tmp13_;
	self->priv->in_network_root = files_file_is_root_network_folder (_tmp14_);
	_tmp15_ = self->slot;
	_tmp16_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = files_directory_get_can_load (_tmp17_);
	_tmp19_ = _tmp18_;
	if (_tmp19_) {
		FilesViewSlot* _tmp20_;
		FilesDirectory* _tmp21_;
		FilesDirectory* _tmp22_;
		FilesFile* _tmp23_;
		FilesFile* _tmp24_;
		gboolean _tmp25_;
		_tmp20_ = self->slot;
		_tmp21_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = files_directory_get_file (_tmp22_);
		_tmp24_ = _tmp23_;
		self->is_writable = files_file_is_writable (_tmp24_);
		_tmp25_ = self->priv->_in_recent;
		if (_tmp25_) {
			FilesListModel* _tmp26_;
			_tmp26_ = self->model;
			gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp26_, (gint) FILES_LIST_MODEL_COLUMN_ID_MODIFIED, GTK_SORT_DESCENDING);
		} else {
			FilesViewSlot* _tmp27_;
			FilesDirectory* _tmp28_;
			FilesDirectory* _tmp29_;
			FilesFile* _tmp30_;
			FilesFile* _tmp31_;
			GFileInfo* _tmp32_;
			_tmp27_ = self->slot;
			_tmp28_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = files_directory_get_file (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = _tmp31_->info;
			if (_tmp32_ != NULL) {
				FilesListModel* _tmp33_;
				FilesViewSlot* _tmp34_;
				FilesDirectory* _tmp35_;
				FilesDirectory* _tmp36_;
				FilesFile* _tmp37_;
				FilesFile* _tmp38_;
				FilesViewSlot* _tmp39_;
				FilesDirectory* _tmp40_;
				FilesDirectory* _tmp41_;
				FilesFile* _tmp42_;
				FilesFile* _tmp43_;
				_tmp33_ = self->model;
				_tmp34_ = self->slot;
				_tmp35_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp34_);
				_tmp36_ = _tmp35_;
				_tmp37_ = files_directory_get_file (_tmp36_);
				_tmp38_ = _tmp37_;
				_tmp39_ = self->slot;
				_tmp40_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp39_);
				_tmp41_ = _tmp40_;
				_tmp42_ = files_directory_get_file (_tmp41_);
				_tmp43_ = _tmp42_;
				gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp33_, _tmp38_->sort_column_id, _tmp43_->sort_order);
			}
		}
	} else {
		self->is_writable = FALSE;
	}
	files_abstract_directory_view_set_should_thumbnail (self);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda53__gsource_func, g_object_ref (self), g_object_unref);
}

/** Handle zoom level change */
static void
files_abstract_directory_view_on_zoom_level_changed (FilesAbstractDirectoryView* self,
                                                     FilesZoomLevel zoom)
{
	FilesListModel* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->model;
	_tmp1_ = files_abstract_directory_view_get_icon_size (self);
	_tmp2_ = _tmp1_;
	files_list_model_set_icon_size (_tmp0_, _tmp2_);
	files_abstract_directory_view_change_zoom_level (self);
}

/** Handle Preference changes */
static void
files_abstract_directory_view_on_show_hidden_files_changed (FilesAbstractDirectoryView* self,
                                                            GObject* prefs,
                                                            GParamSpec* pspec)
{
	gboolean show = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	FilesListModel* _tmp2_;
	FilesViewSlot* _tmp4_;
	FilesDirectory* _tmp5_;
	FilesDirectory* _tmp6_;
	FilesViewSlot* _tmp7_;
	FilesDirectory* _tmp8_;
	FilesDirectory* _tmp9_;
	GList* _tmp10_;
	GSettings* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (prefs != NULL);
	g_return_if_fail (pspec != NULL);
	_tmp0_ = files_preferences_get_show_hidden_files (G_TYPE_CHECK_INSTANCE_CAST (prefs, FILES_TYPE_PREFERENCES, FilesPreferences));
	_tmp1_ = _tmp0_;
	show = _tmp1_;
	_tmp2_ = self->model;
	files_list_model_set_show_hidden_files (_tmp2_, show);
	files_abstract_directory_view_cancel (self);
	files_abstract_directory_view_unselect_all (self);
	if (!show) {
		FilesListModel* _tmp3_;
		files_abstract_directory_view_block_model (self);
		_tmp3_ = self->model;
		files_list_model_clear (_tmp3_);
	}
	_tmp4_ = self->slot;
	_tmp5_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp4_);
	_tmp6_ = _tmp5_;
	files_abstract_directory_view_directory_hidden_changed (self, _tmp6_, show);
	if (!show) {
		files_abstract_directory_view_unblock_model (self);
	}
	_tmp7_ = self->slot;
	_tmp8_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = files_directory_get_files (_tmp9_);
	{
		GList* file_collection = NULL;
		GList* file_it = NULL;
		file_collection = _tmp10_;
		for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
			FilesFile* _tmp11_;
			FilesFile* file = NULL;
			_tmp11_ = _g_object_ref0 ((FilesFile*) file_it->data);
			file = _tmp11_;
			{
				FilesFile* _tmp12_;
				_tmp12_ = file;
				if (files_file_is_folder (_tmp12_)) {
					FilesFile* _tmp13_;
					_tmp13_ = file;
					files_file_ensure_size (_tmp13_);
				}
				_g_object_unref0 (file);
			}
		}
		(file_collection == NULL) ? NULL : (file_collection = (g_list_free (file_collection), NULL));
	}
	_tmp14_ = files_abstract_directory_view_app_settings;
	g_settings_set_boolean (_tmp14_, "show-hiddenfiles", show);
}

static void
files_abstract_directory_view_set_should_thumbnail (FilesAbstractDirectoryView* self)
{
	FilesViewSlot* _tmp0_;
	FilesDirectory* _tmp1_;
	FilesDirectory* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->slot;
	_tmp1_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = files_directory_get_is_network (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		gboolean _tmp5_ = FALSE;
		FilesViewSlot* _tmp6_;
		FilesDirectory* _tmp7_;
		FilesDirectory* _tmp8_;
		gboolean _tmp9_;
		gboolean _tmp10_;
		_tmp6_ = self->slot;
		_tmp7_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = files_directory_get_can_open_files (_tmp8_);
		_tmp10_ = _tmp9_;
		if (_tmp10_) {
			GSettings* _tmp11_;
			_tmp11_ = files_abstract_directory_view_app_settings;
			_tmp5_ = g_settings_get_boolean (_tmp11_, "show-remote-thumbnails");
		} else {
			_tmp5_ = FALSE;
		}
		self->should_thumbnail = _tmp5_;
	} else {
		GSettings* _tmp12_;
		_tmp12_ = files_abstract_directory_view_app_settings;
		self->should_thumbnail = g_settings_get_boolean (_tmp12_, "show-local-thumbnails");
	}
}

static void
files_abstract_directory_view_on_show_thumbnails_changed (FilesAbstractDirectoryView* self)
{
	FilesViewSlot* _tmp0_;
	g_return_if_fail (self != NULL);
	files_abstract_directory_view_set_should_thumbnail (self);
	_tmp0_ = self->slot;
	files_abstract_slot_reload ((FilesAbstractSlot*) _tmp0_, FALSE);
}

static void
files_abstract_directory_view_on_sort_directories_first_changed (FilesAbstractDirectoryView* self,
                                                                 GSettings* settings,
                                                                 const gchar* key)
{
	FilesListModel* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (settings != NULL);
	g_return_if_fail (key != NULL);
	_tmp0_ = self->model;
	files_list_model_set_should_sort_directories_first (_tmp0_, g_settings_get_boolean (settings, key));
}

static void
files_abstract_directory_view_directory_hidden_changed (FilesAbstractDirectoryView* self,
                                                        FilesDirectory* dir,
                                                        gboolean show)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (dir != NULL);
	files_abstract_directory_view_connect_directory_loading_handlers (self, dir);
	files_directory_load_hiddens (dir);
}

static void
files_abstract_directory_view_on_dateformat_changed (FilesAbstractDirectoryView* self)
{
	FilesViewSlot* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->slot;
	files_abstract_slot_reload ((FilesAbstractSlot*) _tmp0_, FALSE);
}

/** Handle popup menu events */
static void
_vala_GdkEvent_free (GdkEvent* self)
{
	g_boxed_free (gdk_event_get_type (), self);
}

static gboolean
files_abstract_directory_view_on_popup_menu (FilesAbstractDirectoryView* self)
{
	GdkEvent* event = NULL;
	GdkEvent* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = gtk_get_current_event ();
	event = _tmp0_;
	files_abstract_directory_view_show_context_menu (self, event);
	result = TRUE;
	__vala_GdkEvent_free0 (event);
	return result;
}

/** Handle TreeModel events */
static void
files_abstract_directory_view_real_on_row_deleted (FilesAbstractDirectoryView* self,
                                                   GtkTreePath* path)
{
	g_return_if_fail (path != NULL);
	files_abstract_directory_view_unselect_all (self);
}

void
files_abstract_directory_view_on_row_deleted (FilesAbstractDirectoryView* self,
                                              GtkTreePath* path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->on_row_deleted) {
		_klass_->on_row_deleted (self, path);
	}
}

/** Handle clipboard signal */
static void
files_abstract_directory_view_on_clipboard_changed (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	gtk_widget_queue_draw ((GtkWidget*) self);
}

/** DRAG AND DROP SOURCE */
static void
files_abstract_directory_view_on_drag_begin (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	self->should_activate = FALSE;
}

static void
files_abstract_directory_view_on_drag_data_get (FilesAbstractDirectoryView* self,
                                                GdkDragContext* context,
                                                GtkSelectionData* selection_data,
                                                guint info,
                                                guint timestamp)
{
	GList* _tmp0_;
	GList* _tmp3_;
	FilesFile* file = NULL;
	GList* _tmp4_;
	GList* _tmp5_;
	gconstpointer _tmp6_;
	FilesFile* _tmp7_;
	gboolean _tmp8_ = FALSE;
	FilesFile* _tmp9_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (selection_data != NULL);
	_tmp0_ = self->source_drag_file_list;
	if (_tmp0_ == NULL) {
		GList* _tmp1_;
		GList* _tmp2_;
		_tmp1_ = files_abstract_directory_view_get_selected_files (self);
		_tmp2_ = files_abstract_directory_view_get_selected_files_for_transfer (self, _tmp1_);
		(self->source_drag_file_list == NULL) ? NULL : (self->source_drag_file_list = (_g_list_free__g_object_unref0_ (self->source_drag_file_list), NULL));
		self->source_drag_file_list = _tmp2_;
	}
	_tmp3_ = self->source_drag_file_list;
	if (_tmp3_ == NULL) {
		return;
	}
	_tmp4_ = self->source_drag_file_list;
	_tmp5_ = g_list_first (_tmp4_);
	_tmp6_ = _tmp5_->data;
	_tmp7_ = _g_object_ref0 ((FilesFile*) _tmp6_);
	file = _tmp7_;
	_tmp9_ = file;
	if (_tmp9_ != NULL) {
		FilesFile* _tmp10_;
		GdkPixbuf* _tmp11_;
		_tmp10_ = file;
		_tmp11_ = _tmp10_->pix;
		_tmp8_ = _tmp11_ != NULL;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		FilesFile* _tmp12_;
		GdkPixbuf* _tmp13_;
		_tmp12_ = file;
		_tmp13_ = _tmp12_->pix;
		gtk_drag_set_icon_gicon (context, (GIcon*) _tmp13_, 0, 0);
	} else {
		gtk_drag_set_icon_name (context, "stock-file", 0, 0);
	}
	switch (info) {
		case FILES_TARGET_TYPE_STRING:
		{
			GList* _tmp14_;
			_tmp14_ = self->source_drag_file_list;
			files_dnd_handler_set_selection_data_as_text (selection_data, _tmp14_, "");
			break;
		}
		case FILES_TARGET_TYPE_TEXT_URI_LIST:
		{
			GList* _tmp15_;
			_tmp15_ = self->source_drag_file_list;
			files_dnd_handler_set_selection_data_as_file_list (selection_data, _tmp15_, "");
			break;
		}
		default:
		{
			g_warning ("AbstractDirectoryView.vala:1545: ignored info %u", info);
			break;
		}
	}
	_g_object_unref0 (file);
}

static void
files_abstract_directory_view_on_drag_data_delete (FilesAbstractDirectoryView* self)
{
	GtkScrolledWindow* _tmp0_;
	GtkWidget* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->scrolled_window;
	_tmp1_ = gtk_bin_get_child ((GtkBin*) _tmp0_);
	g_signal_stop_emission_by_name (_tmp1_, "drag-data-delete");
}

static void
files_abstract_directory_view_on_drag_end (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	(self->source_drag_file_list == NULL) ? NULL : (self->source_drag_file_list = (_g_list_free__g_object_unref0_ (self->source_drag_file_list), NULL));
	self->source_drag_file_list = NULL;
}

/** DRAG AND DROP DESTINATION */
static gboolean
files_abstract_directory_view_on_drag_motion (FilesAbstractDirectoryView* self,
                                              GdkDragContext* context,
                                              gint x,
                                              gint y,
                                              guint timestamp)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (context != NULL, FALSE);
	if (self->priv->destination_data_ready) {
		files_abstract_directory_view_check_destination_actions_and_target_file (self, context, x, y, timestamp);
	} else {
		files_abstract_directory_view_get_drag_data (self, context, x, y, timestamp);
		result = FALSE;
		return result;
	}
	if (self->priv->drag_scroll_timer_id == ((guint) 0)) {
		GdkDevice* _tmp0_;
		_tmp0_ = gtk_get_current_event_device ();
		files_abstract_directory_view_start_drag_scroll_timer (self, _tmp0_);
	}
	gdk_drag_status (context, self->priv->current_suggested_action, (guint32) timestamp);
	result = TRUE;
	return result;
}

static gboolean
files_abstract_directory_view_on_drag_drop (FilesAbstractDirectoryView* self,
                                            GdkDragContext* context,
                                            gint x,
                                            gint y,
                                            guint timestamp)
{
	GtkTargetList* list = NULL;
	gchar* uri = NULL;
	GdkAtom target = (GdkAtom) 0U;
	GtkScrolledWindow* _tmp0_;
	GtkWidget* _tmp1_;
	GtkTargetList* _tmp2_;
	GtkScrolledWindow* _tmp23_;
	GtkWidget* _tmp24_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (context != NULL, FALSE);
	list = NULL;
	uri = NULL;
	self->priv->drop_occurred = TRUE;
	_tmp0_ = self->scrolled_window;
	_tmp1_ = gtk_bin_get_child ((GtkBin*) _tmp0_);
	_tmp2_ = list;
	target = gtk_drag_dest_find_target (_tmp1_, context, _tmp2_);
	if (target == gdk_atom_intern_static_string ("XdndDirectSave0")) {
		FilesFile* target_file = NULL;
		FilesFile* _tmp3_;
		gchar* filename = NULL;
		FilesDndHandler* _tmp4_;
		GdkWindow* _tmp5_;
		gchar* _tmp6_;
		gboolean _tmp7_ = FALSE;
		FilesFile* _tmp8_;
		_tmp3_ = files_abstract_directory_view_get_drop_target_file (self, x, y);
		target_file = _tmp3_;
		_tmp4_ = files_abstract_directory_view_dnd_handler;
		_tmp5_ = gdk_drag_context_get_source_window (context);
		_tmp6_ = files_dnd_handler_get_source_filename (_tmp4_, _tmp5_);
		filename = _tmp6_;
		_tmp8_ = target_file;
		if (_tmp8_ != NULL) {
			const gchar* _tmp9_;
			_tmp9_ = filename;
			_tmp7_ = _tmp9_ != NULL;
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			FilesFile* _tmp10_;
			GFile* _tmp11_;
			const gchar* _tmp12_;
			GFile* _tmp13_;
			GFile* _tmp14_;
			gchar* _tmp15_;
			FilesDndHandler* _tmp16_;
			GdkWindow* _tmp17_;
			const gchar* _tmp18_;
			_tmp10_ = target_file;
			_tmp11_ = files_file_get_target_location (_tmp10_);
			_tmp12_ = filename;
			_tmp13_ = g_file_resolve_relative_path (_tmp11_, _tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = g_file_get_uri (_tmp14_);
			_g_free0 (uri);
			uri = _tmp15_;
			_g_object_unref0 (_tmp14_);
			_tmp16_ = files_abstract_directory_view_dnd_handler;
			_tmp17_ = gdk_drag_context_get_source_window (context);
			_tmp18_ = uri;
			files_dnd_handler_set_source_uri (_tmp16_, _tmp17_, _tmp18_);
		} else {
			FilesViewWindow* _tmp19_;
			FilesViewWindow* _tmp20_;
			GraniteMessageDialog* _tmp21_;
			GraniteMessageDialog* _tmp22_;
			_tmp19_ = files_abstract_directory_view_get_window (self);
			_tmp20_ = _tmp19_;
			_tmp21_ = pf_dialogs_show_error_dialog (_ ("Cannot drop this file"), _ ("Invalid file name provided"), (GtkWindow*) _tmp20_);
			_tmp22_ = _tmp21_;
			_g_object_unref0 (_tmp22_);
			result = FALSE;
			_g_free0 (filename);
			_g_object_unref0 (target_file);
			_g_free0 (uri);
			_gtk_target_list_unref0 (list);
			return result;
		}
		_g_free0 (filename);
		_g_object_unref0 (target_file);
	}
	_tmp23_ = self->scrolled_window;
	_tmp24_ = gtk_bin_get_child ((GtkBin*) _tmp23_);
	gtk_drag_get_data (_tmp24_, context, target, (guint32) timestamp);
	result = TRUE;
	_g_free0 (uri);
	_gtk_target_list_unref0 (list);
	return result;
}

static gboolean
____lambda125_ (FilesAbstractDirectoryView* self)
{
	gboolean result;
	files_abstract_directory_view_update_selected_files_and_menu (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
_____lambda125__gsource_func (gpointer self)
{
	gboolean result;
	result = ____lambda125_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
files_abstract_directory_view_on_drag_data_received (FilesAbstractDirectoryView* self,
                                                     GdkDragContext* context,
                                                     gint x,
                                                     gint y,
                                                     GtkSelectionData* selection_data,
                                                     guint info,
                                                     guint timestamp)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (selection_data != NULL);
	if (info == ((guint) FILES_TARGET_TYPE_TEXT_URI_LIST)) {
		GList* _tmp1_;
		_tmp1_ = self->priv->destination_drop_file_list;
		_tmp0_ = _tmp1_ == NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gchar* text = NULL;
		gchar* _tmp2_ = NULL;
		gboolean _tmp3_;
		_tmp3_ = files_dnd_handler_selection_data_is_uri_list (selection_data, info, &_tmp2_);
		_g_free0 (text);
		text = _tmp2_;
		if (_tmp3_) {
			const gchar* _tmp4_;
			GList* _tmp5_;
			_tmp4_ = text;
			_tmp5_ = files_file_utils_files_from_escaped_uris (_tmp4_);
			(self->priv->destination_drop_file_list == NULL) ? NULL : (self->priv->destination_drop_file_list = (_g_list_free__g_object_unref0_ (self->priv->destination_drop_file_list), NULL));
			self->priv->destination_drop_file_list = _tmp5_;
			self->priv->destination_data_ready = TRUE;
		}
		_g_free0 (text);
	}
	if (self->priv->drop_occurred) {
		gboolean success = FALSE;
		success = FALSE;
		self->priv->drop_occurred = FALSE;
		switch (info) {
			case FILES_TARGET_TYPE_XDND_DIRECT_SAVE0:
			{
				FilesDndHandler* _tmp6_;
				GdkWindow* _tmp7_;
				FilesFile* _tmp8_;
				_tmp6_ = files_abstract_directory_view_dnd_handler;
				_tmp7_ = gdk_drag_context_get_source_window (context);
				_tmp8_ = self->priv->drop_target_file;
				success = files_dnd_handler_handle_xdnddirectsave (_tmp6_, _tmp7_, _tmp8_, selection_data);
				break;
			}
			case FILES_TARGET_TYPE_NETSCAPE_URL:
			{
				FilesDndHandler* _tmp9_;
				GdkWindow* _tmp10_;
				FilesFile* _tmp11_;
				_tmp9_ = files_abstract_directory_view_dnd_handler;
				_tmp10_ = gdk_drag_context_get_source_window (context);
				_tmp11_ = self->priv->drop_target_file;
				success = files_dnd_handler_handle_netscape_url (_tmp9_, _tmp10_, _tmp11_, selection_data);
				break;
			}
			case FILES_TARGET_TYPE_TEXT_URI_LIST:
			{
				GList* _tmp12_;
				FilesDndHandler* _tmp13_;
				GtkScrolledWindow* _tmp14_;
				GtkWidget* _tmp15_;
				FilesFile* _tmp16_;
				GList* _tmp17_;
				GtkWindow* _tmp18_;
				GtkApplicationWindow* _tmp19_;
				if ((self->priv->current_actions & FILES_ABSTRACT_DIRECTORY_VIEW_FILE_DRAG_ACTIONS) == 0) {
					break;
				}
				_tmp12_ = self->selected_files;
				if (_tmp12_ != NULL) {
					files_abstract_directory_view_unselect_all (self);
				}
				_tmp13_ = files_abstract_directory_view_dnd_handler;
				_tmp14_ = self->scrolled_window;
				_tmp15_ = gtk_bin_get_child ((GtkBin*) _tmp14_);
				_tmp16_ = self->priv->drop_target_file;
				_tmp17_ = self->priv->destination_drop_file_list;
				_tmp18_ = files_get_active_window ();
				_tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_application_window_get_type (), GtkApplicationWindow);
				success = files_dnd_handler_handle_file_drag_actions (_tmp13_, _tmp15_, _tmp16_, _tmp17_, self->priv->current_actions, self->priv->current_suggested_action, _tmp19_, (guint32) timestamp);
				_g_object_unref0 (_tmp19_);
				g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _____lambda125__gsource_func, g_object_ref (self), g_object_unref);
				break;
			}
			default:
			{
				break;
			}
		}
		gtk_drag_finish (context, success, FALSE, (guint32) timestamp);
		files_abstract_directory_view_clear_destination_drag_data (self);
	}
}

static void
files_abstract_directory_view_on_drag_leave (FilesAbstractDirectoryView* self)
{
	FilesIconRenderer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->icon_renderer;
	files_icon_renderer_set_drop_file (_tmp0_, NULL);
	files_abstract_directory_view_cancel_timeout (self, &self->priv->drag_scroll_timer_id);
	files_abstract_directory_view_cancel_timeout (self, &self->priv->drag_enter_timer_id);
	_tmp1_ = files_abstract_directory_view_get_drop_highlight (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		files_abstract_directory_view_set_drop_highlight (self, FALSE);
		gtk_widget_queue_draw ((GtkWidget*) self);
	}
	files_abstract_directory_view_highlight_path (self, NULL);
	files_abstract_directory_view_clear_destination_drag_data (self);
}

/** DnD destination helpers */
static void
files_abstract_directory_view_clear_destination_drag_data (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	self->priv->destination_data_ready = FALSE;
	self->current_target_type = GDK_NONE;
	(self->priv->destination_drop_file_list == NULL) ? NULL : (self->priv->destination_drop_file_list = (_g_list_free__g_object_unref0_ (self->priv->destination_drop_file_list), NULL));
	self->priv->destination_drop_file_list = NULL;
	files_abstract_directory_view_cancel_timeout (self, &self->priv->drag_scroll_timer_id);
}

static FilesFile*
files_abstract_directory_view_get_drop_target_file (FilesAbstractDirectoryView* self,
                                                    gint win_x,
                                                    gint win_y)
{
	GtkTreePath* path = NULL;
	GtkTreePath* _tmp0_;
	FilesFile* file = NULL;
	GtkTreePath* _tmp1_;
	GtkTreePath* _tmp15_;
	FilesFile* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = files_abstract_directory_view_get_path_at_pos (self, win_x, win_y);
	path = _tmp0_;
	file = NULL;
	_tmp1_ = path;
	if (_tmp1_ != NULL) {
		FilesListModel* _tmp2_;
		GtkTreePath* _tmp3_;
		FilesFile* _tmp4_;
		FilesFile* _tmp5_;
		_tmp2_ = self->model;
		_tmp3_ = path;
		_tmp4_ = files_list_model_file_for_path (_tmp2_, _tmp3_);
		_g_object_unref0 (file);
		file = _tmp4_;
		_tmp5_ = file;
		if (_tmp5_ == NULL) {
			GtkTreePath* folder_path = NULL;
			GtkTreePath* _tmp6_;
			GtkTreePath* _tmp7_;
			GtkTreePath* _tmp8_;
			FilesListModel* _tmp9_;
			GtkTreePath* _tmp10_;
			FilesFile* _tmp11_;
			_tmp6_ = path;
			_tmp7_ = gtk_tree_path_copy (_tmp6_);
			folder_path = _tmp7_;
			_tmp8_ = folder_path;
			gtk_tree_path_up (_tmp8_);
			_tmp9_ = self->model;
			_tmp10_ = folder_path;
			_tmp11_ = files_list_model_file_for_path (_tmp9_, _tmp10_);
			_g_object_unref0 (file);
			file = _tmp11_;
			__vala_GtkTreePath_free0 (folder_path);
		} else {
			gboolean _tmp12_ = FALSE;
			FilesFile* _tmp13_;
			_tmp13_ = file;
			if (!files_file_is_folder (_tmp13_)) {
				FilesFile* _tmp14_;
				_tmp14_ = file;
				_tmp12_ = !files_file_is_executable (_tmp14_);
			} else {
				_tmp12_ = FALSE;
			}
			if (_tmp12_) {
				_g_object_unref0 (file);
				file = NULL;
				__vala_GtkTreePath_free0 (path);
				path = NULL;
			}
		}
	}
	_tmp15_ = path;
	if (_tmp15_ == NULL) {
		FilesViewSlot* _tmp16_;
		FilesDirectory* _tmp17_;
		FilesDirectory* _tmp18_;
		FilesFile* _tmp19_;
		FilesFile* _tmp20_;
		FilesFile* _tmp21_;
		_tmp16_ = self->slot;
		_tmp17_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = files_directory_get_file (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = _g_object_ref0 (_tmp20_);
		_g_object_unref0 (file);
		file = _tmp21_;
	}
	result = file;
	__vala_GtkTreePath_free0 (path);
	return result;
}

static void
files_abstract_directory_view_get_drag_data (FilesAbstractDirectoryView* self,
                                             GdkDragContext* context,
                                             gint x,
                                             gint y,
                                             guint timestamp)
{
	GtkTargetList* list = NULL;
	GdkAtom target = (GdkAtom) 0U;
	GtkScrolledWindow* _tmp0_;
	GtkWidget* _tmp1_;
	GtkTargetList* _tmp2_;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	list = NULL;
	_tmp0_ = self->scrolled_window;
	_tmp1_ = gtk_bin_get_child ((GtkBin*) _tmp0_);
	_tmp2_ = list;
	target = gtk_drag_dest_find_target (_tmp1_, context, _tmp2_);
	self->current_target_type = target;
	if (target == gdk_atom_intern_static_string ("XdndDirectSave0")) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = target == gdk_atom_intern_static_string ("_NETSCAPE_URL");
	}
	if (_tmp3_) {
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		FilesFile* _tmp6_;
		_tmp6_ = self->priv->drop_target_file;
		if (_tmp6_ != NULL) {
			FilesFile* _tmp7_;
			_tmp7_ = self->priv->drop_target_file;
			_tmp5_ = files_file_is_folder (_tmp7_);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			FilesFile* _tmp8_;
			_tmp8_ = self->priv->drop_target_file;
			_tmp4_ = files_file_is_writable (_tmp8_);
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			FilesIconRenderer* _tmp9_;
			FilesFile* _tmp10_;
			GtkTreePath* _tmp11_;
			GtkTreePath* _tmp12_;
			_tmp9_ = self->icon_renderer;
			_tmp10_ = self->priv->drop_target_file;
			g_object_set ((GObject*) _tmp9_, "drop-file", _tmp10_, NULL);
			_tmp11_ = files_abstract_directory_view_get_path_at_pos (self, x, y);
			_tmp12_ = _tmp11_;
			files_abstract_directory_view_highlight_path (self, _tmp12_);
			__vala_GtkTreePath_free0 (_tmp12_);
		}
		self->priv->destination_data_ready = TRUE;
	} else {
		gboolean _tmp13_ = FALSE;
		if (target != GDK_NONE) {
			GList* _tmp14_;
			_tmp14_ = self->priv->destination_drop_file_list;
			_tmp13_ = _tmp14_ == NULL;
		} else {
			_tmp13_ = FALSE;
		}
		if (_tmp13_) {
			GtkScrolledWindow* _tmp15_;
			GtkWidget* _tmp16_;
			_tmp15_ = self->scrolled_window;
			_tmp16_ = gtk_bin_get_child ((GtkBin*) _tmp15_);
			gtk_drag_get_data (_tmp16_, context, target, (guint32) timestamp);
		}
	}
	_gtk_target_list_unref0 (list);
}

static gboolean
_____lambda126_ (FilesAbstractDirectoryView* self)
{
	FilesFile* _tmp0_;
	GFile* _tmp1_;
	gboolean result;
	_tmp0_ = self->priv->drop_target_file;
	_tmp1_ = files_file_get_target_location (_tmp0_);
	files_abstract_directory_view_load_location (self, _tmp1_);
	self->priv->drag_enter_timer_id = (guint) 0;
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
______lambda126__gsource_func (gpointer self)
{
	gboolean result;
	result = _____lambda126_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
files_abstract_directory_view_check_destination_actions_and_target_file (FilesAbstractDirectoryView* self,
                                                                         GdkDragContext* context,
                                                                         gint x,
                                                                         gint y,
                                                                         guint timestamp)
{
	const gchar* _tmp0_ = NULL;
	FilesFile* _tmp1_;
	gchar* current_uri = NULL;
	gchar* _tmp5_;
	FilesFile* _tmp6_;
	const gchar* _tmp7_ = NULL;
	FilesFile* _tmp8_;
	gchar* uri = NULL;
	gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	_tmp1_ = self->priv->drop_target_file;
	if (_tmp1_ != NULL) {
		FilesFile* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp2_ = self->priv->drop_target_file;
		_tmp3_ = files_file_get_uri (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = "";
	}
	_tmp5_ = g_strdup (_tmp0_);
	current_uri = _tmp5_;
	_tmp6_ = files_abstract_directory_view_get_drop_target_file (self, x, y);
	_g_object_unref0 (self->priv->drop_target_file);
	self->priv->drop_target_file = _tmp6_;
	_tmp8_ = self->priv->drop_target_file;
	if (_tmp8_ != NULL) {
		FilesFile* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp9_ = self->priv->drop_target_file;
		_tmp10_ = files_file_get_uri (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp7_ = _tmp11_;
	} else {
		_tmp7_ = "";
	}
	_tmp12_ = g_strdup (_tmp7_);
	uri = _tmp12_;
	_tmp13_ = uri;
	_tmp14_ = current_uri;
	if (g_strcmp0 (_tmp13_, _tmp14_) != 0) {
		FilesFile* _tmp15_;
		files_abstract_directory_view_cancel_timeout (self, &self->priv->drag_enter_timer_id);
		self->priv->current_actions = GDK_ACTION_DEFAULT;
		self->priv->current_suggested_action = GDK_ACTION_DEFAULT;
		_tmp15_ = self->priv->drop_target_file;
		if (_tmp15_ != NULL) {
			FilesFile* _tmp20_;
			GtkTreePath* _tmp21_;
			GtkTreePath* _tmp22_;
			gboolean _tmp23_ = FALSE;
			FilesFile* _tmp24_;
			if (self->current_target_type == gdk_atom_intern_static_string ("XdndDirectSave0")) {
				self->priv->current_suggested_action = GDK_ACTION_COPY;
				self->priv->current_actions = self->priv->current_suggested_action;
			} else {
				FilesFile* _tmp16_;
				GList* _tmp17_;
				GdkDragAction _tmp18_ = 0U;
				GdkDragAction _tmp19_;
				_tmp16_ = self->priv->drop_target_file;
				_tmp17_ = self->priv->destination_drop_file_list;
				_tmp19_ = files_dnd_handler_file_accepts_drop (_tmp16_, _tmp17_, gdk_drag_context_get_selected_action (context), gdk_drag_context_get_actions (context), &_tmp18_);
				self->priv->current_suggested_action = _tmp18_;
				self->priv->current_actions = _tmp19_;
			}
			_tmp20_ = self->priv->drop_target_file;
			_tmp21_ = files_abstract_directory_view_get_path_at_pos (self, x, y);
			_tmp22_ = _tmp21_;
			files_abstract_directory_view_highlight_drop_file (self, _tmp20_, self->priv->current_actions, _tmp22_);
			__vala_GtkTreePath_free0 (_tmp22_);
			_tmp24_ = self->priv->drop_target_file;
			if (files_file_is_folder (_tmp24_)) {
				FilesFile* _tmp25_;
				_tmp25_ = self->priv->drop_target_file;
				_tmp23_ = files_abstract_directory_view_is_valid_drop_folder (self, _tmp25_);
			} else {
				_tmp23_ = FALSE;
			}
			if (_tmp23_) {
				self->priv->drag_enter_timer_id = g_timeout_add_full (G_PRIORITY_LOW, (guint) 1000, ______lambda126__gsource_func, g_object_ref (self), g_object_unref);
			}
		}
	}
	_g_free0 (uri);
	_g_free0 (current_uri);
}

static gboolean
files_abstract_directory_view_is_valid_drop_folder (FilesAbstractDirectoryView* self,
                                                    FilesFile* file)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	FilesViewSlot* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (file != NULL, FALSE);
	_tmp2_ = files_file_get_uri (file);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->slot;
	_tmp5_ = files_abstract_slot_get_uri ((FilesAbstractSlot*) _tmp4_);
	_tmp6_ = _tmp5_;
	if (g_strcmp0 (_tmp3_, _tmp6_) != 0) {
		GList* _tmp7_;
		_tmp7_ = self->source_drag_file_list;
		_tmp1_ = _tmp7_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GList* _tmp8_;
		_tmp8_ = self->source_drag_file_list;
		_tmp0_ = g_list_index (_tmp8_, file) < 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		result = TRUE;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}

static void
files_abstract_directory_view_highlight_drop_file (FilesAbstractDirectoryView* self,
                                                   FilesFile* drop_file,
                                                   GdkDragAction action,
                                                   GtkTreePath* path)
{
	gboolean can_drop = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	FilesFile* _tmp2_ = NULL;
	FilesIconRenderer* _tmp3_;
	GtkTreePath* _tmp4_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (drop_file != NULL);
	can_drop = action > GDK_ACTION_DEFAULT;
	_tmp0_ = files_abstract_directory_view_get_drop_highlight (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != can_drop) {
		files_abstract_directory_view_set_drop_highlight (self, can_drop);
		gtk_widget_queue_draw ((GtkWidget*) self);
	}
	if (can_drop) {
		_tmp2_ = drop_file;
	} else {
		_tmp2_ = NULL;
	}
	_tmp3_ = self->icon_renderer;
	files_icon_renderer_set_drop_file (_tmp3_, _tmp2_);
	if (can_drop) {
		_tmp4_ = path;
	} else {
		_tmp4_ = NULL;
	}
	files_abstract_directory_view_highlight_path (self, _tmp4_);
}

/** MENU FUNCTIONS */
static GVariant*
_variant_new1 (FilesOpenFlag value)
{
	return g_variant_ref_sink (g_variant_new_int32 (value));
}

static GVariant*
_variant_new2 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new3 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new4 (FilesOpenFlag value)
{
	return g_variant_ref_sink (g_variant_new_int32 (value));
}

static GVariant*
_variant_new5 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new6 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

void
files_abstract_directory_view_show_context_menu (FilesAbstractDirectoryView* self,
                                                 GdkEvent* event)
{
	FilesViewWindow* _tmp0_;
	FilesViewWindow* _tmp1_;
	GtkMenu* menu = NULL;
	GtkMenu* _tmp2_;
	GList* selection = NULL;
	GList* _tmp3_;
	FilesFile* selected_file = NULL;
	GList* _tmp4_;
	gconstpointer _tmp5_;
	FilesFile* _tmp6_;
	GMenu* open_submenu = NULL;
	GMenu* _tmp7_;
	GSimpleActionGroup* _tmp8_;
	gboolean _tmp29_ = FALSE;
	gboolean _tmp30_ = FALSE;
	FilesFile* _tmp31_;
	GtkMenuItem* open_submenu_item = NULL;
	GtkMenuItem* _tmp105_;
	GMenu* _tmp106_;
	GtkMenuItem* paste_menuitem = NULL;
	GtkMenuItem* _tmp118_;
	GtkMenuItem* _tmp119_;
	GtkMenuItem* bookmark_menuitem = NULL;
	GtkMenuItem* _tmp120_;
	GtkMenuItem* _tmp121_;
	GraniteAccelLabel* _tmp122_;
	GraniteAccelLabel* _tmp123_;
	GtkMenuItem* _tmp124_;
	GtkMenuItem* properties_menuitem = NULL;
	GtkMenuItem* _tmp125_;
	GtkMenuItem* _tmp126_;
	GraniteAccelLabel* _tmp127_;
	GraniteAccelLabel* _tmp128_;
	GtkMenuItem* _tmp129_;
	GtkMenuItem* select_all_menuitem = NULL;
	GtkMenuItem* deselect_all_menuitem = NULL;
	GtkMenuItem* invert_selection_menuitem = NULL;
	GSimpleAction* bookmark_action = NULL;
	GSimpleActionGroup* _tmp155_;
	GAction* _tmp156_;
	GSimpleAction* _tmp157_;
	FilesBookmarkList* bookmark_list = NULL;
	FilesBookmarkList* _tmp158_;
	GList* _tmp159_;
	GtkMenu* _tmp421_;
	GtkMenu* _tmp422_;
	FilesViewSlot* _tmp423_;
	FilesDirectory* _tmp424_;
	FilesDirectory* _tmp425_;
	GtkMenu* _tmp428_;
	GtkMenu* _tmp429_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (event != NULL);
	_tmp0_ = files_abstract_directory_view_get_window (self);
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (_tmp1_ != NULL, "window != null");
	files_abstract_directory_view_update_menu_actions (self);
	_tmp2_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp2_);
	menu = _tmp2_;
	_tmp3_ = files_abstract_directory_view_get_files_for_action (self);
	selection = _tmp3_;
	_tmp4_ = selection;
	_tmp5_ = _tmp4_->data;
	_tmp6_ = _g_object_ref0 ((FilesFile*) _tmp5_);
	selected_file = _tmp6_;
	_tmp7_ = g_menu_new ();
	open_submenu = _tmp7_;
	_tmp8_ = self->priv->common_actions;
	if (g_action_group_get_action_enabled ((GActionGroup*) _tmp8_, "open-in")) {
		GMenuItem* new_tab_menuitem = NULL;
		GMenuItem* _tmp9_;
		GList* _tmp10_;
		GMenuItem* new_window_menuitem = NULL;
		GMenuItem* _tmp17_;
		GList* _tmp18_;
		GMenu* _tmp25_;
		GMenuItem* _tmp26_;
		GMenu* _tmp27_;
		GMenuItem* _tmp28_;
		_tmp9_ = g_menu_item_new (_ ("New Tab"), NULL);
		new_tab_menuitem = _tmp9_;
		_tmp10_ = self->selected_files;
		if (_tmp10_ != NULL) {
			GMenuItem* _tmp11_;
			GVariant* _tmp12_;
			GMenuItem* _tmp13_;
			GVariant* _tmp14_;
			_tmp11_ = new_tab_menuitem;
			_tmp12_ = _variant_new1 (FILES_OPEN_FLAG_NEW_TAB);
			g_menu_item_set_action_and_target_value (_tmp11_, "common.open-in", _tmp12_);
			_g_variant_unref0 (_tmp12_);
			_tmp13_ = new_tab_menuitem;
			_tmp14_ = _variant_new2 ("<Shift>Return");
			g_menu_item_set_attribute_value (_tmp13_, "accel", _tmp14_);
			_g_variant_unref0 (_tmp14_);
		} else {
			GMenuItem* _tmp15_;
			GVariant* _tmp16_;
			_tmp15_ = new_tab_menuitem;
			_tmp16_ = _variant_new3 ("TAB");
			g_menu_item_set_action_and_target_value (_tmp15_, "win.tab", _tmp16_);
			_g_variant_unref0 (_tmp16_);
		}
		_tmp17_ = g_menu_item_new (_ ("New Window"), NULL);
		new_window_menuitem = _tmp17_;
		_tmp18_ = self->selected_files;
		if (_tmp18_ != NULL) {
			GMenuItem* _tmp19_;
			GVariant* _tmp20_;
			GMenuItem* _tmp21_;
			GVariant* _tmp22_;
			_tmp19_ = new_window_menuitem;
			_tmp20_ = _variant_new4 (FILES_OPEN_FLAG_NEW_WINDOW);
			g_menu_item_set_action_and_target_value (_tmp19_, "common.open-in", _tmp20_);
			_g_variant_unref0 (_tmp20_);
			_tmp21_ = new_window_menuitem;
			_tmp22_ = _variant_new5 ("<Shift><Ctrl>Return");
			g_menu_item_set_attribute_value (_tmp21_, "accel", _tmp22_);
			_g_variant_unref0 (_tmp22_);
		} else {
			GMenuItem* _tmp23_;
			GVariant* _tmp24_;
			_tmp23_ = new_window_menuitem;
			_tmp24_ = _variant_new6 ("WINDOW");
			g_menu_item_set_action_and_target_value (_tmp23_, "win.tab", _tmp24_);
			_g_variant_unref0 (_tmp24_);
		}
		_tmp25_ = open_submenu;
		_tmp26_ = new_tab_menuitem;
		g_menu_append_item (_tmp25_, _tmp26_);
		_tmp27_ = open_submenu;
		_tmp28_ = new_window_menuitem;
		g_menu_append_item (_tmp27_, _tmp28_);
		_g_object_unref0 (new_window_menuitem);
		_g_object_unref0 (new_tab_menuitem);
	}
	_tmp31_ = selected_file;
	if (!files_file_is_mountable (_tmp31_)) {
		FilesFile* _tmp32_;
		_tmp32_ = selected_file;
		_tmp30_ = !files_file_is_root_network_folder (_tmp32_);
	} else {
		_tmp30_ = FALSE;
	}
	if (_tmp30_) {
		FilesFile* _tmp33_;
		_tmp33_ = selected_file;
		_tmp29_ = files_abstract_directory_view_can_open_file (self, _tmp33_, FALSE);
	} else {
		_tmp29_ = FALSE;
	}
	if (_tmp29_) {
		gboolean _tmp34_ = FALSE;
		FilesFile* _tmp35_;
		GList* _tmp56_;
		GList* _tmp57_;
		FilesFile* _tmp58_;
		gboolean _tmp59_ = FALSE;
		GList* _tmp60_;
		gboolean _tmp96_ = FALSE;
		GList* _tmp97_;
		_tmp35_ = selected_file;
		if (!files_file_is_folder (_tmp35_)) {
			FilesFile* _tmp36_;
			_tmp36_ = selected_file;
			_tmp34_ = files_file_is_executable (_tmp36_);
		} else {
			_tmp34_ = FALSE;
		}
		if (_tmp34_) {
			GtkMenuItem* run_menuitem = NULL;
			GtkMenuItem* _tmp37_;
			GtkMenuItem* _tmp38_;
			GtkMenu* _tmp39_;
			GtkMenuItem* _tmp40_;
			_tmp37_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_ ("Run"));
			g_object_ref_sink (_tmp37_);
			run_menuitem = _tmp37_;
			_tmp38_ = run_menuitem;
			gtk_actionable_set_action_name ((GtkActionable*) _tmp38_, "selection.open");
			_tmp39_ = menu;
			_tmp40_ = run_menuitem;
			gtk_container_add ((GtkContainer*) _tmp39_, (GtkWidget*) _tmp40_);
			_g_object_unref0 (run_menuitem);
		} else {
			gboolean _tmp41_ = FALSE;
			GAppInfo* _tmp42_;
			_tmp42_ = self->priv->default_app;
			if (_tmp42_ != NULL) {
				GAppInfo* _tmp43_;
				const gchar* _tmp44_;
				_tmp43_ = self->priv->default_app;
				_tmp44_ = g_app_info_get_id (_tmp43_);
				_tmp41_ = g_strcmp0 (_tmp44_, FILES_APP_ID ".desktop") != 0;
			} else {
				_tmp41_ = FALSE;
			}
			if (_tmp41_) {
				GtkMenuItem* open_menuitem = NULL;
				GtkMenuItem* _tmp45_;
				GtkMenuItem* _tmp46_;
				GAppInfo* _tmp47_;
				const gchar* _tmp48_;
				gchar* _tmp49_;
				gchar* _tmp50_;
				GraniteAccelLabel* _tmp51_;
				GraniteAccelLabel* _tmp52_;
				GtkMenuItem* _tmp53_;
				GtkMenu* _tmp54_;
				GtkMenuItem* _tmp55_;
				_tmp45_ = (GtkMenuItem*) gtk_menu_item_new ();
				g_object_ref_sink (_tmp45_);
				open_menuitem = _tmp45_;
				_tmp46_ = open_menuitem;
				_tmp47_ = self->priv->default_app;
				_tmp48_ = g_app_info_get_display_name (_tmp47_);
				_tmp49_ = g_strdup_printf (_ ("Open in %s"), _tmp48_);
				_tmp50_ = _tmp49_;
				_tmp51_ = granite_accel_label_new (_tmp50_, "Return");
				g_object_ref_sink (_tmp51_);
				_tmp52_ = _tmp51_;
				gtk_container_add ((GtkContainer*) _tmp46_, (GtkWidget*) _tmp52_);
				_g_object_unref0 (_tmp52_);
				_g_free0 (_tmp50_);
				_tmp53_ = open_menuitem;
				gtk_actionable_set_action_name ((GtkActionable*) _tmp53_, "selection.open-with-default");
				_tmp54_ = menu;
				_tmp55_ = open_menuitem;
				gtk_container_add ((GtkContainer*) _tmp54_, (GtkWidget*) _tmp55_);
				_g_object_unref0 (open_menuitem);
			}
		}
		_tmp56_ = selection;
		_tmp57_ = files_mime_actions_get_applications_for_files (_tmp56_);
		(self->priv->open_with_apps == NULL) ? NULL : (self->priv->open_with_apps = (_g_list_free__g_object_unref0_ (self->priv->open_with_apps), NULL));
		self->priv->open_with_apps = _tmp57_;
		_tmp58_ = selected_file;
		if (files_file_is_executable (_tmp58_) == FALSE) {
			files_abstract_directory_view_filter_default_app_from_open_with_apps (self);
		}
		files_abstract_directory_view_filter_this_app_from_open_with_apps (self);
		_tmp60_ = self->priv->open_with_apps;
		if (_tmp60_ != NULL) {
			GList* _tmp61_;
			gconstpointer _tmp62_;
			_tmp61_ = self->priv->open_with_apps;
			_tmp62_ = _tmp61_->data;
			_tmp59_ = ((GAppInfo*) _tmp62_) != NULL;
		} else {
			_tmp59_ = FALSE;
		}
		if (_tmp59_) {
			const gchar* last_label = NULL;
			const gchar* last_exec = NULL;
			guint count = 0U;
			GMenu* apps_section = NULL;
			GMenu* _tmp63_;
			GList* _tmp64_;
			last_label = "";
			last_exec = "";
			count = (guint) 0;
			_tmp63_ = g_menu_new ();
			apps_section = _tmp63_;
			_tmp64_ = self->priv->open_with_apps;
			{
				GList* app_info_collection = NULL;
				GList* app_info_it = NULL;
				app_info_collection = _tmp64_;
				for (app_info_it = app_info_collection; app_info_it != NULL; app_info_it = app_info_it->next) {
					GAppInfo* app_info = NULL;
					app_info = (GAppInfo*) app_info_it->data;
					{
						const gchar* label = NULL;
						GAppInfo* _tmp65_;
						const gchar* _tmp66_;
						const gchar* exec = NULL;
						GAppInfo* _tmp67_;
						const gchar* _tmp68_;
						gchar** _tmp69_;
						gchar** _tmp70_;
						gchar** _tmp71_;
						gint _tmp71__length1;
						const gchar* _tmp72_;
						const gchar* _tmp73_;
						gboolean _tmp74_ = FALSE;
						const gchar* _tmp75_;
						const gchar* _tmp76_;
						const gchar* _tmp91_;
						const gchar* _tmp92_;
						guint _tmp93_;
						_tmp65_ = app_info;
						_tmp66_ = g_app_info_get_display_name (_tmp65_);
						label = _tmp66_;
						_tmp67_ = app_info;
						_tmp68_ = g_app_info_get_executable (_tmp67_);
						_tmp70_ = _tmp69_ = g_strsplit (_tmp68_, " ", 0);
						_tmp71_ = _tmp70_;
						_tmp71__length1 = _vala_array_length (_tmp69_);
						_tmp72_ = _tmp71_[0];
						_tmp73_ = _tmp72_;
						_tmp71_ = (_vala_array_free (_tmp71_, _tmp71__length1, (GDestroyNotify) g_free), NULL);
						exec = _tmp73_;
						_tmp75_ = label;
						_tmp76_ = last_label;
						if (g_strcmp0 (_tmp75_, _tmp76_) != 0) {
							_tmp74_ = TRUE;
						} else {
							const gchar* _tmp77_;
							const gchar* _tmp78_;
							_tmp77_ = exec;
							_tmp78_ = last_exec;
							_tmp74_ = g_strcmp0 (_tmp77_, _tmp78_) != 0;
						}
						if (_tmp74_) {
							GMenuItem* menuitem = NULL;
							const gchar* _tmp79_;
							GVariant* _tmp80_;
							GVariant* _tmp81_;
							gchar* _tmp82_;
							gchar* _tmp83_;
							GMenuItem* _tmp84_;
							GMenuItem* _tmp85_;
							GMenuItem* _tmp86_;
							GAppInfo* _tmp87_;
							GIcon* _tmp88_;
							GMenu* _tmp89_;
							GMenuItem* _tmp90_;
							_tmp79_ = label;
							_tmp80_ = g_variant_new_uint32 ((guint32) count);
							g_variant_ref_sink (_tmp80_);
							_tmp81_ = _tmp80_;
							_tmp82_ = g_action_print_detailed_name ("selection.open-with-app", _tmp81_);
							_tmp83_ = _tmp82_;
							_tmp84_ = g_menu_item_new (_tmp79_, _tmp83_);
							_tmp85_ = _tmp84_;
							_g_free0 (_tmp83_);
							_g_variant_unref0 (_tmp81_);
							menuitem = _tmp85_;
							_tmp86_ = menuitem;
							_tmp87_ = app_info;
							_tmp88_ = g_app_info_get_icon (_tmp87_);
							g_menu_item_set_icon (_tmp86_, _tmp88_);
							_tmp89_ = apps_section;
							_tmp90_ = menuitem;
							g_menu_append_item (_tmp89_, _tmp90_);
							_g_object_unref0 (menuitem);
						}
						_tmp91_ = label;
						last_label = _tmp91_;
						_tmp92_ = exec;
						last_exec = _tmp92_;
						_tmp93_ = count;
						count = _tmp93_ + 1;
					}
				}
			}
			if (count > ((guint) 0)) {
				GMenu* _tmp94_;
				GMenu* _tmp95_;
				_tmp94_ = open_submenu;
				_tmp95_ = apps_section;
				g_menu_append_section (_tmp94_, NULL, (GMenuModel*) _tmp95_);
			}
			_g_object_unref0 (apps_section);
		}
		_tmp97_ = selection;
		if (_tmp97_ != NULL) {
			GList* _tmp98_;
			GList* _tmp99_;
			GList* _tmp100_;
			_tmp98_ = selection;
			_tmp99_ = g_list_first (_tmp98_);
			_tmp100_ = _tmp99_->next;
			_tmp96_ = _tmp100_ == NULL;
		} else {
			_tmp96_ = FALSE;
		}
		if (_tmp96_) {
			GMenu* other_section = NULL;
			GMenu* _tmp101_;
			GMenu* _tmp102_;
			GMenu* _tmp103_;
			GMenu* _tmp104_;
			_tmp101_ = g_menu_new ();
			other_section = _tmp101_;
			_tmp102_ = other_section;
			g_menu_append (_tmp102_, _ ("Other Application…"), "selection.open-with-other-app");
			_tmp103_ = open_submenu;
			_tmp104_ = other_section;
			g_menu_append_section (_tmp103_, NULL, (GMenuModel*) _tmp104_);
			_g_object_unref0 (other_section);
		}
	}
	_tmp105_ = (GtkMenuItem*) gtk_menu_item_new ();
	g_object_ref_sink (_tmp105_);
	open_submenu_item = _tmp105_;
	_tmp106_ = open_submenu;
	if (g_menu_model_get_n_items ((GMenuModel*) _tmp106_) > 0) {
		GtkMenuItem* _tmp107_;
		GMenu* _tmp108_;
		GtkMenu* _tmp109_;
		GtkMenu* _tmp110_;
		gboolean _tmp111_ = FALSE;
		FilesFile* _tmp112_;
		GtkMenu* _tmp116_;
		GtkMenuItem* _tmp117_;
		_tmp107_ = open_submenu_item;
		_tmp108_ = open_submenu;
		_tmp109_ = (GtkMenu*) gtk_menu_new_from_model ((GMenuModel*) _tmp108_);
		g_object_ref_sink (_tmp109_);
		_tmp110_ = _tmp109_;
		gtk_menu_item_set_submenu (_tmp107_, _tmp110_);
		_g_object_unref0 (_tmp110_);
		_tmp112_ = selected_file;
		if (files_file_is_folder (_tmp112_)) {
			_tmp111_ = TRUE;
		} else {
			FilesFile* _tmp113_;
			_tmp113_ = selected_file;
			_tmp111_ = files_file_is_root_network_folder (_tmp113_);
		}
		if (_tmp111_) {
			GtkMenuItem* _tmp114_;
			_tmp114_ = open_submenu_item;
			gtk_menu_item_set_label (_tmp114_, _ ("Open in"));
		} else {
			GtkMenuItem* _tmp115_;
			_tmp115_ = open_submenu_item;
			gtk_menu_item_set_label (_tmp115_, _ ("Open with"));
		}
		_tmp116_ = menu;
		_tmp117_ = open_submenu_item;
		gtk_container_add ((GtkContainer*) _tmp116_, (GtkWidget*) _tmp117_);
	}
	_tmp118_ = (GtkMenuItem*) gtk_menu_item_new ();
	g_object_ref_sink (_tmp118_);
	paste_menuitem = _tmp118_;
	_tmp119_ = paste_menuitem;
	gtk_actionable_set_action_name ((GtkActionable*) _tmp119_, "common.paste");
	_tmp120_ = (GtkMenuItem*) gtk_menu_item_new ();
	g_object_ref_sink (_tmp120_);
	bookmark_menuitem = _tmp120_;
	_tmp121_ = bookmark_menuitem;
	_tmp122_ = granite_accel_label_new (_ ("Add to Bookmarks"), "<Ctrl>d");
	g_object_ref_sink (_tmp122_);
	_tmp123_ = _tmp122_;
	gtk_container_add ((GtkContainer*) _tmp121_, (GtkWidget*) _tmp123_);
	_g_object_unref0 (_tmp123_);
	_tmp124_ = bookmark_menuitem;
	gtk_actionable_set_action_name ((GtkActionable*) _tmp124_, "common.bookmark");
	_tmp125_ = (GtkMenuItem*) gtk_menu_item_new ();
	g_object_ref_sink (_tmp125_);
	properties_menuitem = _tmp125_;
	_tmp126_ = properties_menuitem;
	_tmp127_ = granite_accel_label_new (_ ("Properties"), "<Alt>Return");
	g_object_ref_sink (_tmp127_);
	_tmp128_ = _tmp127_;
	gtk_container_add ((GtkContainer*) _tmp126_, (GtkWidget*) _tmp128_);
	_g_object_unref0 (_tmp128_);
	_tmp129_ = properties_menuitem;
	gtk_actionable_set_action_name ((GtkActionable*) _tmp129_, "common.properties");
	select_all_menuitem = NULL;
	deselect_all_menuitem = NULL;
	invert_selection_menuitem = NULL;
	if (!self->priv->all_selected) {
		gchar* _tmp130_;
		GtkMenuItem* _tmp131_ = NULL;
		GtkMenuItem* _tmp132_;
		GtkMenuItem* _tmp133_;
		const gchar* _tmp134_;
		const gchar* _tmp135_;
		GraniteAccelLabel* _tmp136_;
		GraniteAccelLabel* _tmp137_;
		GList* _tmp138_;
		_tmp130_ = g_strdup ("common.select-all");
		_tmp131_ = (GtkMenuItem*) gtk_menu_item_new ();
		gtk_actionable_set_action_name ((GtkActionable*) _tmp131_, _tmp130_);
		_g_free0 (_tmp130_);
		g_object_ref_sink (_tmp131_);
		_g_object_unref0 (select_all_menuitem);
		select_all_menuitem = _tmp131_;
		_tmp132_ = select_all_menuitem;
		_tmp133_ = select_all_menuitem;
		_tmp134_ = gtk_actionable_get_action_name ((GtkActionable*) _tmp133_);
		_tmp135_ = _tmp134_;
		_tmp136_ = granite_accel_label_new_from_action_name (_ ("Select All"), _tmp135_);
		g_object_ref_sink (_tmp136_);
		_tmp137_ = _tmp136_;
		gtk_container_add ((GtkContainer*) _tmp132_, (GtkWidget*) _tmp137_);
		_g_object_unref0 (_tmp137_);
		_tmp138_ = files_abstract_directory_view_get_selected_files (self);
		if (_tmp138_ != NULL) {
			gchar* _tmp139_;
			GtkMenuItem* _tmp140_ = NULL;
			GtkMenuItem* _tmp141_;
			GtkMenuItem* _tmp142_;
			const gchar* _tmp143_;
			const gchar* _tmp144_;
			GraniteAccelLabel* _tmp145_;
			GraniteAccelLabel* _tmp146_;
			_tmp139_ = g_strdup ("selection.invert-selection");
			_tmp140_ = (GtkMenuItem*) gtk_menu_item_new ();
			gtk_actionable_set_action_name ((GtkActionable*) _tmp140_, _tmp139_);
			_g_free0 (_tmp139_);
			g_object_ref_sink (_tmp140_);
			_g_object_unref0 (invert_selection_menuitem);
			invert_selection_menuitem = _tmp140_;
			_tmp141_ = invert_selection_menuitem;
			_tmp142_ = invert_selection_menuitem;
			_tmp143_ = gtk_actionable_get_action_name ((GtkActionable*) _tmp142_);
			_tmp144_ = _tmp143_;
			_tmp145_ = granite_accel_label_new_from_action_name (_ ("Invert Selection"), _tmp144_);
			g_object_ref_sink (_tmp145_);
			_tmp146_ = _tmp145_;
			gtk_container_add ((GtkContainer*) _tmp141_, (GtkWidget*) _tmp146_);
			_g_object_unref0 (_tmp146_);
		}
	} else {
		gchar* _tmp147_;
		GtkMenuItem* _tmp148_ = NULL;
		GtkMenuItem* _tmp149_;
		GtkMenuItem* _tmp150_;
		const gchar* _tmp151_;
		const gchar* _tmp152_;
		GraniteAccelLabel* _tmp153_;
		GraniteAccelLabel* _tmp154_;
		_tmp147_ = g_strdup ("common.select-all");
		_tmp148_ = (GtkMenuItem*) gtk_menu_item_new ();
		gtk_actionable_set_action_name ((GtkActionable*) _tmp148_, _tmp147_);
		_g_free0 (_tmp147_);
		g_object_ref_sink (_tmp148_);
		_g_object_unref0 (deselect_all_menuitem);
		deselect_all_menuitem = _tmp148_;
		_tmp149_ = deselect_all_menuitem;
		_tmp150_ = deselect_all_menuitem;
		_tmp151_ = gtk_actionable_get_action_name ((GtkActionable*) _tmp150_);
		_tmp152_ = _tmp151_;
		_tmp153_ = granite_accel_label_new_from_action_name (_ ("Deselect All"), _tmp152_);
		g_object_ref_sink (_tmp153_);
		_tmp154_ = _tmp153_;
		gtk_container_add ((GtkContainer*) _tmp149_, (GtkWidget*) _tmp154_);
		_g_object_unref0 (_tmp154_);
	}
	_tmp155_ = self->priv->common_actions;
	_tmp156_ = g_action_map_lookup_action ((GActionMap*) _tmp155_, "bookmark");
	_tmp157_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp156_, g_simple_action_get_type (), GSimpleAction));
	bookmark_action = _tmp157_;
	_tmp158_ = files_bookmark_list_get_instance ();
	bookmark_list = _tmp158_;
	_tmp159_ = files_abstract_directory_view_get_selected_files (self);
	if (_tmp159_ != NULL) {
		GtkMenuItem* cut_menuitem = NULL;
		GtkMenuItem* _tmp160_;
		GtkMenuItem* _tmp161_;
		GraniteAccelLabel* _tmp162_;
		GraniteAccelLabel* _tmp163_;
		GtkMenuItem* _tmp164_;
		GtkMenuItem* copy_menuitem = NULL;
		GtkMenuItem* _tmp165_;
		GtkMenuItem* _tmp166_;
		GraniteAccelLabel* _tmp167_;
		GraniteAccelLabel* _tmp168_;
		GtkMenuItem* _tmp169_;
		GtkMenuItem* trash_menuitem = NULL;
		GtkMenuItem* _tmp170_;
		GtkMenuItem* _tmp171_;
		GraniteAccelLabel* _tmp172_;
		GraniteAccelLabel* _tmp173_;
		GtkMenuItem* _tmp174_;
		GtkMenuItem* delete_menuitem = NULL;
		gchar* _tmp175_;
		GtkMenuItem* _tmp176_ = NULL;
		GtkMenuItem* _tmp177_;
		GtkStyleContext* _tmp178_;
		gboolean _tmp179_ = FALSE;
		_tmp160_ = (GtkMenuItem*) gtk_menu_item_new ();
		g_object_ref_sink (_tmp160_);
		cut_menuitem = _tmp160_;
		_tmp161_ = cut_menuitem;
		_tmp162_ = granite_accel_label_new (_ ("Cut"), "<Ctrl>x");
		g_object_ref_sink (_tmp162_);
		_tmp163_ = _tmp162_;
		gtk_container_add ((GtkContainer*) _tmp161_, (GtkWidget*) _tmp163_);
		_g_object_unref0 (_tmp163_);
		_tmp164_ = cut_menuitem;
		gtk_actionable_set_action_name ((GtkActionable*) _tmp164_, "selection.cut");
		_tmp165_ = (GtkMenuItem*) gtk_menu_item_new ();
		g_object_ref_sink (_tmp165_);
		copy_menuitem = _tmp165_;
		_tmp166_ = copy_menuitem;
		_tmp167_ = granite_accel_label_new (_ ("Copy"), "<Ctrl>c");
		g_object_ref_sink (_tmp167_);
		_tmp168_ = _tmp167_;
		gtk_container_add ((GtkContainer*) _tmp166_, (GtkWidget*) _tmp168_);
		_g_object_unref0 (_tmp168_);
		_tmp169_ = copy_menuitem;
		gtk_actionable_set_action_name ((GtkActionable*) _tmp169_, "common.copy");
		_tmp170_ = (GtkMenuItem*) gtk_menu_item_new ();
		g_object_ref_sink (_tmp170_);
		trash_menuitem = _tmp170_;
		_tmp171_ = trash_menuitem;
		_tmp172_ = granite_accel_label_new (_ ("Move to Trash"), "Delete");
		g_object_ref_sink (_tmp172_);
		_tmp173_ = _tmp172_;
		gtk_container_add ((GtkContainer*) _tmp171_, (GtkWidget*) _tmp173_);
		_g_object_unref0 (_tmp173_);
		_tmp174_ = trash_menuitem;
		gtk_actionable_set_action_name ((GtkActionable*) _tmp174_, "selection.trash");
		_tmp175_ = g_strdup ("selection.delete");
		_tmp176_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_ ("Delete Permanently"));
		gtk_actionable_set_action_name ((GtkActionable*) _tmp176_, _tmp175_);
		_g_free0 (_tmp175_);
		g_object_ref_sink (_tmp176_);
		delete_menuitem = _tmp176_;
		_tmp177_ = delete_menuitem;
		_tmp178_ = gtk_widget_get_style_context ((GtkWidget*) _tmp177_);
		gtk_style_context_add_class (_tmp178_, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
		if (self->priv->in_trash) {
			_tmp179_ = files_abstract_directory_view_valid_selection_for_restore (self);
		} else {
			_tmp179_ = FALSE;
		}
		if (_tmp179_) {
			GtkMenuItem* restore_menuitem = NULL;
			GtkMenuItem* _tmp180_;
			GtkMenuItem* _tmp181_;
			GtkMenu* _tmp182_;
			GtkSeparatorMenuItem* _tmp183_;
			GtkSeparatorMenuItem* _tmp184_;
			GtkMenu* _tmp185_;
			GtkMenuItem* _tmp186_;
			GtkMenu* _tmp187_;
			GtkMenuItem* _tmp188_;
			GtkMenu* _tmp189_;
			GtkSeparatorMenuItem* _tmp190_;
			GtkSeparatorMenuItem* _tmp191_;
			GtkMenu* _tmp192_;
			GtkMenuItem* _tmp193_;
			GtkMenuItem* _tmp194_;
			GtkMenuItem* _tmp197_;
			GtkMenuItem* _tmp200_;
			GtkMenu* _tmp203_;
			GtkSeparatorMenuItem* _tmp204_;
			GtkSeparatorMenuItem* _tmp205_;
			GtkMenu* _tmp206_;
			GtkMenuItem* _tmp207_;
			_tmp180_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_ ("Restore from Trash"));
			g_object_ref_sink (_tmp180_);
			restore_menuitem = _tmp180_;
			_tmp181_ = restore_menuitem;
			gtk_actionable_set_action_name ((GtkActionable*) _tmp181_, "selection.restore");
			_tmp182_ = menu;
			_tmp183_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
			g_object_ref_sink (_tmp183_);
			_tmp184_ = _tmp183_;
			gtk_container_add ((GtkContainer*) _tmp182_, (GtkWidget*) _tmp184_);
			_g_object_unref0 (_tmp184_);
			_tmp185_ = menu;
			_tmp186_ = restore_menuitem;
			gtk_container_add ((GtkContainer*) _tmp185_, (GtkWidget*) _tmp186_);
			_tmp187_ = menu;
			_tmp188_ = delete_menuitem;
			gtk_container_add ((GtkContainer*) _tmp187_, (GtkWidget*) _tmp188_);
			_tmp189_ = menu;
			_tmp190_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
			g_object_ref_sink (_tmp190_);
			_tmp191_ = _tmp190_;
			gtk_container_add ((GtkContainer*) _tmp189_, (GtkWidget*) _tmp191_);
			_g_object_unref0 (_tmp191_);
			_tmp192_ = menu;
			_tmp193_ = cut_menuitem;
			gtk_container_add ((GtkContainer*) _tmp192_, (GtkWidget*) _tmp193_);
			_tmp194_ = select_all_menuitem;
			if (_tmp194_ != NULL) {
				GtkMenu* _tmp195_;
				GtkMenuItem* _tmp196_;
				_tmp195_ = menu;
				_tmp196_ = select_all_menuitem;
				gtk_container_add ((GtkContainer*) _tmp195_, (GtkWidget*) _tmp196_);
			}
			_tmp197_ = deselect_all_menuitem;
			if (_tmp197_ != NULL) {
				GtkMenu* _tmp198_;
				GtkMenuItem* _tmp199_;
				_tmp198_ = menu;
				_tmp199_ = deselect_all_menuitem;
				gtk_container_add ((GtkContainer*) _tmp198_, (GtkWidget*) _tmp199_);
			}
			_tmp200_ = invert_selection_menuitem;
			if (_tmp200_ != NULL) {
				GtkMenu* _tmp201_;
				GtkMenuItem* _tmp202_;
				_tmp201_ = menu;
				_tmp202_ = invert_selection_menuitem;
				gtk_container_add ((GtkContainer*) _tmp201_, (GtkWidget*) _tmp202_);
			}
			_tmp203_ = menu;
			_tmp204_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
			g_object_ref_sink (_tmp204_);
			_tmp205_ = _tmp204_;
			gtk_container_add ((GtkContainer*) _tmp203_, (GtkWidget*) _tmp205_);
			_g_object_unref0 (_tmp205_);
			_tmp206_ = menu;
			_tmp207_ = properties_menuitem;
			gtk_container_add ((GtkContainer*) _tmp206_, (GtkWidget*) _tmp207_);
			_g_object_unref0 (restore_menuitem);
		} else {
			gboolean _tmp208_;
			_tmp208_ = self->priv->_in_recent;
			if (_tmp208_) {
				GtkMenuItem* open_parent_menuitem = NULL;
				GtkMenuItem* _tmp209_;
				GtkMenuItem* _tmp210_;
				GtkMenuItem* forget_menuitem = NULL;
				GtkMenuItem* _tmp211_;
				GtkMenuItem* _tmp212_;
				GtkMenu* _tmp213_;
				GtkMenuItem* _tmp214_;
				GtkMenu* _tmp215_;
				GtkSeparatorMenuItem* _tmp216_;
				GtkSeparatorMenuItem* _tmp217_;
				GtkMenu* _tmp218_;
				GtkMenuItem* _tmp219_;
				GtkMenu* _tmp220_;
				GtkMenuItem* _tmp221_;
				GtkMenuItem* _tmp222_;
				GtkMenuItem* _tmp225_;
				GtkMenuItem* _tmp228_;
				GtkMenu* _tmp231_;
				GtkMenuItem* _tmp232_;
				GtkMenu* _tmp233_;
				GtkSeparatorMenuItem* _tmp234_;
				GtkSeparatorMenuItem* _tmp235_;
				GtkMenu* _tmp236_;
				GtkMenuItem* _tmp237_;
				_tmp209_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_ ("Open Parent Folder"));
				g_object_ref_sink (_tmp209_);
				open_parent_menuitem = _tmp209_;
				_tmp210_ = open_parent_menuitem;
				gtk_actionable_set_action_name ((GtkActionable*) _tmp210_, "selection.view-in-location");
				_tmp211_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_ ("Remove from History"));
				g_object_ref_sink (_tmp211_);
				forget_menuitem = _tmp211_;
				_tmp212_ = forget_menuitem;
				gtk_actionable_set_action_name ((GtkActionable*) _tmp212_, "selection.forget");
				_tmp213_ = menu;
				_tmp214_ = open_parent_menuitem;
				gtk_container_add ((GtkContainer*) _tmp213_, (GtkWidget*) _tmp214_);
				_tmp215_ = menu;
				_tmp216_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
				g_object_ref_sink (_tmp216_);
				_tmp217_ = _tmp216_;
				gtk_container_add ((GtkContainer*) _tmp215_, (GtkWidget*) _tmp217_);
				_g_object_unref0 (_tmp217_);
				_tmp218_ = menu;
				_tmp219_ = forget_menuitem;
				gtk_container_add ((GtkContainer*) _tmp218_, (GtkWidget*) _tmp219_);
				_tmp220_ = menu;
				_tmp221_ = copy_menuitem;
				gtk_container_add ((GtkContainer*) _tmp220_, (GtkWidget*) _tmp221_);
				_tmp222_ = select_all_menuitem;
				if (_tmp222_ != NULL) {
					GtkMenu* _tmp223_;
					GtkMenuItem* _tmp224_;
					_tmp223_ = menu;
					_tmp224_ = select_all_menuitem;
					gtk_container_add ((GtkContainer*) _tmp223_, (GtkWidget*) _tmp224_);
				}
				_tmp225_ = deselect_all_menuitem;
				if (_tmp225_ != NULL) {
					GtkMenu* _tmp226_;
					GtkMenuItem* _tmp227_;
					_tmp226_ = menu;
					_tmp227_ = deselect_all_menuitem;
					gtk_container_add ((GtkContainer*) _tmp226_, (GtkWidget*) _tmp227_);
				}
				_tmp228_ = invert_selection_menuitem;
				if (_tmp228_ != NULL) {
					GtkMenu* _tmp229_;
					GtkMenuItem* _tmp230_;
					_tmp229_ = menu;
					_tmp230_ = invert_selection_menuitem;
					gtk_container_add ((GtkContainer*) _tmp229_, (GtkWidget*) _tmp230_);
				}
				_tmp231_ = menu;
				_tmp232_ = trash_menuitem;
				gtk_container_add ((GtkContainer*) _tmp231_, (GtkWidget*) _tmp232_);
				_tmp233_ = menu;
				_tmp234_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
				g_object_ref_sink (_tmp234_);
				_tmp235_ = _tmp234_;
				gtk_container_add ((GtkContainer*) _tmp233_, (GtkWidget*) _tmp235_);
				_g_object_unref0 (_tmp235_);
				_tmp236_ = menu;
				_tmp237_ = properties_menuitem;
				gtk_container_add ((GtkContainer*) _tmp236_, (GtkWidget*) _tmp237_);
				_g_object_unref0 (forget_menuitem);
				_g_object_unref0 (open_parent_menuitem);
			} else {
				gboolean already_bookmarked = FALSE;
				FilesBookmarkList* _tmp319_;
				GList* _tmp320_;
				gconstpointer _tmp321_;
				const gchar* _tmp322_;
				const gchar* _tmp323_;
				FilesBookmark* _tmp324_;
				FilesBookmark* _tmp325_;
				gboolean _tmp326_;
				gboolean _tmp327_ = FALSE;
				GSimpleActionGroup* _tmp328_;
				GtkMenu* _tmp331_;
				GtkSeparatorMenuItem* _tmp332_;
				GtkSeparatorMenuItem* _tmp333_;
				GtkMenu* _tmp334_;
				GtkMenuItem* _tmp335_;
				if (files_abstract_directory_view_valid_selection_for_edit (self)) {
					GtkMenuItem* rename_menuitem = NULL;
					GtkMenuItem* _tmp238_;
					GtkMenuItem* _tmp239_;
					GraniteAccelLabel* _tmp240_;
					GraniteAccelLabel* _tmp241_;
					GtkMenuItem* _tmp242_;
					GtkMenuItem* copy_link_menuitem = NULL;
					GtkMenuItem* _tmp243_;
					GtkMenuItem* _tmp244_;
					GraniteAccelLabel* _tmp245_;
					GraniteAccelLabel* _tmp246_;
					GtkMenuItem* _tmp247_;
					GtkMenu* _tmp248_;
					GList* _tmp249_;
					GList* _tmp250_;
					GtkMenuItem* _tmp251_;
					GList* _tmp252_;
					gboolean _tmp253_;
					GtkMenu* _tmp257_;
					GtkMenuItem* _tmp258_;
					GtkMenu* _tmp259_;
					GtkMenuItem* _tmp260_;
					GtkMenu* _tmp261_;
					GtkMenuItem* _tmp262_;
					gboolean _tmp263_ = FALSE;
					gboolean _tmp264_ = FALSE;
					GSimpleActionGroup* _tmp265_;
					GtkMenuItem* _tmp295_;
					GtkMenuItem* _tmp298_;
					GtkMenuItem* _tmp301_;
					GtkMenu* _tmp304_;
					GtkSeparatorMenuItem* _tmp305_;
					GtkSeparatorMenuItem* _tmp306_;
					gboolean _tmp307_ = FALSE;
					FilesViewSlot* _tmp308_;
					FilesDirectory* _tmp309_;
					FilesDirectory* _tmp310_;
					gboolean _tmp311_;
					gboolean _tmp312_;
					GtkMenu* _tmp317_;
					GtkMenuItem* _tmp318_;
					_tmp238_ = (GtkMenuItem*) gtk_menu_item_new ();
					g_object_ref_sink (_tmp238_);
					rename_menuitem = _tmp238_;
					_tmp239_ = rename_menuitem;
					_tmp240_ = granite_accel_label_new (_ ("Rename…"), "F2");
					g_object_ref_sink (_tmp240_);
					_tmp241_ = _tmp240_;
					gtk_container_add ((GtkContainer*) _tmp239_, (GtkWidget*) _tmp241_);
					_g_object_unref0 (_tmp241_);
					_tmp242_ = rename_menuitem;
					gtk_actionable_set_action_name ((GtkActionable*) _tmp242_, "selection.rename");
					_tmp243_ = (GtkMenuItem*) gtk_menu_item_new ();
					g_object_ref_sink (_tmp243_);
					copy_link_menuitem = _tmp243_;
					_tmp244_ = copy_link_menuitem;
					_tmp245_ = granite_accel_label_new (_ ("Copy as Link"), "<Shift><Ctrl>c");
					g_object_ref_sink (_tmp245_);
					_tmp246_ = _tmp245_;
					gtk_container_add ((GtkContainer*) _tmp244_, (GtkWidget*) _tmp246_);
					_g_object_unref0 (_tmp246_);
					_tmp247_ = copy_link_menuitem;
					gtk_actionable_set_action_name ((GtkActionable*) _tmp247_, "common.copy-link");
					_tmp248_ = menu;
					_tmp249_ = gtk_container_get_children ((GtkContainer*) _tmp248_);
					_tmp250_ = _tmp249_;
					_tmp251_ = open_submenu_item;
					_tmp252_ = g_list_find (_tmp250_, (GtkWidget*) _tmp251_);
					_tmp253_ = _tmp252_ != NULL;
					(_tmp250_ == NULL) ? NULL : (_tmp250_ = (g_list_free (_tmp250_), NULL));
					if (_tmp253_) {
						GtkMenu* _tmp254_;
						GtkSeparatorMenuItem* _tmp255_;
						GtkSeparatorMenuItem* _tmp256_;
						_tmp254_ = menu;
						_tmp255_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
						g_object_ref_sink (_tmp255_);
						_tmp256_ = _tmp255_;
						gtk_container_add ((GtkContainer*) _tmp254_, (GtkWidget*) _tmp256_);
						_g_object_unref0 (_tmp256_);
					}
					_tmp257_ = menu;
					_tmp258_ = cut_menuitem;
					gtk_container_add ((GtkContainer*) _tmp257_, (GtkWidget*) _tmp258_);
					_tmp259_ = menu;
					_tmp260_ = copy_menuitem;
					gtk_container_add ((GtkContainer*) _tmp259_, (GtkWidget*) _tmp260_);
					_tmp261_ = menu;
					_tmp262_ = copy_link_menuitem;
					gtk_container_add ((GtkContainer*) _tmp261_, (GtkWidget*) _tmp262_);
					_tmp265_ = self->priv->common_actions;
					if (g_action_group_get_action_enabled ((GActionGroup*) _tmp265_, "paste-into")) {
						FilesClipboardManager* _tmp266_;
						_tmp266_ = self->priv->clipboard;
						_tmp264_ = _tmp266_ != NULL;
					} else {
						_tmp264_ = FALSE;
					}
					if (_tmp264_) {
						FilesClipboardManager* _tmp267_;
						gboolean _tmp268_;
						gboolean _tmp269_;
						_tmp267_ = self->priv->clipboard;
						_tmp268_ = files_clipboard_manager_get_can_paste (_tmp267_);
						_tmp269_ = _tmp268_;
						_tmp263_ = _tmp269_;
					} else {
						_tmp263_ = FALSE;
					}
					if (_tmp263_) {
						GtkMenuItem* paste_into_menuitem = NULL;
						gchar* _tmp270_;
						GtkMenuItem* _tmp271_ = NULL;
						FilesClipboardManager* _tmp272_;
						gboolean _tmp273_;
						gboolean _tmp274_;
						GtkMenu* _tmp281_;
						GtkMenuItem* _tmp282_;
						_tmp270_ = g_strdup ("common.paste-into");
						_tmp271_ = (GtkMenuItem*) gtk_menu_item_new ();
						gtk_actionable_set_action_name ((GtkActionable*) _tmp271_, _tmp270_);
						_g_free0 (_tmp270_);
						g_object_ref_sink (_tmp271_);
						paste_into_menuitem = _tmp271_;
						_tmp272_ = self->priv->clipboard;
						_tmp273_ = files_clipboard_manager_get_files_linked (_tmp272_);
						_tmp274_ = _tmp273_;
						if (_tmp274_) {
							GtkMenuItem* _tmp275_;
							GraniteAccelLabel* _tmp276_;
							GraniteAccelLabel* _tmp277_;
							_tmp275_ = paste_into_menuitem;
							_tmp276_ = granite_accel_label_new (_ ("Paste Link into Folder"), "<Shift><Ctrl>v");
							g_object_ref_sink (_tmp276_);
							_tmp277_ = _tmp276_;
							gtk_container_add ((GtkContainer*) _tmp275_, (GtkWidget*) _tmp277_);
							_g_object_unref0 (_tmp277_);
						} else {
							GtkMenuItem* _tmp278_;
							GraniteAccelLabel* _tmp279_;
							GraniteAccelLabel* _tmp280_;
							_tmp278_ = paste_into_menuitem;
							_tmp279_ = granite_accel_label_new (_ ("Paste into Folder"), "<Shift><Ctrl>v");
							g_object_ref_sink (_tmp279_);
							_tmp280_ = _tmp279_;
							gtk_container_add ((GtkContainer*) _tmp278_, (GtkWidget*) _tmp280_);
							_g_object_unref0 (_tmp280_);
						}
						_tmp281_ = menu;
						_tmp282_ = paste_into_menuitem;
						gtk_container_add ((GtkContainer*) _tmp281_, (GtkWidget*) _tmp282_);
						_g_object_unref0 (paste_into_menuitem);
					} else {
						gboolean _tmp283_ = FALSE;
						gboolean _tmp284_ = FALSE;
						GSimpleActionGroup* _tmp285_;
						_tmp285_ = self->priv->common_actions;
						if (g_action_group_get_action_enabled ((GActionGroup*) _tmp285_, "paste")) {
							FilesClipboardManager* _tmp286_;
							_tmp286_ = self->priv->clipboard;
							_tmp284_ = _tmp286_ != NULL;
						} else {
							_tmp284_ = FALSE;
						}
						if (_tmp284_) {
							FilesClipboardManager* _tmp287_;
							gboolean _tmp288_;
							gboolean _tmp289_;
							_tmp287_ = self->priv->clipboard;
							_tmp288_ = files_clipboard_manager_get_can_paste (_tmp287_);
							_tmp289_ = _tmp288_;
							_tmp283_ = _tmp289_;
						} else {
							_tmp283_ = FALSE;
						}
						if (_tmp283_) {
							GtkMenuItem* _tmp290_;
							GraniteAccelLabel* _tmp291_;
							GraniteAccelLabel* _tmp292_;
							GtkMenu* _tmp293_;
							GtkMenuItem* _tmp294_;
							_tmp290_ = paste_menuitem;
							_tmp291_ = granite_accel_label_new (_ ("Paste"), "<Ctrl>v");
							g_object_ref_sink (_tmp291_);
							_tmp292_ = _tmp291_;
							gtk_container_add ((GtkContainer*) _tmp290_, (GtkWidget*) _tmp292_);
							_g_object_unref0 (_tmp292_);
							_tmp293_ = menu;
							_tmp294_ = paste_menuitem;
							gtk_container_add ((GtkContainer*) _tmp293_, (GtkWidget*) _tmp294_);
						}
					}
					_tmp295_ = select_all_menuitem;
					if (_tmp295_ != NULL) {
						GtkMenu* _tmp296_;
						GtkMenuItem* _tmp297_;
						_tmp296_ = menu;
						_tmp297_ = select_all_menuitem;
						gtk_container_add ((GtkContainer*) _tmp296_, (GtkWidget*) _tmp297_);
					}
					_tmp298_ = deselect_all_menuitem;
					if (_tmp298_ != NULL) {
						GtkMenu* _tmp299_;
						GtkMenuItem* _tmp300_;
						_tmp299_ = menu;
						_tmp300_ = deselect_all_menuitem;
						gtk_container_add ((GtkContainer*) _tmp299_, (GtkWidget*) _tmp300_);
					}
					_tmp301_ = invert_selection_menuitem;
					if (_tmp301_ != NULL) {
						GtkMenu* _tmp302_;
						GtkMenuItem* _tmp303_;
						_tmp302_ = menu;
						_tmp303_ = invert_selection_menuitem;
						gtk_container_add ((GtkContainer*) _tmp302_, (GtkWidget*) _tmp303_);
					}
					_tmp304_ = menu;
					_tmp305_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
					g_object_ref_sink (_tmp305_);
					_tmp306_ = _tmp305_;
					gtk_container_add ((GtkContainer*) _tmp304_, (GtkWidget*) _tmp306_);
					_g_object_unref0 (_tmp306_);
					_tmp308_ = self->slot;
					_tmp309_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp308_);
					_tmp310_ = _tmp309_;
					_tmp311_ = files_directory_get_has_trash_dirs (_tmp310_);
					_tmp312_ = _tmp311_;
					if (_tmp312_) {
						_tmp307_ = !files_is_admin ();
					} else {
						_tmp307_ = FALSE;
					}
					if (_tmp307_) {
						GtkMenu* _tmp313_;
						GtkMenuItem* _tmp314_;
						_tmp313_ = menu;
						_tmp314_ = trash_menuitem;
						gtk_container_add ((GtkContainer*) _tmp313_, (GtkWidget*) _tmp314_);
					} else {
						GtkMenu* _tmp315_;
						GtkMenuItem* _tmp316_;
						_tmp315_ = menu;
						_tmp316_ = delete_menuitem;
						gtk_container_add ((GtkContainer*) _tmp315_, (GtkWidget*) _tmp316_);
					}
					_tmp317_ = menu;
					_tmp318_ = rename_menuitem;
					gtk_container_add ((GtkContainer*) _tmp317_, (GtkWidget*) _tmp318_);
					_g_object_unref0 (copy_link_menuitem);
					_g_object_unref0 (rename_menuitem);
				}
				_tmp319_ = bookmark_list;
				_tmp320_ = self->selected_files;
				_tmp321_ = _tmp320_->data;
				_tmp322_ = files_file_get_uri ((FilesFile*) _tmp321_);
				_tmp323_ = _tmp322_;
				_tmp324_ = files_bookmark_new_from_uri (_tmp323_, "");
				_tmp325_ = _tmp324_;
				_tmp326_ = files_bookmark_list_contains (_tmp319_, _tmp325_);
				_files_bookmark_unref0 (_tmp325_);
				already_bookmarked = _tmp326_;
				_tmp328_ = self->priv->common_actions;
				if (g_action_group_get_action_enabled ((GActionGroup*) _tmp328_, "bookmark")) {
					_tmp327_ = !already_bookmarked;
				} else {
					_tmp327_ = FALSE;
				}
				if (_tmp327_) {
					GtkMenu* _tmp329_;
					GtkMenuItem* _tmp330_;
					_tmp329_ = menu;
					_tmp330_ = bookmark_menuitem;
					gtk_container_add ((GtkContainer*) _tmp329_, (GtkWidget*) _tmp330_);
				}
				_tmp331_ = menu;
				_tmp332_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
				g_object_ref_sink (_tmp332_);
				_tmp333_ = _tmp332_;
				gtk_container_add ((GtkContainer*) _tmp331_, (GtkWidget*) _tmp333_);
				_g_object_unref0 (_tmp333_);
				_tmp334_ = menu;
				_tmp335_ = properties_menuitem;
				gtk_container_add ((GtkContainer*) _tmp334_, (GtkWidget*) _tmp335_);
			}
		}
		_g_object_unref0 (delete_menuitem);
		_g_object_unref0 (trash_menuitem);
		_g_object_unref0 (copy_menuitem);
		_g_object_unref0 (cut_menuitem);
	} else {
		if (self->priv->in_trash) {
			gboolean _tmp336_ = FALSE;
			FilesClipboardManager* _tmp337_;
			_tmp337_ = self->priv->clipboard;
			if (_tmp337_ != NULL) {
				FilesClipboardManager* _tmp338_;
				_tmp338_ = self->priv->clipboard;
				_tmp336_ = files_clipboard_manager_has_cutted_file (_tmp338_, NULL);
			} else {
				_tmp336_ = FALSE;
			}
			if (_tmp336_) {
				GtkMenuItem* _tmp339_;
				GraniteAccelLabel* _tmp340_;
				GraniteAccelLabel* _tmp341_;
				GtkMenu* _tmp342_;
				GtkMenuItem* _tmp343_;
				GtkMenuItem* _tmp344_;
				_tmp339_ = paste_menuitem;
				_tmp340_ = granite_accel_label_new (_ ("Paste into Folder"), "<Ctrl>v");
				g_object_ref_sink (_tmp340_);
				_tmp341_ = _tmp340_;
				gtk_container_add ((GtkContainer*) _tmp339_, (GtkWidget*) _tmp341_);
				_g_object_unref0 (_tmp341_);
				_tmp342_ = menu;
				_tmp343_ = paste_menuitem;
				gtk_container_add ((GtkContainer*) _tmp342_, (GtkWidget*) _tmp343_);
				_tmp344_ = select_all_menuitem;
				if (_tmp344_ != NULL) {
					GtkMenu* _tmp345_;
					GtkMenuItem* _tmp346_;
					_tmp345_ = menu;
					_tmp346_ = select_all_menuitem;
					gtk_container_add ((GtkContainer*) _tmp345_, (GtkWidget*) _tmp346_);
				}
			}
		} else {
			gboolean _tmp347_;
			_tmp347_ = self->priv->_in_recent;
			if (_tmp347_) {
				GtkMenuItem* _tmp348_;
				GtkMenu* _tmp351_;
				GtkSeparatorMenuItem* _tmp352_;
				GtkSeparatorMenuItem* _tmp353_;
				GtkMenu* _tmp354_;
				FilesAbstractDirectoryViewSortSubMenuItem* _tmp355_;
				FilesAbstractDirectoryViewSortSubMenuItem* _tmp356_;
				GtkMenu* _tmp357_;
				GtkSeparatorMenuItem* _tmp358_;
				GtkSeparatorMenuItem* _tmp359_;
				_tmp348_ = select_all_menuitem;
				if (_tmp348_ != NULL) {
					GtkMenu* _tmp349_;
					GtkMenuItem* _tmp350_;
					_tmp349_ = menu;
					_tmp350_ = select_all_menuitem;
					gtk_container_add ((GtkContainer*) _tmp349_, (GtkWidget*) _tmp350_);
				}
				_tmp351_ = menu;
				_tmp352_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
				g_object_ref_sink (_tmp352_);
				_tmp353_ = _tmp352_;
				gtk_container_add ((GtkContainer*) _tmp351_, (GtkWidget*) _tmp353_);
				_g_object_unref0 (_tmp353_);
				_tmp354_ = menu;
				_tmp355_ = files_abstract_directory_view_sort_sub_menu_item_new ();
				g_object_ref_sink (_tmp355_);
				_tmp356_ = _tmp355_;
				gtk_container_add ((GtkContainer*) _tmp354_, (GtkWidget*) _tmp356_);
				_g_object_unref0 (_tmp356_);
				_tmp357_ = menu;
				_tmp358_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
				g_object_ref_sink (_tmp358_);
				_tmp359_ = _tmp358_;
				gtk_container_add ((GtkContainer*) _tmp357_, (GtkWidget*) _tmp359_);
				_g_object_unref0 (_tmp359_);
			} else {
				gboolean already_bookmarked = FALSE;
				FilesBookmarkList* _tmp388_;
				FilesViewSlot* _tmp389_;
				FilesDirectory* _tmp390_;
				FilesDirectory* _tmp391_;
				FilesFile* _tmp392_;
				FilesFile* _tmp393_;
				const gchar* _tmp394_;
				const gchar* _tmp395_;
				FilesBookmark* _tmp396_;
				FilesBookmark* _tmp397_;
				gboolean _tmp398_;
				gboolean _tmp399_ = FALSE;
				GSimpleActionGroup* _tmp400_;
				if (!self->priv->in_network_root) {
					GtkMenu* _tmp360_;
					GtkSeparatorMenuItem* _tmp361_;
					GtkSeparatorMenuItem* _tmp362_;
					gboolean _tmp363_ = FALSE;
					FilesClipboardManager* _tmp364_;
					GtkMenu* _tmp377_;
					GtkMenuItem* _tmp378_;
					GtkMenuItem* _tmp379_;
					GtkMenu* _tmp385_;
					FilesAbstractDirectoryViewSortSubMenuItem* _tmp386_;
					FilesAbstractDirectoryViewSortSubMenuItem* _tmp387_;
					_tmp360_ = menu;
					_tmp361_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
					g_object_ref_sink (_tmp361_);
					_tmp362_ = _tmp361_;
					gtk_container_add ((GtkContainer*) _tmp360_, (GtkWidget*) _tmp362_);
					_g_object_unref0 (_tmp362_);
					_tmp364_ = self->priv->clipboard;
					if (_tmp364_ != NULL) {
						FilesClipboardManager* _tmp365_;
						gboolean _tmp366_;
						gboolean _tmp367_;
						_tmp365_ = self->priv->clipboard;
						_tmp366_ = files_clipboard_manager_get_can_paste (_tmp365_);
						_tmp367_ = _tmp366_;
						_tmp363_ = _tmp367_;
					} else {
						_tmp363_ = FALSE;
					}
					if (_tmp363_) {
						FilesClipboardManager* _tmp368_;
						gboolean _tmp369_;
						gboolean _tmp370_;
						_tmp368_ = self->priv->clipboard;
						_tmp369_ = files_clipboard_manager_get_files_linked (_tmp368_);
						_tmp370_ = _tmp369_;
						if (_tmp370_) {
							GtkMenuItem* _tmp371_;
							GraniteAccelLabel* _tmp372_;
							GraniteAccelLabel* _tmp373_;
							_tmp371_ = paste_menuitem;
							_tmp372_ = granite_accel_label_new (_ ("Paste Link into Folder"), "<Ctrl>v");
							g_object_ref_sink (_tmp372_);
							_tmp373_ = _tmp372_;
							gtk_container_add ((GtkContainer*) _tmp371_, (GtkWidget*) _tmp373_);
							_g_object_unref0 (_tmp373_);
						} else {
							GtkMenuItem* _tmp374_;
							GraniteAccelLabel* _tmp375_;
							GraniteAccelLabel* _tmp376_;
							_tmp374_ = paste_menuitem;
							_tmp375_ = granite_accel_label_new (_ ("Paste"), "<Ctrl>v");
							g_object_ref_sink (_tmp375_);
							_tmp376_ = _tmp375_;
							gtk_container_add ((GtkContainer*) _tmp374_, (GtkWidget*) _tmp376_);
							_g_object_unref0 (_tmp376_);
						}
					}
					_tmp377_ = menu;
					_tmp378_ = paste_menuitem;
					gtk_container_add ((GtkContainer*) _tmp377_, (GtkWidget*) _tmp378_);
					_tmp379_ = select_all_menuitem;
					if (_tmp379_ != NULL) {
						GtkMenu* _tmp380_;
						GtkMenuItem* _tmp381_;
						_tmp380_ = menu;
						_tmp381_ = select_all_menuitem;
						gtk_container_add ((GtkContainer*) _tmp380_, (GtkWidget*) _tmp381_);
					}
					if (self->is_writable) {
						GtkMenu* _tmp382_;
						FilesAbstractDirectoryViewNewSubMenuItem* _tmp383_;
						FilesAbstractDirectoryViewNewSubMenuItem* _tmp384_;
						_tmp382_ = menu;
						_tmp383_ = files_abstract_directory_view_new_sub_menu_item_new ();
						g_object_ref_sink (_tmp383_);
						_tmp384_ = _tmp383_;
						gtk_container_add ((GtkContainer*) _tmp382_, (GtkWidget*) _tmp384_);
						_g_object_unref0 (_tmp384_);
					}
					_tmp385_ = menu;
					_tmp386_ = files_abstract_directory_view_sort_sub_menu_item_new ();
					g_object_ref_sink (_tmp386_);
					_tmp387_ = _tmp386_;
					gtk_container_add ((GtkContainer*) _tmp385_, (GtkWidget*) _tmp387_);
					_g_object_unref0 (_tmp387_);
				}
				_tmp388_ = bookmark_list;
				_tmp389_ = self->slot;
				_tmp390_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp389_);
				_tmp391_ = _tmp390_;
				_tmp392_ = files_directory_get_file (_tmp391_);
				_tmp393_ = _tmp392_;
				_tmp394_ = files_file_get_uri (_tmp393_);
				_tmp395_ = _tmp394_;
				_tmp396_ = files_bookmark_new_from_uri (_tmp395_, "");
				_tmp397_ = _tmp396_;
				_tmp398_ = files_bookmark_list_contains (_tmp388_, _tmp397_);
				_files_bookmark_unref0 (_tmp397_);
				already_bookmarked = _tmp398_;
				_tmp400_ = self->priv->common_actions;
				if (g_action_group_get_action_enabled ((GActionGroup*) _tmp400_, "bookmark")) {
					_tmp399_ = !already_bookmarked;
				} else {
					_tmp399_ = FALSE;
				}
				if (_tmp399_) {
					GtkMenu* _tmp401_;
					GtkMenuItem* _tmp402_;
					_tmp401_ = menu;
					_tmp402_ = bookmark_menuitem;
					gtk_container_add ((GtkContainer*) _tmp401_, (GtkWidget*) _tmp402_);
				}
				if (!self->priv->in_network_root) {
					GtkMenu* _tmp403_;
					GtkSeparatorMenuItem* _tmp404_;
					GtkSeparatorMenuItem* _tmp405_;
					GtkMenu* _tmp406_;
					GtkMenuItem* _tmp407_;
					_tmp403_ = menu;
					_tmp404_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
					g_object_ref_sink (_tmp404_);
					_tmp405_ = _tmp404_;
					gtk_container_add ((GtkContainer*) _tmp403_, (GtkWidget*) _tmp405_);
					_g_object_unref0 (_tmp405_);
					_tmp406_ = menu;
					_tmp407_ = properties_menuitem;
					gtk_container_add ((GtkContainer*) _tmp406_, (GtkWidget*) _tmp407_);
				}
			}
		}
	}
	if (!self->priv->in_trash) {
		FilesPluginManager* _tmp408_;
		GtkMenu* _tmp409_;
		GList* _tmp410_;
		gboolean _tmp411_ = FALSE;
		GList* _tmp412_;
		_tmp408_ = plugins;
		_tmp409_ = menu;
		_tmp410_ = files_abstract_directory_view_get_selected_files (self);
		files_plugin_manager_hook_context_menu (_tmp408_, _tmp409_, _tmp410_);
		_tmp412_ = selection;
		if (g_list_length (_tmp412_) == ((guint) 1)) {
			GList* _tmp413_;
			gconstpointer _tmp414_;
			GFileInfo* _tmp415_;
			const gchar* _tmp416_;
			_tmp413_ = selection;
			_tmp414_ = g_list_nth_data (_tmp413_, (guint) 0);
			_tmp415_ = ((FilesFile*) _tmp414_)->info;
			_tmp416_ = g_file_info_get_content_type (_tmp415_);
			_tmp411_ = string_contains (_tmp416_, "image");
		} else {
			_tmp411_ = FALSE;
		}
		if (_tmp411_) {
			GtkMenuItem* wallpaper_menuitem = NULL;
			gchar* _tmp417_;
			GtkMenuItem* _tmp418_ = NULL;
			GtkMenu* _tmp419_;
			GtkMenuItem* _tmp420_;
			_tmp417_ = g_strdup ("common.set-wallpaper");
			_tmp418_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_ ("Set as Wallpaper"));
			gtk_actionable_set_action_name ((GtkActionable*) _tmp418_, _tmp417_);
			_g_free0 (_tmp417_);
			g_object_ref_sink (_tmp418_);
			wallpaper_menuitem = _tmp418_;
			_tmp419_ = menu;
			_tmp420_ = wallpaper_menuitem;
			gtk_container_add ((GtkContainer*) _tmp419_, (GtkWidget*) _tmp420_);
			_g_object_unref0 (wallpaper_menuitem);
		}
	}
	_tmp421_ = menu;
	gtk_menu_set_screen (_tmp421_, NULL);
	_tmp422_ = menu;
	gtk_menu_attach_to_widget (_tmp422_, (GtkWidget*) self, NULL);
	_tmp423_ = self->slot;
	_tmp424_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp423_);
	_tmp425_ = _tmp424_;
	if (files_directory_is_empty (_tmp425_)) {
		GtkMenu* _tmp426_;
		GtkStyleContext* _tmp427_;
		_tmp426_ = menu;
		_tmp427_ = gtk_widget_get_style_context ((GtkWidget*) _tmp426_);
		gtk_style_context_add_class (_tmp427_, GTK_STYLE_CLASS_CONTEXT_MENU);
	}
	_tmp428_ = menu;
	gtk_widget_show_all ((GtkWidget*) _tmp428_);
	_tmp429_ = menu;
	gtk_menu_popup_at_pointer (_tmp429_, event);
	_g_object_unref0 (bookmark_list);
	_g_object_unref0 (bookmark_action);
	_g_object_unref0 (invert_selection_menuitem);
	_g_object_unref0 (deselect_all_menuitem);
	_g_object_unref0 (select_all_menuitem);
	_g_object_unref0 (properties_menuitem);
	_g_object_unref0 (bookmark_menuitem);
	_g_object_unref0 (paste_menuitem);
	_g_object_unref0 (open_submenu_item);
	_g_object_unref0 (open_submenu);
	_g_object_unref0 (selected_file);
	(selection == NULL) ? NULL : (selection = (_g_list_free__g_object_unref0_ (selection), NULL));
	_g_object_unref0 (menu);
}

static gboolean
files_abstract_directory_view_valid_selection_for_edit (FilesAbstractDirectoryView* self)
{
	GList* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = files_abstract_directory_view_get_selected_files (self);
	{
		GList* file_collection = NULL;
		GList* file_it = NULL;
		file_collection = _tmp0_;
		for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
			FilesFile* file = NULL;
			file = (FilesFile*) file_it->data;
			{
				FilesFile* _tmp1_;
				_tmp1_ = file;
				if (files_file_is_root_network_folder (_tmp1_)) {
					result = FALSE;
					return result;
				}
			}
		}
	}
	result = TRUE;
	return result;
}

static gboolean
files_abstract_directory_view_valid_selection_for_restore (FilesAbstractDirectoryView* self)
{
	GList* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = files_abstract_directory_view_get_selected_files (self);
	{
		GList* file_collection = NULL;
		GList* file_it = NULL;
		file_collection = _tmp0_;
		for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
			FilesFile* file = NULL;
			file = (FilesFile*) file_it->data;
			{
				FilesFile* _tmp1_;
				GFile* _tmp2_;
				GFile* _tmp3_;
				gchar* _tmp4_;
				gchar* _tmp5_;
				gboolean _tmp6_;
				_tmp1_ = file;
				_tmp2_ = files_file_get_directory (_tmp1_);
				_tmp3_ = _tmp2_;
				_tmp4_ = g_file_get_basename (_tmp3_);
				_tmp5_ = _tmp4_;
				_tmp6_ = !(g_strcmp0 (_tmp5_, "/") == 0);
				_g_free0 (_tmp5_);
				if (_tmp6_) {
					result = FALSE;
					return result;
				}
			}
		}
	}
	result = TRUE;
	return result;
}

static void
files_abstract_directory_view_update_menu_actions (FilesAbstractDirectoryView* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GList* selection = NULL;
	GList* _tmp8_;
	FilesFile* file = NULL;
	gboolean is_selected = FALSE;
	GList* _tmp9_;
	gboolean _tmp10_ = FALSE;
	gboolean more_than_one_selected = FALSE;
	gboolean single_folder = FALSE;
	gboolean only_folders = FALSE;
	GList* _tmp14_;
	gboolean can_rename = FALSE;
	gboolean can_show_properties = FALSE;
	gboolean can_copy = FALSE;
	gboolean can_open = FALSE;
	gboolean can_paste_into = FALSE;
	gboolean can_bookmark = FALSE;
	gboolean _tmp31_ = FALSE;
	gboolean _tmp32_ = FALSE;
	FilesFile* _tmp48_;
	FilesFile* _tmp49_;
	gboolean _tmp50_ = FALSE;
	gboolean _tmp51_;
	gboolean _tmp52_ = FALSE;
	gboolean _tmp53_;
	GSimpleActionGroup* _tmp54_;
	GSimpleActionGroup* _tmp55_;
	gboolean _tmp56_;
	GSimpleActionGroup* _tmp57_;
	gboolean _tmp58_;
	gboolean _tmp59_ = FALSE;
	gboolean _tmp60_;
	GSimpleActionGroup* _tmp61_;
	GSimpleActionGroup* _tmp62_;
	gboolean _tmp63_;
	gboolean _tmp64_ = FALSE;
	gboolean _tmp65_ = FALSE;
	gboolean _tmp66_ = FALSE;
	gboolean _tmp67_;
	GSimpleActionGroup* _tmp68_;
	gboolean _tmp69_ = FALSE;
	gboolean _tmp70_;
	GSimpleActionGroup* _tmp71_;
	gboolean _tmp72_ = FALSE;
	gboolean _tmp73_;
	GSimpleActionGroup* _tmp74_;
	gboolean _tmp75_ = FALSE;
	gboolean _tmp76_;
	GSimpleActionGroup* _tmp77_;
	gboolean _tmp78_ = FALSE;
	gboolean _tmp79_ = FALSE;
	gboolean _tmp80_;
	GSimpleActionGroup* _tmp81_;
	gboolean _tmp82_ = FALSE;
	gboolean _tmp83_ = FALSE;
	gboolean _tmp84_;
	GSimpleActionGroup* _tmp90_;
	gboolean _tmp91_ = FALSE;
	gboolean _tmp92_;
	GSimpleActionGroup* _tmp93_;
	gboolean _tmp94_ = FALSE;
	gboolean _tmp95_;
	GSimpleActionGroup* _tmp96_;
	gboolean _tmp97_ = FALSE;
	gboolean _tmp98_;
	GSimpleActionGroup* _tmp99_;
	gboolean _tmp100_ = FALSE;
	gboolean _tmp101_;
	GSimpleActionGroup* _tmp102_;
	gboolean _tmp103_ = FALSE;
	gboolean _tmp104_;
	GSimpleActionGroup* _tmp105_;
	gboolean _tmp106_ = FALSE;
	gboolean _tmp107_ = FALSE;
	gboolean _tmp108_;
	GSimpleActionGroup* _tmp109_;
	gboolean _tmp110_ = FALSE;
	gboolean _tmp111_ = FALSE;
	gboolean _tmp112_ = FALSE;
	gboolean _tmp113_;
	GSimpleActionGroup* _tmp115_;
	gboolean _tmp116_ = FALSE;
	gboolean _tmp117_;
	GSimpleActionGroup* _tmp118_;
	gboolean _tmp119_ = FALSE;
	gboolean _tmp120_;
	GSimpleActionGroup* _tmp121_;
	GList* _tmp122_;
	g_return_if_fail (self != NULL);
	_tmp1_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		FilesViewSlot* _tmp3_;
		FilesDirectory* _tmp4_;
		FilesDirectory* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp3_ = self->slot;
		_tmp4_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = files_directory_get_can_load (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp0_ = !_tmp7_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp8_ = files_abstract_directory_view_get_files_for_action (self);
	selection = _tmp8_;
	_tmp9_ = selection;
	is_selected = _tmp9_ != NULL;
	if (is_selected) {
		GList* _tmp11_;
		GList* _tmp12_;
		GList* _tmp13_;
		_tmp11_ = selection;
		_tmp12_ = g_list_first (_tmp11_);
		_tmp13_ = _tmp12_->next;
		_tmp10_ = _tmp13_ != NULL;
	} else {
		_tmp10_ = FALSE;
	}
	more_than_one_selected = _tmp10_;
	single_folder = FALSE;
	_tmp14_ = selection;
	only_folders = files_abstract_directory_view_selection_only_contains_folders (self, _tmp14_);
	can_rename = FALSE;
	can_show_properties = FALSE;
	can_copy = FALSE;
	can_open = FALSE;
	can_paste_into = FALSE;
	can_bookmark = FALSE;
	if (is_selected) {
		GList* _tmp15_;
		gconstpointer _tmp16_;
		FilesFile* _tmp17_;
		FilesFile* _tmp18_;
		_tmp15_ = selection;
		_tmp16_ = _tmp15_->data;
		_tmp17_ = _g_object_ref0 ((FilesFile*) _tmp16_);
		_g_object_unref0 (file);
		file = _tmp17_;
		_tmp18_ = file;
		if (_tmp18_ != NULL) {
			gboolean _tmp19_ = FALSE;
			gboolean _tmp21_ = FALSE;
			if (!more_than_one_selected) {
				FilesFile* _tmp20_;
				_tmp20_ = file;
				_tmp19_ = files_file_is_folder (_tmp20_);
			} else {
				_tmp19_ = FALSE;
			}
			single_folder = _tmp19_;
			can_rename = self->is_writable;
			if (single_folder) {
				FilesFile* _tmp22_;
				_tmp22_ = file;
				_tmp21_ = files_file_is_writable (_tmp22_);
			} else {
				_tmp21_ = FALSE;
			}
			can_paste_into = _tmp21_;
		} else {
			g_critical ("AbstractDirectoryView.vala:2513: File in selection is null");
		}
	} else {
		FilesViewSlot* _tmp23_;
		FilesDirectory* _tmp24_;
		FilesDirectory* _tmp25_;
		FilesFile* _tmp26_;
		FilesFile* _tmp27_;
		FilesFile* _tmp28_;
		gboolean _tmp29_ = FALSE;
		_tmp23_ = self->slot;
		_tmp24_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = files_directory_get_file (_tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = _g_object_ref0 (_tmp27_);
		_g_object_unref0 (file);
		file = _tmp28_;
		if (!more_than_one_selected) {
			FilesFile* _tmp30_;
			_tmp30_ = file;
			_tmp29_ = files_file_is_folder (_tmp30_);
		} else {
			_tmp29_ = FALSE;
		}
		single_folder = _tmp29_;
		can_paste_into = self->is_writable;
	}
	if (!more_than_one_selected) {
		_tmp32_ = TRUE;
	} else {
		_tmp32_ = single_folder;
	}
	if (_tmp32_) {
		gboolean _tmp33_ = FALSE;
		gboolean _tmp34_ = FALSE;
		FilesViewSlot* _tmp35_;
		FilesDirectory* _tmp36_;
		FilesDirectory* _tmp37_;
		gboolean _tmp38_;
		gboolean _tmp39_;
		_tmp35_ = self->slot;
		_tmp36_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = files_directory_get_is_local (_tmp37_);
		_tmp39_ = _tmp38_;
		if (_tmp39_) {
			_tmp34_ = TRUE;
		} else {
			gboolean _tmp40_ = FALSE;
			FilesFile* _tmp41_;
			const gchar* _tmp42_;
			const gchar* _tmp43_;
			_tmp41_ = file;
			_tmp42_ = files_file_get_content_type (_tmp41_);
			_tmp43_ = _tmp42_;
			if (_tmp43_ != NULL) {
				FilesFile* _tmp44_;
				const gchar* _tmp45_;
				const gchar* _tmp46_;
				_tmp44_ = file;
				_tmp45_ = files_file_get_content_type (_tmp44_);
				_tmp46_ = _tmp45_;
				_tmp40_ = g_strcmp0 (_tmp46_, "inode/directory") == 0;
			} else {
				_tmp40_ = FALSE;
			}
			_tmp34_ = _tmp40_;
		}
		if (_tmp34_) {
			_tmp33_ = TRUE;
		} else {
			FilesFile* _tmp47_;
			_tmp47_ = file;
			_tmp33_ = files_file_is_smb_server (_tmp47_);
		}
		_tmp31_ = _tmp33_;
	} else {
		_tmp31_ = FALSE;
	}
	can_bookmark = _tmp31_;
	_tmp48_ = file;
	can_copy = files_file_is_readable (_tmp48_);
	_tmp49_ = file;
	can_open = files_abstract_directory_view_can_open_file (self, _tmp49_, FALSE);
	_tmp51_ = self->priv->_in_recent;
	if (_tmp51_) {
		_tmp50_ = more_than_one_selected;
	} else {
		_tmp50_ = FALSE;
	}
	can_show_properties = !_tmp50_;
	_tmp53_ = self->priv->_in_recent;
	if (!_tmp53_) {
		_tmp52_ = self->is_writable;
	} else {
		_tmp52_ = FALSE;
	}
	_tmp54_ = self->priv->common_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp54_, "paste", _tmp52_);
	_tmp55_ = self->priv->common_actions;
	_tmp56_ = self->priv->_renaming;
	files_abstract_directory_view_action_set_enabled (self, _tmp55_, "paste-into", (!_tmp56_) & can_paste_into);
	_tmp57_ = self->priv->common_actions;
	_tmp58_ = self->priv->_renaming;
	files_abstract_directory_view_action_set_enabled (self, _tmp57_, "open-in", (!_tmp58_) & only_folders);
	_tmp60_ = self->priv->_renaming;
	if ((!_tmp60_) & is_selected) {
		_tmp59_ = can_rename;
	} else {
		_tmp59_ = FALSE;
	}
	_tmp61_ = self->priv->selection_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp61_, "rename", _tmp59_);
	_tmp62_ = self->priv->selection_actions;
	_tmp63_ = self->priv->_renaming;
	files_abstract_directory_view_action_set_enabled (self, _tmp62_, "view-in-location", (!_tmp63_) & is_selected);
	_tmp67_ = self->priv->_renaming;
	if (!_tmp67_) {
		_tmp66_ = is_selected;
	} else {
		_tmp66_ = FALSE;
	}
	if (_tmp66_) {
		_tmp65_ = !more_than_one_selected;
	} else {
		_tmp65_ = FALSE;
	}
	if (_tmp65_) {
		_tmp64_ = can_open;
	} else {
		_tmp64_ = FALSE;
	}
	_tmp68_ = self->priv->selection_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp68_, "open", _tmp64_);
	_tmp70_ = self->priv->_renaming;
	if (!_tmp70_) {
		_tmp69_ = can_open;
	} else {
		_tmp69_ = FALSE;
	}
	_tmp71_ = self->priv->selection_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp71_, "open-with-app", _tmp69_);
	_tmp73_ = self->priv->_renaming;
	if (!_tmp73_) {
		_tmp72_ = can_open;
	} else {
		_tmp72_ = FALSE;
	}
	_tmp74_ = self->priv->selection_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp74_, "open-with-default", _tmp72_);
	_tmp76_ = self->priv->_renaming;
	if (!_tmp76_) {
		_tmp75_ = can_open;
	} else {
		_tmp75_ = FALSE;
	}
	_tmp77_ = self->priv->selection_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp77_, "open-with-other-app", _tmp75_);
	_tmp80_ = self->priv->_renaming;
	if (!_tmp80_) {
		_tmp79_ = self->is_writable;
	} else {
		_tmp79_ = FALSE;
	}
	if (_tmp79_) {
		_tmp78_ = is_selected;
	} else {
		_tmp78_ = FALSE;
	}
	_tmp81_ = self->priv->selection_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp81_, "cut", _tmp78_);
	_tmp84_ = self->priv->_renaming;
	if (!_tmp84_) {
		_tmp83_ = self->is_writable;
	} else {
		_tmp83_ = FALSE;
	}
	if (_tmp83_) {
		FilesViewSlot* _tmp85_;
		FilesDirectory* _tmp86_;
		FilesDirectory* _tmp87_;
		gboolean _tmp88_;
		gboolean _tmp89_;
		_tmp85_ = self->slot;
		_tmp86_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp85_);
		_tmp87_ = _tmp86_;
		_tmp88_ = files_directory_get_has_trash_dirs (_tmp87_);
		_tmp89_ = _tmp88_;
		_tmp82_ = _tmp89_;
	} else {
		_tmp82_ = FALSE;
	}
	_tmp90_ = self->priv->selection_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp90_, "trash", _tmp82_);
	_tmp92_ = self->priv->_renaming;
	if (!_tmp92_) {
		_tmp91_ = self->is_writable;
	} else {
		_tmp91_ = FALSE;
	}
	_tmp93_ = self->priv->selection_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp93_, "delete", _tmp91_);
	_tmp95_ = self->priv->_renaming;
	if (!_tmp95_) {
		_tmp94_ = is_selected;
	} else {
		_tmp94_ = FALSE;
	}
	_tmp96_ = self->priv->selection_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp96_, "invert-selection", _tmp94_);
	_tmp98_ = self->priv->_renaming;
	if (!_tmp98_) {
		_tmp97_ = is_selected;
	} else {
		_tmp97_ = FALSE;
	}
	_tmp99_ = self->priv->common_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp99_, "select-all", _tmp97_);
	_tmp101_ = self->priv->_renaming;
	if (!_tmp101_) {
		_tmp100_ = can_show_properties;
	} else {
		_tmp100_ = FALSE;
	}
	_tmp102_ = self->priv->common_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp102_, "properties", _tmp100_);
	_tmp104_ = self->priv->_renaming;
	if (!_tmp104_) {
		_tmp103_ = can_bookmark;
	} else {
		_tmp103_ = FALSE;
	}
	_tmp105_ = self->priv->common_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp105_, "bookmark", _tmp103_);
	_tmp108_ = self->priv->_renaming;
	if (!_tmp108_) {
		_tmp107_ = !self->priv->in_trash;
	} else {
		_tmp107_ = FALSE;
	}
	if (_tmp107_) {
		_tmp106_ = can_copy;
	} else {
		_tmp106_ = FALSE;
	}
	_tmp109_ = self->priv->common_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp109_, "copy", _tmp106_);
	_tmp113_ = self->priv->_renaming;
	if (!_tmp113_) {
		_tmp112_ = !self->priv->in_trash;
	} else {
		_tmp112_ = FALSE;
	}
	if (_tmp112_) {
		gboolean _tmp114_;
		_tmp114_ = self->priv->_in_recent;
		_tmp111_ = !_tmp114_;
	} else {
		_tmp111_ = FALSE;
	}
	if (_tmp111_) {
		_tmp110_ = can_copy;
	} else {
		_tmp110_ = FALSE;
	}
	_tmp115_ = self->priv->common_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp115_, "copy-link", _tmp110_);
	_tmp117_ = self->priv->_renaming;
	if (!_tmp117_) {
		_tmp116_ = !more_than_one_selected;
	} else {
		_tmp116_ = FALSE;
	}
	_tmp118_ = self->priv->common_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp118_, "bookmark", _tmp116_);
	_tmp120_ = self->priv->_renaming;
	if (!_tmp120_) {
		_tmp119_ = !more_than_one_selected;
	} else {
		_tmp119_ = FALSE;
	}
	_tmp121_ = self->priv->common_actions;
	files_abstract_directory_view_action_set_enabled (self, _tmp121_, "set-wallpaper", _tmp119_);
	_tmp122_ = selection;
	files_abstract_directory_view_update_default_app (self, _tmp122_);
	files_abstract_directory_view_update_menu_actions_sort (self);
	_g_object_unref0 (file);
	(selection == NULL) ? NULL : (selection = (_g_list_free__g_object_unref0_ (selection), NULL));
}

static void
files_abstract_directory_view_update_menu_actions_sort (FilesAbstractDirectoryView* self)
{
	gint sort_column_id = 0;
	GtkSortType sort_order = 0;
	FilesListModel* _tmp0_;
	gint _tmp1_ = 0;
	GtkSortType _tmp2_ = 0;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->model;
	_tmp3_ = gtk_tree_sortable_get_sort_column_id ((GtkTreeSortable*) _tmp0_, &_tmp1_, &_tmp2_);
	sort_column_id = _tmp1_;
	sort_order = _tmp2_;
	if (_tmp3_) {
		GVariant* val = NULL;
		const gchar* _tmp4_;
		GVariant* _tmp5_;
		GSimpleActionGroup* _tmp6_;
		GVariant* _tmp7_;
		GVariant* _tmp8_;
		GSimpleActionGroup* _tmp9_;
		GVariant* _tmp10_;
		_tmp4_ = files_list_model_column_id_to_string ((FilesListModelColumnID) sort_column_id);
		_tmp5_ = g_variant_new_string (_tmp4_);
		g_variant_ref_sink (_tmp5_);
		val = _tmp5_;
		_tmp6_ = self->priv->background_actions;
		_tmp7_ = val;
		files_abstract_directory_view_action_set_state (self, _tmp6_, "sort-by", _tmp7_);
		_tmp8_ = g_variant_new_boolean (sort_order == GTK_SORT_DESCENDING);
		g_variant_ref_sink (_tmp8_);
		_g_variant_unref0 (val);
		val = _tmp8_;
		_tmp9_ = self->priv->background_actions;
		_tmp10_ = val;
		files_abstract_directory_view_action_set_state (self, _tmp9_, "reverse", _tmp10_);
		_g_variant_unref0 (val);
	} else {
		g_warning ("AbstractDirectoryView.vala:2567: Update menu actions sort: The model i" \
"s unsorted - this should not happen");
	}
}

static void
files_abstract_directory_view_update_default_app (FilesAbstractDirectoryView* self,
                                                  GList* selection)
{
	GAppInfo* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = files_mime_actions_get_default_application_for_files (selection);
	_g_object_unref0 (self->priv->default_app);
	self->priv->default_app = _tmp0_;
	return;
}

/** Menu helpers */
static void
files_abstract_directory_view_action_set_enabled (FilesAbstractDirectoryView* self,
                                                  GSimpleActionGroup* action_group,
                                                  const gchar* name,
                                                  gboolean enabled)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	if (action_group != NULL) {
		GSimpleAction* action = NULL;
		GAction* _tmp0_;
		GSimpleAction* _tmp1_;
		GSimpleAction* _tmp2_;
		_tmp0_ = g_action_map_lookup_action ((GActionMap*) action_group, name);
		_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp0_) : NULL);
		action = _tmp1_;
		_tmp2_ = action;
		if (_tmp2_ != NULL) {
			GSimpleAction* _tmp3_;
			_tmp3_ = action;
			g_simple_action_set_enabled (_tmp3_, enabled);
			_g_object_unref0 (action);
			return;
		}
		_g_object_unref0 (action);
	}
	g_critical ("AbstractDirectoryView.vala:2586: Action name not found: %s - cannot en" \
"able", name);
}

static void
files_abstract_directory_view_action_set_state (FilesAbstractDirectoryView* self,
                                                GSimpleActionGroup* action_group,
                                                const gchar* name,
                                                GVariant* val)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (val != NULL);
	if (action_group != NULL) {
		GSimpleAction* action = NULL;
		GAction* _tmp0_;
		GSimpleAction* _tmp1_;
		GSimpleAction* _tmp2_;
		_tmp0_ = g_action_map_lookup_action ((GActionMap*) action_group, name);
		_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp0_) : NULL);
		action = _tmp1_;
		_tmp2_ = action;
		if (_tmp2_ != NULL) {
			GSimpleAction* _tmp3_;
			_tmp3_ = action;
			g_simple_action_set_state (_tmp3_, val);
			_g_object_unref0 (action);
			return;
		}
		_g_object_unref0 (action);
	}
	g_critical ("AbstractDirectoryView.vala:2597: Action name not found: %s - cannot se" \
"t state", name);
}

static void
files_abstract_directory_view_filter_this_app_from_open_with_apps (FilesAbstractDirectoryView* self)
{
	GList* l = NULL;
	GList* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->open_with_apps;
	l = _tmp0_;
	while (TRUE) {
		GList* _tmp1_;
		GList* _tmp2_;
		gconstpointer _tmp3_;
		GList* _tmp10_;
		GList* _tmp11_;
		_tmp1_ = l;
		if (!(_tmp1_ != NULL)) {
			break;
		}
		_tmp2_ = l;
		_tmp3_ = _tmp2_->data;
		if (G_TYPE_CHECK_INSTANCE_TYPE ((GAppInfo*) _tmp3_, g_app_info_get_type ())) {
			GList* _tmp4_;
			gconstpointer _tmp5_;
			_tmp4_ = l;
			_tmp5_ = _tmp4_->data;
			if (files_abstract_directory_view_app_is_this_app (self, (GAppInfo*) _tmp5_)) {
				GList* _tmp6_;
				_tmp6_ = l;
				self->priv->open_with_apps = g_list_delete_link (self->priv->open_with_apps, _tmp6_);
				break;
			}
		} else {
			GList* _tmp7_;
			GList* _tmp8_;
			GList* _tmp9_;
			_tmp7_ = l;
			self->priv->open_with_apps = g_list_delete_link (self->priv->open_with_apps, _tmp7_);
			_tmp8_ = self->priv->open_with_apps;
			l = _tmp8_;
			_tmp9_ = l;
			if (_tmp9_ == NULL) {
				break;
			}
		}
		_tmp10_ = l;
		_tmp11_ = _tmp10_->next;
		l = _tmp11_;
	}
}

static gboolean
files_abstract_directory_view_app_is_this_app (FilesAbstractDirectoryView* self,
                                               GAppInfo* ai)
{
	gchar* exec_name = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (ai != NULL, FALSE);
	_tmp0_ = g_app_info_get_executable (ai);
	_tmp1_ = g_strdup (_tmp0_);
	exec_name = _tmp1_;
	result = g_strcmp0 (exec_name, APP_NAME) == 0;
	_g_free0 (exec_name);
	return result;
}

static void
files_abstract_directory_view_filter_default_app_from_open_with_apps (FilesAbstractDirectoryView* self)
{
	GAppInfo* _tmp0_;
	gchar* id1 = NULL;
	gchar* id2 = NULL;
	GAppInfo* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->default_app;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->default_app;
	_tmp2_ = g_app_info_get_id (_tmp1_);
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (id2);
	id2 = _tmp3_;
	_tmp4_ = id2;
	if (_tmp4_ != NULL) {
		GList* l = NULL;
		GList* _tmp5_;
		_tmp5_ = self->priv->open_with_apps;
		l = _tmp5_;
		while (TRUE) {
			gboolean _tmp6_ = FALSE;
			GList* _tmp7_;
			GList* _tmp10_;
			gconstpointer _tmp11_;
			const gchar* _tmp12_;
			gchar* _tmp13_;
			gboolean _tmp14_ = FALSE;
			const gchar* _tmp15_;
			GList* _tmp19_;
			GList* _tmp20_;
			_tmp7_ = l;
			if (_tmp7_ != NULL) {
				GList* _tmp8_;
				gconstpointer _tmp9_;
				_tmp8_ = l;
				_tmp9_ = _tmp8_->data;
				_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE ((GAppInfo*) _tmp9_, g_app_info_get_type ());
			} else {
				_tmp6_ = FALSE;
			}
			if (!_tmp6_) {
				break;
			}
			_tmp10_ = l;
			_tmp11_ = _tmp10_->data;
			_tmp12_ = g_app_info_get_id ((GAppInfo*) _tmp11_);
			_tmp13_ = g_strdup (_tmp12_);
			_g_free0 (id1);
			id1 = _tmp13_;
			_tmp15_ = id1;
			if (_tmp15_ != NULL) {
				const gchar* _tmp16_;
				const gchar* _tmp17_;
				_tmp16_ = id1;
				_tmp17_ = id2;
				_tmp14_ = g_strcmp0 (_tmp16_, _tmp17_) == 0;
			} else {
				_tmp14_ = FALSE;
			}
			if (_tmp14_) {
				GList* _tmp18_;
				_tmp18_ = l;
				self->priv->open_with_apps = g_list_delete_link (self->priv->open_with_apps, _tmp18_);
				break;
			}
			_tmp19_ = l;
			_tmp20_ = _tmp19_->next;
			l = _tmp20_;
		}
	}
	_g_free0 (id2);
	_g_free0 (id1);
}

/** Menu action functions */
static void
__lambda116_ (FilesAbstractDirectoryView* self,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		GFile* file = NULL;
		GFile* _tmp0_;
		_tmp0_ = marlin_file_operations_new_file_from_template_finish (res, &_inner_error0_);
		file = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		files_abstract_directory_view_create_file_done (file, self);
		_g_object_unref0 (file);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_critical ("AbstractDirectoryView.vala:2669: %s", _tmp2_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda116__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda116_ ((FilesAbstractDirectoryView*) self, source_object, res);
	g_object_unref (self);
}

static void
files_abstract_directory_view_create_from_template (FilesAbstractDirectoryView* self,
                                                    const gchar* path)
{
	FilesViewSlot* _tmp0_;
	FilesDirectory* _tmp1_;
	FilesDirectory* _tmp2_;
	GFile* template = NULL;
	GFile* _tmp3_;
	gchar* new_name = NULL;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	FilesViewSlot* _tmp8_;
	GFile* _tmp9_;
	GFile* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = self->slot;
	_tmp1_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp0_);
	_tmp2_ = _tmp1_;
	files_directory_block_monitor (_tmp2_);
	_tmp3_ = g_file_new_for_path (path);
	template = _tmp3_;
	_tmp4_ = g_file_get_basename (template);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup_printf (_ ("Untitled %s"), _tmp5_);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	new_name = _tmp7_;
	_tmp8_ = self->slot;
	_tmp9_ = files_abstract_slot_get_location ((FilesAbstractSlot*) _tmp8_);
	_tmp10_ = _tmp9_;
	marlin_file_operations_new_file_from_template ((GtkWidget*) self, _tmp10_, new_name, template, NULL, ___lambda116__gasync_ready_callback, g_object_ref (self));
	_g_free0 (new_name);
	_g_object_unref0 (template);
}

static void
files_abstract_directory_view_open_files_with (FilesAbstractDirectoryView* self,
                                               GAppInfo* app,
                                               GList* files)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (app != NULL);
	files_mime_actions_open_multiple_gof_files_request (files, (GtkWidget*) self, app);
}

/** Thumbnail and color tag handling */
static gboolean
__lambda54_ (FilesAbstractDirectoryView* self)
{
	gboolean result;
	if (self->priv->thumbnail_source_id > ((guint) 0)) {
		result = G_SOURCE_CONTINUE;
		return result;
	}
	files_abstract_directory_view_thaw_child_notify (self);
	self->priv->freeze_source_id = (guint) 0;
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda54__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda54_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static GtkTreePath*
_vala_GtkTreePath_copy (GtkTreePath* self)
{
	return g_boxed_copy (gtk_tree_path_get_type (), self);
}

static gpointer
__vala_GtkTreePath_copy0 (gpointer self)
{
	return self ? _vala_GtkTreePath_copy (self) : NULL;
}

static gboolean
__lambda55_ (FilesAbstractDirectoryView* self)
{
	GtkTreePath* start_path = NULL;
	GtkTreePath* end_path = NULL;
	GtkTreePath* path = NULL;
	GtkTreePath* sp = NULL;
	GtkTreePath* ep = NULL;
	GtkTreeIter iter = {0};
	gboolean valid_iter = FALSE;
	FilesFile* file = NULL;
	GList* visible_files = NULL;
	guint actually_visible = 0U;
	GtkTreePath* _tmp0_ = NULL;
	GtkTreePath* _tmp1_ = NULL;
	gboolean _tmp2_;
	gboolean _tmp38_ = FALSE;
	gboolean result;
	visible_files = NULL;
	actually_visible = (guint) 0;
	_tmp2_ = files_abstract_directory_view_get_visible_range (self, &_tmp0_, &_tmp1_);
	__vala_GtkTreePath_free0 (start_path);
	start_path = _tmp0_;
	__vala_GtkTreePath_free0 (end_path);
	end_path = _tmp1_;
	if (_tmp2_) {
		GtkTreePath* _tmp3_;
		GtkTreePath* _tmp4_;
		GtkTreePath* _tmp5_;
		GtkTreePath* _tmp6_;
		gint count = 0;
		FilesListModel* _tmp12_;
		GtkTreePath* _tmp13_;
		GtkTreeIter _tmp14_ = {0};
		gboolean _tmp15_;
		_tmp3_ = start_path;
		_tmp4_ = __vala_GtkTreePath_copy0 (_tmp3_);
		__vala_GtkTreePath_free0 (sp);
		sp = _tmp4_;
		_tmp5_ = end_path;
		_tmp6_ = __vala_GtkTreePath_copy0 (_tmp5_);
		__vala_GtkTreePath_free0 (ep);
		ep = _tmp6_;
		count = 50;
		while (TRUE) {
			gboolean _tmp7_ = FALSE;
			GtkTreePath* _tmp8_;
			gint _tmp9_;
			_tmp8_ = start_path;
			if (gtk_tree_path_prev (_tmp8_)) {
				_tmp7_ = count > 0;
			} else {
				_tmp7_ = FALSE;
			}
			if (!_tmp7_) {
				break;
			}
			_tmp9_ = count;
			count = _tmp9_ - 1;
		}
		count = 50;
		while (TRUE) {
			GtkTreePath* _tmp10_;
			gint _tmp11_;
			if (!(count > 0)) {
				break;
			}
			_tmp10_ = end_path;
			gtk_tree_path_next (_tmp10_);
			_tmp11_ = count;
			count = _tmp11_ - 1;
		}
		_tmp12_ = self->model;
		_tmp13_ = start_path;
		_tmp15_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp12_, &_tmp14_, _tmp13_);
		iter = _tmp14_;
		valid_iter = _tmp15_;
		while (TRUE) {
			gboolean _tmp16_ = FALSE;
			FilesListModel* _tmp17_;
			GtkTreeIter _tmp18_;
			FilesFile* _tmp19_;
			FilesListModel* _tmp20_;
			GtkTreeIter _tmp21_;
			GtkTreePath* _tmp22_;
			FilesFile* _tmp23_;
			GtkTreePath* _tmp35_;
			GtkTreePath* _tmp36_;
			if (valid_iter) {
				_tmp16_ = self->priv->thumbnail_source_id > ((guint) 0);
			} else {
				_tmp16_ = FALSE;
			}
			if (!_tmp16_) {
				break;
			}
			_tmp17_ = self->model;
			_tmp18_ = iter;
			_tmp19_ = files_list_model_file_for_iter (_tmp17_, &_tmp18_);
			_g_object_unref0 (file);
			file = _tmp19_;
			_tmp20_ = self->model;
			_tmp21_ = iter;
			_tmp22_ = gtk_tree_model_get_path ((GtkTreeModel*) _tmp20_, &_tmp21_);
			__vala_GtkTreePath_free0 (path);
			path = _tmp22_;
			_tmp23_ = file;
			if (_tmp23_ != NULL) {
				FilesFile* _tmp24_;
				_tmp24_ = file;
				files_abstract_directory_view_update_icon_and_plugins (self, _tmp24_);
				if (self->should_thumbnail) {
					FilesFile* _tmp25_;
					_tmp25_ = file;
					if (_tmp25_->thumbstate == ((guint) FILES_FILE_THUMB_STATE_UNKNOWN)) {
						FilesFile* _tmp26_;
						FilesFile* _tmp27_;
						gboolean _tmp28_ = FALSE;
						GtkTreePath* _tmp29_;
						GtkTreePath* _tmp30_;
						_tmp26_ = file;
						_tmp27_ = _g_object_ref0 (_tmp26_);
						visible_files = g_list_prepend (visible_files, _tmp27_);
						_tmp29_ = path;
						_tmp30_ = sp;
						if (gtk_tree_path_compare (_tmp29_, _tmp30_) >= 0) {
							GtkTreePath* _tmp31_;
							GtkTreePath* _tmp32_;
							_tmp31_ = path;
							_tmp32_ = ep;
							_tmp28_ = gtk_tree_path_compare (_tmp31_, _tmp32_) <= 0;
						} else {
							_tmp28_ = FALSE;
						}
						if (_tmp28_) {
							guint _tmp33_;
							_tmp33_ = actually_visible;
							actually_visible = _tmp33_ + 1;
						}
					}
				} else {
					FilesFile* _tmp34_;
					_tmp34_ = file;
					_tmp34_->thumbstate = (guint) FILES_FILE_THUMB_STATE_NONE;
				}
			}
			_tmp35_ = path;
			_tmp36_ = end_path;
			if (gtk_tree_path_compare (_tmp35_, _tmp36_) != 0) {
				gboolean _tmp37_;
				_tmp37_ = files_abstract_directory_view_get_next_visible_iter (self, &iter, TRUE);
				valid_iter = _tmp37_;
			} else {
				valid_iter = FALSE;
			}
		}
	}
	if (actually_visible > ((guint) 0)) {
		_tmp38_ = self->priv->thumbnail_source_id > ((guint) 0);
	} else {
		_tmp38_ = FALSE;
	}
	if (_tmp38_) {
		FilesThumbnailer* _tmp39_;
		GList* _tmp40_;
		gint _tmp41_ = 0;
		_tmp39_ = self->priv->thumbnailer;
		_tmp40_ = visible_files;
		files_thumbnailer_queue_files (_tmp39_, _tmp40_, &_tmp41_);
		self->priv->thumbnail_request = _tmp41_;
	}
	files_abstract_directory_view_draw_when_idle (self);
	self->priv->thumbnail_source_id = (guint) 0;
	result = G_SOURCE_REMOVE;
	(visible_files == NULL) ? NULL : (visible_files = (_g_list_free__g_object_unref0_ (visible_files), NULL));
	_g_object_unref0 (file);
	__vala_GtkTreePath_free0 (ep);
	__vala_GtkTreePath_free0 (sp);
	__vala_GtkTreePath_free0 (path);
	__vala_GtkTreePath_free0 (end_path);
	__vala_GtkTreePath_free0 (start_path);
	return result;
}

static gboolean
___lambda55__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda55_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
files_abstract_directory_view_schedule_thumbnail_color_tag_timeout (FilesAbstractDirectoryView* self)
{
	gboolean _tmp0_ = FALSE;
	FilesViewSlot* _tmp1_;
	gboolean _tmp5_ = FALSE;
	FilesViewSlot* _tmp6_;
	FilesDirectory* _tmp7_;
	FilesDirectory* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	guint delay = 0U;
	FilesViewSlot* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	guint _tmp17_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->slot;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, FILES_TYPE_ABSTRACT_SLOT)) {
		FilesViewSlot* _tmp2_;
		FilesDirectory* _tmp3_;
		FilesDirectory* _tmp4_;
		_tmp2_ = self->slot;
		_tmp3_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	_vala_assert (_tmp0_, "slot is Files.AbstractSlot && slot.directory != null");
	_tmp6_ = self->slot;
	_tmp7_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = files_directory_get_can_open_files (_tmp8_);
	_tmp10_ = _tmp9_;
	if (!_tmp10_) {
		_tmp5_ = TRUE;
	} else {
		FilesViewSlot* _tmp11_;
		FilesDirectory* _tmp12_;
		FilesDirectory* _tmp13_;
		_tmp11_ = self->slot;
		_tmp12_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp5_ = files_directory_is_loading (_tmp13_);
	}
	if (_tmp5_) {
		return;
	}
	files_abstract_directory_view_cancel_timeout (self, &self->priv->thumbnail_source_id);
	files_abstract_directory_view_cancel_timeout (self, &self->priv->freeze_source_id);
	files_abstract_directory_view_freeze_child_notify (self);
	self->priv->freeze_source_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda54__gsource_func, g_object_ref (self), g_object_unref);
	_tmp14_ = self->slot;
	_tmp15_ = files_view_slot_get_displayed_files_count (_tmp14_);
	_tmp16_ = _tmp15_;
	delay = MIN ((guint) (50 + (_tmp16_ / 10)), (guint) 500);
	_tmp17_ = delay;
	self->priv->thumbnail_source_id = g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp17_, ___lambda55__gsource_func, g_object_ref (self), g_object_unref);
}

static void
files_abstract_directory_view_update_icon_and_plugins (FilesAbstractDirectoryView* self,
                                                       FilesFile* file)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_vala_return_if_fail (file != NULL, "file != null");
	if (!file->is_gone) {
		FilesPluginManager* _tmp0_;
		if (self->should_thumbnail) {
			files_file_update_icon (file, -1, -1);
		}
		_tmp0_ = plugins;
		if (_tmp0_ != NULL) {
			FilesPluginManager* _tmp1_;
			_tmp1_ = plugins;
			files_plugin_manager_update_file_info (_tmp1_, file);
		}
	}
}

static gboolean
__lambda56_ (FilesAbstractDirectoryView* self)
{
	GtkWidget* _tmp0_;
	gboolean result;
	self->priv->draw_timeout_id = (guint) 0;
	_tmp0_ = self->priv->view;
	gtk_widget_queue_draw (_tmp0_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda56__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda56_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
files_abstract_directory_view_draw_when_idle (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->draw_timeout_id > ((guint) 0)) {
		return;
	}
	self->priv->draw_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda56__gsource_func, g_object_ref (self), g_object_unref);
}

void
files_abstract_directory_view_block_model (FilesAbstractDirectoryView* self)
{
	FilesListModel* _tmp0_;
	guint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->model;
	g_signal_parse_name ("row-deleted", gtk_tree_model_get_type (), &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched ((GtkTreeModel*) _tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _files_abstract_directory_view_on_row_deleted_gtk_tree_model_row_deleted, self);
}

void
files_abstract_directory_view_unblock_model (FilesAbstractDirectoryView* self)
{
	FilesListModel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->model;
	g_signal_connect_object ((GtkTreeModel*) _tmp0_, "row-deleted", (GCallback) _files_abstract_directory_view_on_row_deleted_gtk_tree_model_row_deleted, self, 0);
}

static Block30Data*
block30_data_ref (Block30Data* _data30_)
{
	g_atomic_int_inc (&_data30_->_ref_count_);
	return _data30_;
}

static void
block30_data_unref (void * _userdata_)
{
	Block30Data* _data30_;
	_data30_ = (Block30Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data30_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data30_->self;
		_g_object_unref0 (_data30_->pointer);
		_g_object_unref0 (self);
		g_slice_free (Block30Data, _data30_);
	}
}

static gboolean
__lambda127_ (Block30Data* _data30_)
{
	FilesAbstractDirectoryView* self;
	GtkWidget* widget = NULL;
	GtkScrolledWindow* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	gboolean result;
	self = _data30_->self;
	_tmp0_ = self->scrolled_window;
	_tmp1_ = gtk_bin_get_child ((GtkBin*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	widget = _tmp2_;
	_tmp3_ = widget;
	if (_tmp3_ != NULL) {
		GdkWindow* window = NULL;
		GtkWidget* _tmp4_;
		GdkWindow* _tmp5_;
		GdkWindow* _tmp6_;
		gint x = 0;
		gint y = 0;
		gint w = 0;
		gint h = 0;
		GdkWindow* _tmp7_;
		gint _tmp8_ = 0;
		gint _tmp9_ = 0;
		GdkWindow* _tmp10_;
		gint _tmp11_ = 0;
		gint _tmp12_ = 0;
		GtkScrolledWindow* _tmp13_;
		GtkAdjustment* _tmp14_;
		GtkScrolledWindow* _tmp15_;
		GtkAdjustment* _tmp16_;
		_tmp4_ = widget;
		_tmp5_ = gtk_widget_get_window (_tmp4_);
		_tmp6_ = _g_object_ref0 (_tmp5_);
		window = _tmp6_;
		_tmp7_ = window;
		gdk_window_get_device_position (_tmp7_, _data30_->pointer, &_tmp8_, &_tmp9_, NULL);
		x = _tmp8_;
		y = _tmp9_;
		_tmp10_ = window;
		gdk_window_get_geometry (_tmp10_, NULL, NULL, &_tmp11_, &_tmp12_);
		w = _tmp11_;
		h = _tmp12_;
		_tmp13_ = self->scrolled_window;
		_tmp14_ = gtk_scrolled_window_get_vadjustment (_tmp13_);
		files_abstract_directory_view_scroll_if_near_edge (self, y, h, 20, _tmp14_);
		_tmp15_ = self->scrolled_window;
		_tmp16_ = gtk_scrolled_window_get_hadjustment (_tmp15_);
		files_abstract_directory_view_scroll_if_near_edge (self, x, w, 20, _tmp16_);
		result = G_SOURCE_CONTINUE;
		_g_object_unref0 (window);
		_g_object_unref0 (widget);
		return result;
	} else {
		result = G_SOURCE_REMOVE;
		_g_object_unref0 (widget);
		return result;
	}
}

static gboolean
___lambda127__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda127_ (self);
	return result;
}

static void
files_abstract_directory_view_start_drag_scroll_timer (FilesAbstractDirectoryView* self,
                                                       GdkDevice* pointer)
{
	FilesViewWindow* _tmp0_;
	FilesViewWindow* _tmp1_;
	Block30Data* _data30_;
	GdkDevice* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pointer != NULL);
	_tmp0_ = files_abstract_directory_view_get_window (self);
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (_tmp1_ != NULL, "window != null");
	_data30_ = g_slice_new0 (Block30Data);
	_data30_->_ref_count_ = 1;
	_data30_->self = g_object_ref (self);
	_tmp2_ = _g_object_ref0 (pointer);
	_g_object_unref0 (_data30_->pointer);
	_data30_->pointer = _tmp2_;
	self->priv->drag_scroll_timer_id = g_timeout_add_full (G_PRIORITY_LOW, (guint) 50, ___lambda127__gsource_func, block30_data_ref (_data30_), block30_data_unref);
	block30_data_unref (_data30_);
	_data30_ = NULL;
}

static void
files_abstract_directory_view_scroll_if_near_edge (FilesAbstractDirectoryView* self,
                                                   gint pos,
                                                   gint dim,
                                                   gint threshold,
                                                   GtkAdjustment* adj)
{
	gint band = 0;
	gint offset = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (adj != NULL);
	band = 2 * threshold;
	offset = pos - band;
	if (offset > 0) {
		offset = MAX (band - (dim - pos), 0);
	}
	if (offset != 0) {
		gdouble val = 0.0;
		gdouble lower = 0.0;
		gdouble upper = 0.0;
		gdouble page = 0.0;
		val = gtk_adjustment_get_value (adj);
		lower = gtk_adjustment_get_lower (adj);
		upper = gtk_adjustment_get_upper (adj);
		page = gtk_adjustment_get_page_size (adj);
		val = CLAMP (val + (2 * offset), lower, upper - page);
		gtk_adjustment_set_value (adj, val);
	}
}

static Block31Data*
block31_data_ref (Block31Data* _data31_)
{
	g_atomic_int_inc (&_data31_->_ref_count_);
	return _data31_;
}

static void
block31_data_unref (void * _userdata_)
{
	Block31Data* _data31_;
	_data31_ = (Block31Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data31_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data31_->self;
		(_data31_->action_files == NULL) ? NULL : (_data31_->action_files = (_g_list_free__g_object_unref0_ (_data31_->action_files), NULL));
		_g_object_unref0 (self);
		g_slice_free (Block31Data, _data31_);
	}
}

static void
____lambda47_ (Block31Data* _data31_,
               FilesFile* file)
{
	FilesAbstractDirectoryView* self;
	FilesFile* goffile = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	FilesFile* _tmp2_;
	FilesFile* _tmp3_;
	FilesFile* _tmp4_;
	self = _data31_->self;
	g_return_if_fail (file != NULL);
	_tmp0_ = files_file_get_display_target_uri (file);
	_tmp1_ = _tmp0_;
	_tmp2_ = files_file_get_by_uri (_tmp1_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	goffile = _tmp3_;
	files_file_query_update (goffile);
	_tmp4_ = _g_object_ref0 (goffile);
	_data31_->action_files = g_list_append (_data31_->action_files, _tmp4_);
	_g_object_unref0 (goffile);
}

static void
_____lambda47__gfunc (gconstpointer data,
                      gpointer self)
{
	____lambda47_ (self, (FilesFile*) data);
}

static GList*
files_abstract_directory_view_get_files_for_action (FilesAbstractDirectoryView* self)
{
	Block31Data* _data31_;
	GList* _tmp0_;
	GList* _tmp11_;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data31_ = g_slice_new0 (Block31Data);
	_data31_->_ref_count_ = 1;
	_data31_->self = g_object_ref (self);
	_data31_->action_files = NULL;
	files_abstract_directory_view_update_selected_files_and_menu (self);
	_tmp0_ = self->selected_files;
	if (_tmp0_ == NULL) {
		FilesViewSlot* _tmp1_;
		FilesDirectory* _tmp2_;
		FilesDirectory* _tmp3_;
		FilesFile* _tmp4_;
		FilesFile* _tmp5_;
		FilesFile* _tmp6_;
		_tmp1_ = self->slot;
		_tmp2_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = files_directory_get_file (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = _g_object_ref0 (_tmp5_);
		_data31_->action_files = g_list_prepend (_data31_->action_files, _tmp6_);
	} else {
		gboolean _tmp7_;
		_tmp7_ = self->priv->_in_recent;
		if (_tmp7_) {
			GList* _tmp8_;
			_tmp8_ = self->selected_files;
			g_list_foreach (_tmp8_, _____lambda47__gfunc, _data31_);
		} else {
			GList* _tmp9_;
			GList* _tmp10_;
			_tmp9_ = self->selected_files;
			_tmp10_ = g_list_copy_deep (_tmp9_, (GCopyFunc) g_object_ref, NULL);
			(_data31_->action_files == NULL) ? NULL : (_data31_->action_files = (_g_list_free__g_object_unref0_ (_data31_->action_files), NULL));
			_data31_->action_files = _tmp10_;
		}
	}
	_tmp11_ = _data31_->action_files;
	_data31_->action_files = NULL;
	result = _tmp11_;
	block31_data_unref (_data31_);
	_data31_ = NULL;
	return result;
}

void
files_abstract_directory_view_on_view_items_activated (FilesAbstractDirectoryView* self)
{
	GList* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = files_abstract_directory_view_get_selected_files (self);
	files_abstract_directory_view_activate_selected_items (self, FILES_OPEN_FLAG_DEFAULT, _tmp0_);
}

void
files_abstract_directory_view_on_view_selection_changed (FilesAbstractDirectoryView* self)
{
	gboolean _tmp0_ = FALSE;
	GList* _tmp1_;
	g_return_if_fail (self != NULL);
	self->priv->selected_files_invalid = TRUE;
	_tmp1_ = self->selected_files;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		GList* _tmp2_;
		GList* _tmp3_;
		_tmp2_ = self->selected_files;
		_tmp3_ = _tmp2_->next;
		_tmp0_ = _tmp3_ == NULL;
	}
	self->one_or_less = _tmp0_;
}

/** Keyboard event handling **/
static gboolean
__lambda112_ (FilesAbstractDirectoryView* self)
{
	gboolean result;
	files_abstract_directory_view_update_selected_files_and_menu (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda112__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda112_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static gboolean
files_abstract_directory_view_real_on_view_key_press_event (FilesAbstractDirectoryView* self,
                                                            guint original_keyval,
                                                            guint keycode,
                                                            GdkModifierType state)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GdkEvent* event = NULL;
	GdkEvent* _tmp2_;
	GdkModifierType consumed_mods = 0U;
	guint keyval = 0U;
	GdkModifierType _tmp3_ = 0U;
	guint _tmp4_;
	GdkModifierType mods = 0U;
	gboolean no_mods = FALSE;
	gboolean shift_pressed = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean only_shift_pressed = FALSE;
	gboolean control_pressed = FALSE;
	gboolean alt_pressed = FALSE;
	gboolean other_mod_pressed = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean only_control_pressed = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean only_alt_pressed = FALSE;
	gboolean in_trash = FALSE;
	FilesViewSlot* _tmp8_;
	GFile* _tmp9_;
	GFile* _tmp10_;
	gboolean in_recent = FALSE;
	FilesViewSlot* _tmp11_;
	GFile* _tmp12_;
	GFile* _tmp13_;
	gboolean res = FALSE;
	gboolean result;
	_tmp0_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		result = TRUE;
		return result;
	}
	_tmp2_ = gtk_get_current_event ();
	event = _tmp2_;
	files_abstract_directory_view_cancel_hover (self);
	_tmp4_ = files_abstract_directory_view_map_key (original_keyval, keycode, &_tmp3_);
	consumed_mods = _tmp3_;
	keyval = _tmp4_;
	mods = (state & (~consumed_mods)) & gtk_accelerator_get_default_mod_mask ();
	no_mods = mods == 0;
	shift_pressed = (mods & GDK_SHIFT_MASK) != 0;
	if (shift_pressed) {
		_tmp5_ = (mods & (~GDK_SHIFT_MASK)) == 0;
	} else {
		_tmp5_ = FALSE;
	}
	only_shift_pressed = _tmp5_;
	control_pressed = (mods & GDK_CONTROL_MASK) != 0;
	alt_pressed = (mods & GDK_MOD1_MASK) != 0;
	other_mod_pressed = ((mods & (~GDK_SHIFT_MASK)) & (~GDK_CONTROL_MASK)) != 0;
	if (control_pressed) {
		_tmp6_ = !other_mod_pressed;
	} else {
		_tmp6_ = FALSE;
	}
	only_control_pressed = _tmp6_;
	if (alt_pressed) {
		_tmp7_ = (mods & (~GDK_MOD1_MASK)) == 0;
	} else {
		_tmp7_ = FALSE;
	}
	only_alt_pressed = _tmp7_;
	_tmp8_ = self->slot;
	_tmp9_ = files_abstract_slot_get_location ((FilesAbstractSlot*) _tmp8_);
	_tmp10_ = _tmp9_;
	in_trash = g_file_has_uri_scheme (_tmp10_, "trash");
	_tmp11_ = self->slot;
	_tmp12_ = files_abstract_slot_get_location ((FilesAbstractSlot*) _tmp11_);
	_tmp13_ = _tmp12_;
	in_recent = g_file_has_uri_scheme (_tmp13_, "recent");
	res = FALSE;
	switch (keyval) {
		case GDK_KEY_F10:
		{
			if (only_control_pressed) {
				GdkEvent* _tmp14_;
				_tmp14_ = event;
				files_abstract_directory_view_show_context_menu (self, _tmp14_);
				res = TRUE;
			}
			break;
		}
		case GDK_KEY_F2:
		{
			gboolean _tmp15_ = FALSE;
			if (no_mods) {
				GSimpleActionGroup* _tmp16_;
				_tmp16_ = self->priv->selection_actions;
				_tmp15_ = g_action_group_get_action_enabled ((GActionGroup*) _tmp16_, "rename");
			} else {
				_tmp15_ = FALSE;
			}
			if (_tmp15_) {
				files_abstract_directory_view_rename_selection (self);
				res = TRUE;
			}
			break;
		}
		case GDK_KEY_Delete:
		case GDK_KEY_KP_Delete:
		{
			if (!self->is_writable) {
				FilesViewWindow* _tmp17_;
				FilesViewWindow* _tmp18_;
				GraniteMessageDialog* _tmp19_;
				GraniteMessageDialog* _tmp20_;
				_tmp17_ = files_abstract_directory_view_get_window (self);
				_tmp18_ = _tmp17_;
				_tmp19_ = pf_dialogs_show_warning_dialog (_ ("Cannot remove files from here"), _ ("You do not have permission to change this location"), G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp18_) : NULL);
				_tmp20_ = _tmp19_;
				_g_object_unref0 (_tmp20_);
			} else {
				gboolean _tmp21_;
				_tmp21_ = self->priv->_renaming;
				if (!_tmp21_) {
					gboolean _tmp22_ = FALSE;
					gboolean _tmp23_ = FALSE;
					if (in_trash) {
						_tmp23_ = TRUE;
					} else {
						_tmp23_ = files_is_admin ();
					}
					if (_tmp23_) {
						_tmp22_ = TRUE;
					} else {
						_tmp22_ = only_shift_pressed;
					}
					files_abstract_directory_view_trash_or_delete_selected_files (self, _tmp22_);
					res = TRUE;
				}
			}
			break;
		}
		case GDK_KEY_space:
		{
			gboolean _tmp24_ = FALSE;
			if (files_abstract_directory_view_view_has_focus (self)) {
				_tmp24_ = !in_trash;
			} else {
				_tmp24_ = FALSE;
			}
			if (_tmp24_) {
				GList* _tmp25_;
				_tmp25_ = files_abstract_directory_view_get_selected_files (self);
				files_abstract_directory_view_activate_selected_items (self, FILES_OPEN_FLAG_NEW_TAB, _tmp25_);
				res = TRUE;
			}
			break;
		}
		case GDK_KEY_Return:
		case GDK_KEY_KP_Enter:
		{
			if (in_trash) {
				break;
			} else {
				if (in_recent) {
					GList* _tmp26_;
					_tmp26_ = files_abstract_directory_view_get_selected_files (self);
					files_abstract_directory_view_activate_selected_items (self, FILES_OPEN_FLAG_DEFAULT, _tmp26_);
				} else {
					if (only_shift_pressed) {
						GList* _tmp27_;
						_tmp27_ = files_abstract_directory_view_get_selected_files (self);
						files_abstract_directory_view_activate_selected_items (self, FILES_OPEN_FLAG_NEW_TAB, _tmp27_);
					} else {
						gboolean _tmp28_ = FALSE;
						gboolean _tmp29_ = FALSE;
						if (shift_pressed) {
							_tmp29_ = control_pressed;
						} else {
							_tmp29_ = FALSE;
						}
						if (_tmp29_) {
							_tmp28_ = !alt_pressed;
						} else {
							_tmp28_ = FALSE;
						}
						if (_tmp28_) {
							GList* _tmp30_;
							_tmp30_ = files_abstract_directory_view_get_selected_files (self);
							files_abstract_directory_view_activate_selected_items (self, FILES_OPEN_FLAG_NEW_WINDOW, _tmp30_);
						} else {
							if (only_alt_pressed) {
								GSimpleActionGroup* _tmp31_;
								_tmp31_ = self->priv->common_actions;
								g_action_group_activate_action ((GActionGroup*) _tmp31_, "properties", NULL);
							} else {
								if (no_mods) {
									GList* _tmp32_;
									_tmp32_ = files_abstract_directory_view_get_selected_files (self);
									files_abstract_directory_view_activate_selected_items (self, FILES_OPEN_FLAG_DEFAULT, _tmp32_);
								} else {
									break;
								}
							}
						}
					}
				}
			}
			res = TRUE;
			break;
		}
		case GDK_KEY_minus:
		{
			gboolean _tmp33_ = FALSE;
			if (alt_pressed) {
				_tmp33_ = control_pressed;
			} else {
				_tmp33_ = FALSE;
			}
			if (_tmp33_) {
				GtkTreePath* path = NULL;
				GtkTreePath* _tmp34_;
				gboolean _tmp35_ = FALSE;
				GtkTreePath* _tmp36_;
				_tmp34_ = files_abstract_directory_view_get_path_at_cursor (self);
				path = _tmp34_;
				_tmp36_ = path;
				if (_tmp36_ != NULL) {
					GtkTreePath* _tmp37_;
					_tmp37_ = path;
					_tmp35_ = files_abstract_directory_view_path_is_selected (self, _tmp37_);
				} else {
					_tmp35_ = FALSE;
				}
				if (_tmp35_) {
					GtkTreePath* _tmp38_;
					_tmp38_ = path;
					files_abstract_directory_view_unselect_path (self, _tmp38_);
				}
				res = TRUE;
				__vala_GtkTreePath_free0 (path);
			}
			break;
		}
		case GDK_KEY_plus:
		case GDK_KEY_equal:
		{
			gboolean _tmp39_ = FALSE;
			if (alt_pressed) {
				_tmp39_ = control_pressed;
			} else {
				_tmp39_ = FALSE;
			}
			if (_tmp39_) {
				GtkTreePath* path = NULL;
				GtkTreePath* _tmp40_;
				gboolean _tmp41_ = FALSE;
				GtkTreePath* _tmp42_;
				_tmp40_ = files_abstract_directory_view_get_path_at_cursor (self);
				path = _tmp40_;
				_tmp42_ = path;
				if (_tmp42_ != NULL) {
					GtkTreePath* _tmp43_;
					_tmp43_ = path;
					_tmp41_ = !files_abstract_directory_view_path_is_selected (self, _tmp43_);
				} else {
					_tmp41_ = FALSE;
				}
				if (_tmp41_) {
					GtkTreePath* _tmp44_;
					_tmp44_ = path;
					files_abstract_directory_view_select_path (self, _tmp44_, FALSE);
				}
				res = TRUE;
				__vala_GtkTreePath_free0 (path);
			}
			break;
		}
		case GDK_KEY_Escape:
		{
			if (no_mods) {
				files_abstract_directory_view_unselect_all (self);
			}
			break;
		}
		case GDK_KEY_Menu:
		case GDK_KEY_MenuKB:
		{
			if (no_mods) {
				GdkEvent* _tmp45_;
				_tmp45_ = event;
				files_abstract_directory_view_show_context_menu (self, _tmp45_);
				res = TRUE;
			}
			break;
		}
		case GDK_KEY_N:
		{
			if (control_pressed) {
				files_abstract_directory_view_new_empty_folder (self);
				res = TRUE;
			}
			break;
		}
		case GDK_KEY_Up:
		case GDK_KEY_Down:
		{
			GList* selection = NULL;
			GList* _tmp46_;
			gboolean _tmp47_ = FALSE;
			gboolean _tmp60_ = FALSE;
			_tmp46_ = files_abstract_directory_view_get_selected_files (self);
			selection = _tmp46_;
			if (only_alt_pressed) {
				_tmp47_ = keyval == GDK_KEY_Down;
			} else {
				_tmp47_ = FALSE;
			}
			if (_tmp47_) {
				gboolean _tmp48_ = FALSE;
				gboolean _tmp49_ = FALSE;
				GList* _tmp50_;
				_tmp50_ = selection;
				if (_tmp50_ != NULL) {
					GList* _tmp51_;
					GList* _tmp52_;
					GList* _tmp53_;
					_tmp51_ = selection;
					_tmp52_ = g_list_first (_tmp51_);
					_tmp53_ = _tmp52_->next;
					_tmp49_ = _tmp53_ == NULL;
				} else {
					_tmp49_ = FALSE;
				}
				if (_tmp49_) {
					GList* _tmp54_;
					gconstpointer _tmp55_;
					_tmp54_ = selection;
					_tmp55_ = _tmp54_->data;
					_tmp48_ = files_file_is_folder ((FilesFile*) _tmp55_);
				} else {
					_tmp48_ = FALSE;
				}
				if (_tmp48_) {
					GList* _tmp56_;
					gconstpointer _tmp57_;
					GFile* _tmp58_;
					GFile* _tmp59_;
					_tmp56_ = selection;
					_tmp57_ = _tmp56_->data;
					_tmp58_ = files_file_get_location ((FilesFile*) _tmp57_);
					_tmp59_ = _tmp58_;
					files_abstract_directory_view_load_location (self, _tmp59_);
					res = TRUE;
				}
				break;
			}
			res = files_abstract_directory_view_move_cursor (self, keyval, only_shift_pressed, control_pressed);
			if (FILES_IS_COLUMN_VIEW (self)) {
				_tmp60_ = no_mods;
			} else {
				_tmp60_ = FALSE;
			}
			if (_tmp60_) {
				FilesViewSlot* _tmp61_;
				FilesViewViewContainer* _tmp62_;
				FilesViewViewContainer* _tmp63_;
				FilesAbstractSlot* _tmp64_;
				_tmp61_ = self->slot;
				_tmp62_ = files_view_slot_get_ctab (_tmp61_);
				_tmp63_ = _tmp62_;
				_tmp64_ = _tmp63_->view;
				files_view_miller_on_miller_key_pressed (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, FILES_VIEW_TYPE_MILLER, FilesViewMiller), keyval, keycode, state);
			}
			break;
		}
		case GDK_KEY_Left:
		case GDK_KEY_Right:
		case GDK_KEY_BackSpace:
		{
			gboolean _tmp65_ = FALSE;
			if (FILES_IS_COLUMN_VIEW (self)) {
				_tmp65_ = no_mods;
			} else {
				_tmp65_ = FALSE;
			}
			if (_tmp65_) {
				FilesViewSlot* _tmp66_;
				FilesViewViewContainer* _tmp67_;
				FilesViewViewContainer* _tmp68_;
				FilesAbstractSlot* _tmp69_;
				_tmp66_ = self->slot;
				_tmp67_ = files_view_slot_get_ctab (_tmp66_);
				_tmp68_ = _tmp67_;
				_tmp69_ = _tmp68_->view;
				files_view_miller_on_miller_key_pressed (G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, FILES_VIEW_TYPE_MILLER, FilesViewMiller), keyval, keycode, state);
				res = TRUE;
				break;
			}
			res = files_abstract_directory_view_move_cursor (self, keyval, only_shift_pressed, control_pressed);
			break;
		}
		case GDK_KEY_Home:
		{
			gboolean _tmp70_ = FALSE;
			if (only_shift_pressed) {
				GtkTreePath* _tmp71_;
				GtkTreePath* _tmp72_;
				_tmp71_ = gtk_tree_path_new_from_indices (0, -1);
				_tmp72_ = _tmp71_;
				_tmp70_ = files_abstract_directory_view_handle_multi_select (self, _tmp72_);
				__vala_GtkTreePath_free0 (_tmp72_);
			} else {
				_tmp70_ = FALSE;
			}
			res = _tmp70_;
			break;
		}
		case GDK_KEY_End:
		{
			gboolean _tmp73_ = FALSE;
			if (only_shift_pressed) {
				FilesListModel* _tmp74_;
				GtkTreePath* _tmp75_;
				GtkTreePath* _tmp76_;
				_tmp74_ = self->model;
				_tmp75_ = gtk_tree_path_new_from_indices (files_list_model_get_length (_tmp74_), -1);
				_tmp76_ = _tmp75_;
				_tmp73_ = files_abstract_directory_view_handle_multi_select (self, _tmp76_);
				__vala_GtkTreePath_free0 (_tmp76_);
			} else {
				_tmp73_ = FALSE;
			}
			res = _tmp73_;
			break;
		}
		case GDK_KEY_c:
		case GDK_KEY_C:
		{
			if (only_control_pressed) {
				gboolean caps_on = FALSE;
				GdkDisplay* _tmp77_;
				GdkKeymap* _tmp78_;
				gboolean cap_c = FALSE;
				_tmp77_ = gtk_widget_get_display ((GtkWidget*) self);
				_tmp78_ = gdk_keymap_get_for_display (_tmp77_);
				caps_on = gdk_keymap_get_caps_lock_state (_tmp78_);
				cap_c = keyval == GDK_KEY_C;
				if (caps_on != cap_c) {
					GSimpleActionGroup* _tmp79_;
					_tmp79_ = self->priv->common_actions;
					g_action_group_activate_action ((GActionGroup*) _tmp79_, "copy-link", NULL);
				} else {
					if (in_trash) {
						FilesViewWindow* _tmp80_;
						FilesViewWindow* _tmp81_;
						GraniteMessageDialog* _tmp82_;
						GraniteMessageDialog* _tmp83_;
						GSimpleActionGroup* _tmp84_;
						_tmp80_ = files_abstract_directory_view_get_window (self);
						_tmp81_ = _tmp80_;
						_tmp82_ = pf_dialogs_show_warning_dialog (_ ("Cannot copy files that are in the trash"), _ ("Cutting the selection instead"), G_TYPE_CHECK_INSTANCE_TYPE (_tmp81_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp81_) : NULL);
						_tmp83_ = _tmp82_;
						_g_object_unref0 (_tmp83_);
						_tmp84_ = self->priv->selection_actions;
						g_action_group_activate_action ((GActionGroup*) _tmp84_, "cut", NULL);
					} else {
						GSimpleActionGroup* _tmp85_;
						_tmp85_ = self->priv->common_actions;
						g_action_group_activate_action ((GActionGroup*) _tmp85_, "copy", NULL);
					}
				}
				res = TRUE;
			}
			break;
		}
		case GDK_KEY_v:
		case GDK_KEY_V:
		{
			if (only_control_pressed) {
				if (shift_pressed) {
					gboolean _tmp86_ = FALSE;
					files_abstract_directory_view_update_selected_files_and_menu (self);
					if (!in_recent) {
						_tmp86_ = self->is_writable;
					} else {
						_tmp86_ = FALSE;
					}
					if (_tmp86_) {
						gboolean _tmp87_ = FALSE;
						GList* _tmp88_;
						GList* _tmp89_;
						_tmp88_ = self->selected_files;
						_tmp89_ = g_list_first (_tmp88_);
						if (_tmp89_ != NULL) {
							GList* _tmp90_;
							GList* _tmp91_;
							GList* _tmp92_;
							_tmp90_ = self->selected_files;
							_tmp91_ = g_list_first (_tmp90_);
							_tmp92_ = _tmp91_->next;
							_tmp87_ = _tmp92_ != NULL;
						} else {
							_tmp87_ = FALSE;
						}
						if (_tmp87_) {
							gdk_beep ();
							g_warning ("AbstractDirectoryView.vala:3119: Cannot paste into a multiple selectio" \
"n");
						} else {
							GSimpleActionGroup* _tmp93_;
							GSimpleActionGroup* _tmp94_;
							_tmp93_ = self->priv->common_actions;
							files_abstract_directory_view_action_set_enabled (self, _tmp93_, "paste-into", TRUE);
							_tmp94_ = self->priv->common_actions;
							g_action_group_activate_action ((GActionGroup*) _tmp94_, "paste-into", NULL);
						}
					} else {
						FilesViewWindow* _tmp95_;
						FilesViewWindow* _tmp96_;
						GraniteMessageDialog* _tmp97_;
						GraniteMessageDialog* _tmp98_;
						_tmp95_ = files_abstract_directory_view_get_window (self);
						_tmp96_ = _tmp95_;
						_tmp97_ = pf_dialogs_show_warning_dialog (_ ("Cannot paste files here"), _ ("You do not have permission to change this location"), G_TYPE_CHECK_INSTANCE_TYPE (_tmp96_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp96_) : NULL);
						_tmp98_ = _tmp97_;
						_g_object_unref0 (_tmp98_);
					}
					res = TRUE;
				} else {
					gboolean _tmp99_ = FALSE;
					if (!in_recent) {
						_tmp99_ = self->is_writable;
					} else {
						_tmp99_ = FALSE;
					}
					if (_tmp99_) {
						GSimpleActionGroup* _tmp100_;
						GSimpleActionGroup* _tmp101_;
						_tmp100_ = self->priv->common_actions;
						files_abstract_directory_view_action_set_enabled (self, _tmp100_, "paste", TRUE);
						_tmp101_ = self->priv->common_actions;
						g_action_group_activate_action ((GActionGroup*) _tmp101_, "paste", NULL);
					} else {
						FilesViewWindow* _tmp102_;
						FilesViewWindow* _tmp103_;
						GraniteMessageDialog* _tmp104_;
						GraniteMessageDialog* _tmp105_;
						_tmp102_ = files_abstract_directory_view_get_window (self);
						_tmp103_ = _tmp102_;
						_tmp104_ = pf_dialogs_show_warning_dialog (_ ("Cannot paste files here"), _ ("You do not have permission to change this location"), G_TYPE_CHECK_INSTANCE_TYPE (_tmp103_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp103_) : NULL);
						_tmp105_ = _tmp104_;
						_g_object_unref0 (_tmp105_);
					}
					res = TRUE;
				}
			}
			break;
		}
		case GDK_KEY_x:
		case GDK_KEY_X:
		{
			if (only_control_pressed) {
				if (self->is_writable) {
					GSimpleActionGroup* _tmp106_;
					_tmp106_ = self->priv->selection_actions;
					g_action_group_activate_action ((GActionGroup*) _tmp106_, "cut", NULL);
				} else {
					FilesViewWindow* _tmp107_;
					FilesViewWindow* _tmp108_;
					GraniteMessageDialog* _tmp109_;
					GraniteMessageDialog* _tmp110_;
					_tmp107_ = files_abstract_directory_view_get_window (self);
					_tmp108_ = _tmp107_;
					_tmp109_ = pf_dialogs_show_warning_dialog (_ ("Cannot remove files from here"), _ ("You do not have permission to change this location"), G_TYPE_CHECK_INSTANCE_TYPE (_tmp108_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp108_) : NULL);
					_tmp110_ = _tmp109_;
					_g_object_unref0 (_tmp110_);
				}
				res = TRUE;
			}
			break;
		}
		default:
		{
			break;
		}
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda112__gsource_func, g_object_ref (self), g_object_unref);
	result = res;
	__vala_GdkEvent_free0 (event);
	return result;
}

gboolean
files_abstract_directory_view_on_view_key_press_event (FilesAbstractDirectoryView* self,
                                                       guint original_keyval,
                                                       guint keycode,
                                                       GdkModifierType state)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->on_view_key_press_event) {
		return _klass_->on_view_key_press_event (self, original_keyval, keycode, state);
	}
	return FALSE;
}

void
files_abstract_directory_view_on_motion_notify_event (FilesAbstractDirectoryView* self,
                                                      gdouble x,
                                                      gdouble y)
{
	GtkTreePath* path = NULL;
	FilesFile* file = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	GtkTreePath* _tmp4_ = NULL;
	guint _tmp5_;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	GtkTreePath* _tmp9_;
	g_return_if_fail (self != NULL);
	path = NULL;
	file = NULL;
	_tmp1_ = self->priv->_renaming;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = files_abstract_directory_view_get_is_frozen (self);
		_tmp3_ = _tmp2_;
		_tmp0_ = _tmp3_;
	}
	if (_tmp0_) {
		_g_object_unref0 (file);
		__vala_GtkTreePath_free0 (path);
		return;
	}
	_tmp5_ = files_abstract_directory_view_get_event_position_info (self, x, y, &_tmp4_, FALSE);
	__vala_GtkTreePath_free0 (path);
	path = _tmp4_;
	self->click_zone = _tmp5_;
	_tmp9_ = path;
	if (_tmp9_ != NULL) {
		GtkTreePath* _tmp10_;
		_tmp10_ = self->priv->hover_path;
		_tmp8_ = _tmp10_ == NULL;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		gboolean _tmp11_ = FALSE;
		GtkTreePath* _tmp12_;
		_tmp12_ = path;
		if (_tmp12_ == NULL) {
			GtkTreePath* _tmp13_;
			_tmp13_ = self->priv->hover_path;
			_tmp11_ = _tmp13_ != NULL;
		} else {
			_tmp11_ = FALSE;
		}
		_tmp7_ = _tmp11_;
	}
	if (_tmp7_) {
		_tmp6_ = TRUE;
	} else {
		gboolean _tmp14_ = FALSE;
		gboolean _tmp15_ = FALSE;
		GtkTreePath* _tmp16_;
		_tmp16_ = path;
		if (_tmp16_ != NULL) {
			GtkTreePath* _tmp17_;
			_tmp17_ = self->priv->hover_path;
			_tmp15_ = _tmp17_ != NULL;
		} else {
			_tmp15_ = FALSE;
		}
		if (_tmp15_) {
			GtkTreePath* _tmp18_;
			GtkTreePath* _tmp19_;
			_tmp18_ = path;
			_tmp19_ = self->priv->hover_path;
			_tmp14_ = gtk_tree_path_compare (_tmp18_, _tmp19_) != 0;
		} else {
			_tmp14_ = FALSE;
		}
		_tmp6_ = _tmp14_;
	}
	if (_tmp6_) {
		gboolean _tmp20_ = FALSE;
		FilesViewSlot* _tmp21_;
		FilesDirectory* _tmp22_;
		FilesDirectory* _tmp23_;
		gboolean _tmp24_;
		gboolean _tmp25_;
		self->on_directory = FALSE;
		_tmp21_ = self->slot;
		_tmp22_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp21_);
		_tmp23_ = _tmp22_;
		_tmp24_ = files_directory_get_is_local (_tmp23_);
		_tmp25_ = _tmp24_;
		if (_tmp25_) {
			_tmp20_ = TRUE;
		} else {
			GNetworkMonitor* _tmp26_;
			_tmp26_ = g_network_monitor_get_default ();
			_tmp20_ = g_network_monitor_get_network_available (_tmp26_);
		}
		if (_tmp20_) {
			FilesFile* target_file = NULL;
			FilesFile* _tmp27_ = NULL;
			GtkTreePath* _tmp28_;
			FilesFile* _tmp32_;
			gboolean _tmp33_ = FALSE;
			FilesFile* _tmp34_;
			FilesFile* _tmp47_;
			GtkTreePath* _tmp49_;
			GtkTreePath* _tmp50_;
			_tmp28_ = path;
			if (_tmp28_ != NULL) {
				FilesListModel* _tmp29_;
				GtkTreePath* _tmp30_;
				FilesFile* _tmp31_;
				_tmp29_ = self->model;
				_tmp30_ = path;
				_tmp31_ = files_list_model_file_for_path (_tmp29_, _tmp30_);
				_g_object_unref0 (_tmp27_);
				_tmp27_ = _tmp31_;
			} else {
				_g_object_unref0 (_tmp27_);
				_tmp27_ = NULL;
			}
			_tmp32_ = _tmp27_;
			_tmp27_ = NULL;
			_g_object_unref0 (file);
			file = _tmp32_;
			_tmp34_ = file;
			if (_tmp34_ != NULL) {
				FilesViewSlot* _tmp35_;
				FilesDirectory* _tmp36_;
				FilesDirectory* _tmp37_;
				gboolean _tmp38_;
				gboolean _tmp39_;
				_tmp35_ = self->slot;
				_tmp36_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp35_);
				_tmp37_ = _tmp36_;
				_tmp38_ = files_directory_get_is_recent (_tmp37_);
				_tmp39_ = _tmp38_;
				_tmp33_ = _tmp39_;
			} else {
				_tmp33_ = FALSE;
			}
			if (_tmp33_) {
				FilesFile* _tmp40_;
				gchar* _tmp41_;
				gchar* _tmp42_;
				FilesFile* _tmp43_;
				FilesFile* _tmp44_;
				_tmp40_ = file;
				_tmp41_ = files_file_get_display_target_uri (_tmp40_);
				_tmp42_ = _tmp41_;
				_tmp43_ = files_file_get_by_uri (_tmp42_);
				_g_object_unref0 (target_file);
				target_file = _tmp43_;
				_g_free0 (_tmp42_);
				_tmp44_ = target_file;
				files_file_ensure_query_info (_tmp44_);
			} else {
				FilesFile* _tmp45_;
				FilesFile* _tmp46_;
				_tmp45_ = file;
				_tmp46_ = _g_object_ref0 (_tmp45_);
				_g_object_unref0 (target_file);
				target_file = _tmp46_;
			}
			_tmp47_ = target_file;
			if (_tmp47_ != NULL) {
				FilesFile* _tmp48_;
				_tmp48_ = target_file;
				self->on_directory = _tmp48_->is_directory;
			}
			_tmp49_ = path;
			_tmp50_ = __vala_GtkTreePath_copy0 (_tmp49_);
			__vala_GtkTreePath_free0 (self->priv->hover_path);
			self->priv->hover_path = _tmp50_;
			_g_object_unref0 (_tmp27_);
			_g_object_unref0 (target_file);
		}
	}
	if (self->click_zone != self->previous_click_zone) {
		GdkWindow* win = NULL;
		GtkWidget* _tmp51_;
		GdkWindow* _tmp52_;
		GdkWindow* _tmp53_;
		GdkWindow* _tmp54_;
		GdkCursor* _tmp55_;
		_tmp51_ = self->priv->view;
		_tmp52_ = gtk_widget_get_window (_tmp51_);
		_tmp53_ = _g_object_ref0 (_tmp52_);
		win = _tmp53_;
		_tmp54_ = win;
		_tmp55_ = self->priv->selectable_cursor;
		gdk_window_set_cursor (_tmp54_, _tmp55_);
		switch (self->click_zone) {
			case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_ICON:
			case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_NAME:
			{
				gboolean _tmp56_ = FALSE;
				gboolean _tmp57_ = FALSE;
				if (self->on_directory) {
					_tmp57_ = self->one_or_less;
				} else {
					_tmp57_ = FALSE;
				}
				if (_tmp57_) {
					gboolean _tmp58_;
					_tmp58_ = self->priv->_singleclick_select;
					_tmp56_ = !_tmp58_;
				} else {
					_tmp56_ = FALSE;
				}
				if (_tmp56_) {
					GdkWindow* _tmp59_;
					GdkCursor* _tmp60_;
					_tmp59_ = win;
					_tmp60_ = self->priv->activatable_cursor;
					gdk_window_set_cursor (_tmp59_, _tmp60_);
				}
				break;
			}
			default:
			{
				break;
			}
		}
		self->previous_click_zone = self->click_zone;
		_g_object_unref0 (win);
	}
	_g_object_unref0 (file);
	__vala_GtkTreePath_free0 (path);
}

void
files_abstract_directory_view_on_leave_notify_event (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	__vala_GtkTreePath_free0 (self->priv->hover_path);
	self->priv->hover_path = NULL;
}

static void
files_abstract_directory_view_real_on_scroll_event (FilesAbstractDirectoryView* self,
                                                    gdouble dx,
                                                    gdouble dy)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GdkModifierType state = 0U;
	GdkModifierType _tmp4_ = 0U;
	_tmp1_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp3_;
		_tmp3_ = self->priv->_renaming;
		_tmp0_ = _tmp3_;
	}
	if (_tmp0_) {
		return;
	}
	gtk_get_current_event_state (&_tmp4_);
	state = _tmp4_;
	if ((state & GDK_CONTROL_MASK) > 0) {
		self->priv->total_delta_y = self->priv->total_delta_y + dy;
		if (self->priv->total_delta_y >= 0.5) {
			self->priv->total_delta_y = (gdouble) 0;
			files_abstract_directory_view_zoom_out (self);
		} else {
			if (self->priv->total_delta_y <= (-0.5)) {
				self->priv->total_delta_y = (gdouble) 0;
				files_abstract_directory_view_zoom_in (self);
			}
		}
	} else {
		GtkEventControllerScroll* _tmp5_;
		_tmp5_ = self->scroll_controller;
		gtk_event_controller_scroll_set_flags (_tmp5_, GTK_EVENT_CONTROLLER_SCROLL_NONE);
	}
}

void
files_abstract_directory_view_on_scroll_event (FilesAbstractDirectoryView* self,
                                               gdouble dx,
                                               gdouble dy)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->on_scroll_event) {
		_klass_->on_scroll_event (self, dx, dy);
	}
}

/** name renderer signals */
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;
}

void
files_abstract_directory_view_on_name_editing_started (FilesAbstractDirectoryView* self,
                                                       GtkCellEditable* editable,
                                                       const gchar* path_string)
{
	FilesAbstractEditableLabel* editable_widget = NULL;
	FilesAbstractEditableLabel* _tmp0_;
	FilesAbstractEditableLabel* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path_string != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (editable, FILES_TYPE_ABSTRACT_EDITABLE_LABEL) ? ((FilesAbstractEditableLabel*) editable) : NULL);
	editable_widget = _tmp0_;
	_tmp1_ = editable_widget;
	if (_tmp1_ != NULL) {
		FilesAbstractEditableLabel* _tmp2_;
		gchar* _tmp3_;
		GtkTreePath* path = NULL;
		GtkTreePath* _tmp4_;
		GtkTreeIter* iter = NULL;
		FilesListModel* _tmp5_;
		GtkTreePath* _tmp6_;
		GtkTreeIter _tmp7_ = {0};
		GtkTreeIter _tmp8_;
		GtkTreeIter* _tmp9_;
		FilesFile* file = NULL;
		FilesListModel* _tmp10_;
		GtkTreeIter* _tmp11_;
		GtkTreeIter _tmp12_;
		FilesFile* _tmp13_ = NULL;
		gint start_offset = 0;
		gint end_offset = 0;
		FilesFile* _tmp14_;
		FilesAbstractEditableLabel* _tmp18_;
		_tmp2_ = editable_widget;
		_tmp3_ = files_abstract_editable_label_get_chars (_tmp2_, 0, -1);
		_g_free0 (self->original_name);
		self->original_name = _tmp3_;
		_tmp4_ = gtk_tree_path_new_from_string (path_string);
		path = _tmp4_;
		iter = NULL;
		_tmp5_ = self->model;
		_tmp6_ = path;
		gtk_tree_model_get_iter ((GtkTreeModel*) _tmp5_, &_tmp7_, _tmp6_);
		__vala_GtkTreeIter_free0 (iter);
		_tmp8_ = _tmp7_;
		_tmp9_ = __vala_GtkTreeIter_copy0 (&_tmp8_);
		iter = _tmp9_;
		file = NULL;
		_tmp10_ = self->model;
		_tmp11_ = iter;
		_tmp12_ = *_tmp11_;
		gtk_tree_model_get ((GtkTreeModel*) _tmp10_, &_tmp12_, FILES_LIST_MODEL_COLUMN_ID_FILE_COLUMN, &_tmp13_, -1);
		_g_object_unref0 (file);
		file = _tmp13_;
		start_offset = 0;
		end_offset = -1;
		_tmp14_ = file;
		if (!files_file_is_folder (_tmp14_)) {
			const gchar* _tmp15_;
			gint _tmp16_ = 0;
			gint _tmp17_ = 0;
			_tmp15_ = self->original_name;
			files_file_utils_get_rename_region (_tmp15_, &_tmp16_, &_tmp17_, FALSE);
			start_offset = _tmp16_;
			end_offset = _tmp17_;
		}
		_tmp18_ = editable_widget;
		files_abstract_editable_label_select_region (_tmp18_, start_offset, end_offset);
		_g_object_unref0 (file);
		__vala_GtkTreeIter_free0 (iter);
		__vala_GtkTreePath_free0 (path);
	} else {
		g_warning ("AbstractDirectoryView.vala:3281: Editable widget is null");
		files_abstract_directory_view_on_name_editing_canceled (self);
	}
	_g_object_unref0 (editable_widget);
}

void
files_abstract_directory_view_on_name_editing_canceled (FilesAbstractDirectoryView* self)
{
	FilesTextRenderer* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	files_abstract_directory_view_set_is_frozen (self, FALSE);
	files_abstract_directory_view_set_renaming (self, FALSE);
	files_abstract_directory_view_enable_scroll (self, TRUE);
	_tmp0_ = self->name_renderer;
	g_object_set ((GtkCellRendererText*) _tmp0_, "editable", FALSE, NULL);
	_tmp1_ = g_strdup ("");
	_g_free0 (self->proposed_name);
	self->proposed_name = _tmp1_;
	files_abstract_directory_view_update_menu_actions (self);
	files_abstract_directory_view_grab_focus (self);
}

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

static void
____lambda76_ (FilesAbstractDirectoryView* self,
               GObject* obj,
               GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		GFile* _tmp0_;
		GFile* _tmp1_;
		_tmp0_ = files_abstract_directory_view_set_file_display_name_finish (self, res, &_inner_error0_);
		_tmp1_ = _tmp0_;
		_g_object_unref0 (_tmp1_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	files_abstract_directory_view_on_name_editing_canceled (self);
}

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

void
files_abstract_directory_view_on_name_edited (FilesAbstractDirectoryView* self,
                                              const gchar* path_string,
                                              const gchar* _new_name)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gchar* new_name = NULL;
	gchar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path_string != NULL);
	_tmp1_ = self->priv->_renaming;
	if (!_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = _new_name == NULL;
	}
	if (_tmp0_) {
		files_abstract_directory_view_on_name_editing_canceled (self);
		return;
	}
	_tmp2_ = string_strip (_new_name);
	new_name = _tmp2_;
	_tmp4_ = new_name;
	if (g_strcmp0 (_tmp4_, "") == 0) {
		_tmp3_ = TRUE;
	} else {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp5_ = self->proposed_name;
		_tmp6_ = new_name;
		_tmp3_ = g_strcmp0 (_tmp5_, _tmp6_) == 0;
	}
	if (_tmp3_) {
		g_warning ("AbstractDirectoryView.vala:3307: Blank name or name unchanged");
		files_abstract_directory_view_on_name_editing_canceled (self);
		_g_free0 (new_name);
		return;
	}
	_tmp7_ = g_strdup ("");
	_g_free0 (self->proposed_name);
	self->proposed_name = _tmp7_;
	_tmp8_ = new_name;
	if (g_strcmp0 (_tmp8_, "") != 0) {
		GtkTreePath* path = NULL;
		GtkTreePath* _tmp9_;
		GtkTreeIter* iter = NULL;
		FilesListModel* _tmp10_;
		GtkTreePath* _tmp11_;
		GtkTreeIter _tmp12_ = {0};
		GtkTreeIter _tmp13_;
		GtkTreeIter* _tmp14_;
		FilesFile* file = NULL;
		FilesListModel* _tmp15_;
		GtkTreeIter* _tmp16_;
		GtkTreeIter _tmp17_;
		FilesFile* _tmp18_ = NULL;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		_tmp9_ = gtk_tree_path_new_from_string (path_string);
		path = _tmp9_;
		iter = NULL;
		_tmp10_ = self->model;
		_tmp11_ = path;
		gtk_tree_model_get_iter ((GtkTreeModel*) _tmp10_, &_tmp12_, _tmp11_);
		__vala_GtkTreeIter_free0 (iter);
		_tmp13_ = _tmp12_;
		_tmp14_ = __vala_GtkTreeIter_copy0 (&_tmp13_);
		iter = _tmp14_;
		file = NULL;
		_tmp15_ = self->model;
		_tmp16_ = iter;
		_tmp17_ = *_tmp16_;
		gtk_tree_model_get ((GtkTreeModel*) _tmp15_, &_tmp17_, FILES_LIST_MODEL_COLUMN_ID_FILE_COLUMN, &_tmp18_, -1);
		_g_object_unref0 (file);
		file = _tmp18_;
		_tmp19_ = new_name;
		_tmp20_ = self->original_name;
		if (g_strcmp0 (_tmp19_, _tmp20_) != 0) {
			const gchar* _tmp21_;
			gchar* _tmp22_;
			FilesFile* _tmp23_;
			GFile* _tmp24_;
			GFile* _tmp25_;
			const gchar* _tmp26_;
			_tmp21_ = new_name;
			_tmp22_ = g_strdup (_tmp21_);
			_g_free0 (self->proposed_name);
			self->proposed_name = _tmp22_;
			_tmp23_ = file;
			_tmp24_ = files_file_get_location (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = new_name;
			files_abstract_directory_view_set_file_display_name (self, _tmp25_, _tmp26_, NULL, _____lambda76__gasync_ready_callback, g_object_ref (self));
		} else {
			g_warning ("AbstractDirectoryView.vala:3334: Name unchanged");
			files_abstract_directory_view_on_name_editing_canceled (self);
		}
		_g_object_unref0 (file);
		__vala_GtkTreeIter_free0 (iter);
		__vala_GtkTreePath_free0 (path);
	} else {
		g_warning ("AbstractDirectoryView.vala:3338: No new name");
		files_abstract_directory_view_on_name_editing_canceled (self);
	}
	_g_free0 (new_name);
}

void
files_abstract_directory_view_enable_scroll (FilesAbstractDirectoryView* self,
                                             gboolean enable)
{
	g_return_if_fail (self != NULL);
	if (enable) {
		GtkScrolledWindow* _tmp0_;
		GtkEventControllerScroll* _tmp1_;
		_tmp0_ = self->scrolled_window;
		gtk_scrolled_window_set_policy (_tmp0_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
		_tmp1_ = self->scroll_controller;
		gtk_event_controller_scroll_set_flags (_tmp1_, GTK_EVENT_CONTROLLER_SCROLL_NONE);
	} else {
		GtkScrolledWindow* _tmp2_;
		GtkEventControllerScroll* _tmp3_;
		_tmp2_ = self->scrolled_window;
		gtk_scrolled_window_set_policy (_tmp2_, GTK_POLICY_NEVER, GTK_POLICY_EXTERNAL);
		_tmp3_ = self->scroll_controller;
		gtk_event_controller_scroll_set_flags (_tmp3_, GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES);
	}
}

static void
files_abstract_directory_view_set_file_display_name_data_free (gpointer _data)
{
	FilesAbstractDirectoryViewSetFileDisplayNameData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->old_location);
	_g_free0 (_data_->new_name);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (FilesAbstractDirectoryViewSetFileDisplayNameData, _data_);
}

void
files_abstract_directory_view_set_file_display_name (FilesAbstractDirectoryView* self,
                                                     GFile* old_location,
                                                     const gchar* new_name,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	FilesAbstractDirectoryViewSetFileDisplayNameData* _data_;
	FilesAbstractDirectoryView* _tmp0_;
	GFile* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (old_location != NULL);
	g_return_if_fail (new_name != NULL);
	_data_ = g_slice_new0 (FilesAbstractDirectoryViewSetFileDisplayNameData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, files_abstract_directory_view_set_file_display_name_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (old_location);
	_g_object_unref0 (_data_->old_location);
	_data_->old_location = _tmp1_;
	_tmp2_ = g_strdup (new_name);
	_g_free0 (_data_->new_name);
	_data_->new_name = _tmp2_;
	_tmp3_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp3_;
	files_abstract_directory_view_set_file_display_name_co (_data_);
}

GFile*
files_abstract_directory_view_set_file_display_name_finish (FilesAbstractDirectoryView* self,
                                                            GAsyncResult* _res_,
                                                            GError** error)
{
	GFile* result;
	FilesAbstractDirectoryViewSetFileDisplayNameData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
_files_abstract_directory_view_after_renamed_file_added_files_directory_file_added (FilesDirectory* _sender,
                                                                                    FilesFile* file,
                                                                                    gboolean is_internal,
                                                                                    gpointer self)
{
	files_abstract_directory_view_after_renamed_file_added ((FilesAbstractDirectoryView*) self, file);
}

static void
files_abstract_directory_view_set_file_display_name_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_)
{
	FilesAbstractDirectoryViewSetFileDisplayNameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	files_abstract_directory_view_set_file_display_name_co (_data_);
}

static gpointer
_g_error_copy0 (gpointer self)
{
	return self ? g_error_copy (self) : NULL;
}

static gboolean
files_abstract_directory_view_set_file_display_name_co (FilesAbstractDirectoryViewSetFileDisplayNameData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->slot;
	_data_->_tmp1_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	g_signal_connect_object (_data_->_tmp2_, "file-added", (GCallback) _files_abstract_directory_view_after_renamed_file_added_files_directory_file_added, _data_->self, G_CONNECT_AFTER);
	{
		_data_->_state_ = 1;
		files_file_utils_set_file_display_name (_data_->old_location, _data_->new_name, _data_->cancellable, files_abstract_directory_view_set_file_display_name_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp4_ = files_file_utils_set_file_display_name_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp3_ = _data_->_tmp4_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->_tmp3_;
		_data_->_tmp3_ = NULL;
		_data_->result = _data_->_tmp5_;
		_g_object_unref0 (_data_->_tmp3_);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp6_ = _data_->e;
		_data_->_tmp7_ = _g_error_copy0 (_data_->_tmp6_);
		_data_->_inner_error0_ = _data_->_tmp7_;
		_g_error_free0 (_data_->e);
		goto __finally0;
	}
	__finally0:
	g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static Block32Data*
block32_data_ref (Block32Data* _data32_)
{
	g_atomic_int_inc (&_data32_->_ref_count_);
	return _data32_;
}

static void
block32_data_unref (void * _userdata_)
{
	Block32Data* _data32_;
	_data32_ = (Block32Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data32_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data32_->self;
		_g_object_unref0 (_data32_->new_file);
		_g_object_unref0 (self);
		g_slice_free (Block32Data, _data32_);
	}
}

static gboolean
___lambda75_ (Block32Data* _data32_)
{
	FilesAbstractDirectoryView* self;
	FilesListModel* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	self = _data32_->self;
	_tmp0_ = self->model;
	_tmp1_ = files_list_model_get_sort_pending (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		result = G_SOURCE_CONTINUE;
		return result;
	} else {
		files_abstract_directory_view_select_and_scroll_to_gof_file (self, _data32_->new_file);
		result = G_SOURCE_REMOVE;
		return result;
	}
}

static gboolean
____lambda75__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda75_ (self);
	return result;
}

static void
files_abstract_directory_view_after_renamed_file_added (FilesAbstractDirectoryView* self,
                                                        FilesFile* new_file)
{
	Block32Data* _data32_;
	FilesFile* _tmp0_;
	FilesViewSlot* _tmp1_;
	FilesDirectory* _tmp2_;
	FilesDirectory* _tmp3_;
	guint _tmp4_;
	g_return_if_fail (self != NULL);
	_data32_ = g_slice_new0 (Block32Data);
	_data32_->_ref_count_ = 1;
	_data32_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (new_file);
	_g_object_unref0 (_data32_->new_file);
	_data32_->new_file = _tmp0_;
	_tmp1_ = self->slot;
	_tmp2_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp1_);
	_tmp3_ = _tmp2_;
	g_signal_parse_name ("file-added", FILES_TYPE_DIRECTORY, &_tmp4_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _files_abstract_directory_view_after_renamed_file_added_files_directory_file_added, self);
	if (_data32_->new_file != NULL) {
		self->priv->selected_files_invalid = TRUE;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda75__gsource_func, block32_data_ref (_data32_), block32_data_unref);
	}
	block32_data_unref (_data32_);
	_data32_ = NULL;
}

static gboolean
files_abstract_directory_view_real_handle_primary_button_click (FilesAbstractDirectoryView* self,
                                                                guint n_press,
                                                                GdkModifierType mods,
                                                                GtkTreePath* path)
{
	gboolean result;
	result = FALSE;
	return result;
}

gboolean
files_abstract_directory_view_handle_primary_button_click (FilesAbstractDirectoryView* self,
                                                           guint n_press,
                                                           GdkModifierType mods,
                                                           GtkTreePath* path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->handle_primary_button_click) {
		return _klass_->handle_primary_button_click (self, n_press, mods, path);
	}
	return FALSE;
}

void
files_abstract_directory_view_block_drag_and_drop (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	if (!self->dnd_disabled) {
		GtkWidget* _tmp0_;
		gconstpointer _tmp1_;
		GtkWidget* _tmp2_;
		void* _tmp3_;
		_tmp0_ = self->priv->view;
		_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "gtk-site-data");
		self->priv->drag_data = _tmp1_;
		_tmp2_ = self->priv->view;
		_tmp3_ = self->priv->drag_data;
		g_signal_handlers_block_matched (_tmp2_, G_SIGNAL_MATCH_DATA, (guint) 0, (GQuark) 0, NULL, NULL, _tmp3_);
		self->dnd_disabled = TRUE;
	}
}

void
files_abstract_directory_view_unblock_drag_and_drop (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	if (self->dnd_disabled) {
		GtkWidget* _tmp0_;
		void* _tmp1_;
		_tmp0_ = self->priv->view;
		_tmp1_ = self->priv->drag_data;
		g_signal_handlers_unblock_matched (_tmp0_, G_SIGNAL_MATCH_DATA, (guint) 0, (GQuark) 0, NULL, NULL, _tmp1_);
		self->dnd_disabled = FALSE;
	}
}

static void
files_abstract_directory_view_real_on_view_button_press_event (FilesAbstractDirectoryView* self,
                                                               gint n_press,
                                                               gdouble x,
                                                               gdouble y)
{
	gboolean _tmp0_;
	GtkTreePath* path = NULL;
	guint button = 0U;
	GtkGestureMultiPress* _tmp2_;
	GdkModifierType state = 0U;
	GdkModifierType _tmp3_ = 0U;
	GtkTreePath* _tmp4_ = NULL;
	guint _tmp5_;
	GtkTreePath* _tmp6_;
	GtkTreePath* _tmp7_;
	GdkModifierType mods = 0U;
	gboolean no_mods = FALSE;
	gboolean control_pressed = FALSE;
	gboolean shift_pressed = FALSE;
	gboolean other_mod_pressed = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean only_control_pressed = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean only_shift_pressed = FALSE;
	gboolean _tmp11_ = FALSE;
	GtkTreePath* _tmp12_;
	gboolean path_selected = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean on_blank = FALSE;
	gboolean double_click_event = FALSE;
	_tmp0_ = self->priv->_renaming;
	if (_tmp0_) {
		FilesTextRenderer* _tmp1_;
		_tmp1_ = self->name_renderer;
		files_text_renderer_end_editing (_tmp1_, FALSE);
	}
	files_abstract_directory_view_cancel_hover (self);
	files_abstract_directory_view_grab_focus (self);
	path = NULL;
	self->priv->drag_x = x;
	self->priv->drag_y = y;
	_tmp2_ = self->button_controller;
	button = gtk_gesture_single_get_current_button ((GtkGestureSingle*) _tmp2_);
	gtk_get_current_event_state (&_tmp3_);
	state = _tmp3_;
	_tmp5_ = files_abstract_directory_view_get_event_position_info (self, x, y, &_tmp4_, button == ((guint) GDK_BUTTON_PRIMARY));
	__vala_GtkTreePath_free0 (path);
	path = _tmp4_;
	self->click_zone = _tmp5_;
	_tmp6_ = path;
	_tmp7_ = __vala_GtkTreePath_copy0 (_tmp6_);
	__vala_GtkTreePath_free0 (self->click_path);
	self->click_path = _tmp7_;
	mods = state & gtk_accelerator_get_default_mod_mask ();
	no_mods = mods == 0;
	control_pressed = (mods & GDK_CONTROL_MASK) != 0;
	shift_pressed = (mods & GDK_SHIFT_MASK) != 0;
	other_mod_pressed = ((mods & (~GDK_SHIFT_MASK)) & (~GDK_CONTROL_MASK)) != 0;
	if (control_pressed) {
		_tmp8_ = !other_mod_pressed;
	} else {
		_tmp8_ = FALSE;
	}
	only_control_pressed = _tmp8_;
	if (shift_pressed) {
		_tmp10_ = !control_pressed;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		_tmp9_ = !other_mod_pressed;
	} else {
		_tmp9_ = FALSE;
	}
	only_shift_pressed = _tmp9_;
	_tmp12_ = path;
	if (_tmp12_ != NULL) {
		GtkTreePath* _tmp13_;
		_tmp13_ = path;
		_tmp11_ = files_abstract_directory_view_path_is_selected (self, _tmp13_);
	} else {
		_tmp11_ = FALSE;
	}
	path_selected = _tmp11_;
	if (self->click_zone == ((guint) FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_NO_PATH)) {
		_tmp14_ = TRUE;
	} else {
		_tmp14_ = self->click_zone == ((guint) FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_PATH);
	}
	on_blank = _tmp14_;
	double_click_event = n_press == 2;
	files_abstract_directory_view_block_drag_and_drop (self);
	if (!files_abstract_directory_view_will_handle_button_press (self, no_mods, only_control_pressed, only_shift_pressed)) {
		__vala_GtkTreePath_free0 (path);
		return;
	}
	self->should_activate = FALSE;
	self->should_deselect = FALSE;
	self->should_select = FALSE;
	switch (button) {
		case GDK_BUTTON_PRIMARY:
		{
			switch (self->click_zone) {
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_NO_PATH:
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_INVALID:
				{
					if (no_mods) {
						files_abstract_directory_view_unselect_all (self);
					}
					break;
				}
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_PATH:
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_ICON:
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_NAME:
				{
					gboolean _tmp15_ = FALSE;
					gboolean _tmp16_ = FALSE;
					gboolean _tmp21_ = FALSE;
					if (only_control_pressed) {
						_tmp15_ = path_selected;
					} else {
						_tmp15_ = FALSE;
					}
					self->should_deselect = _tmp15_;
					if (no_mods) {
						_tmp16_ = self->one_or_less;
					} else {
						_tmp16_ = FALSE;
					}
					if (_tmp16_) {
						gboolean _tmp17_ = FALSE;
						gboolean _tmp18_ = FALSE;
						gboolean _tmp19_ = FALSE;
						if (self->on_directory) {
							_tmp19_ = !on_blank;
						} else {
							_tmp19_ = FALSE;
						}
						if (_tmp19_) {
							gboolean _tmp20_;
							_tmp20_ = self->priv->_singleclick_select;
							_tmp18_ = !_tmp20_;
						} else {
							_tmp18_ = FALSE;
						}
						if (_tmp18_) {
							_tmp17_ = TRUE;
						} else {
							_tmp17_ = double_click_event;
						}
						self->should_activate = _tmp17_;
					}
					if (!no_mods) {
						_tmp21_ = TRUE;
					} else {
						gboolean _tmp22_ = FALSE;
						if (on_blank) {
							_tmp22_ = !path_selected;
						} else {
							_tmp22_ = FALSE;
						}
						_tmp21_ = _tmp22_;
					}
					if (_tmp21_) {
						gboolean _tmp23_ = FALSE;
						if (only_shift_pressed) {
							GtkTreePath* _tmp24_;
							_tmp24_ = path;
							_tmp23_ = files_abstract_directory_view_handle_multi_select (self, _tmp24_);
						} else {
							_tmp23_ = FALSE;
						}
						if (_tmp23_) {
							GtkGestureMultiPress* _tmp25_;
							_tmp25_ = self->button_controller;
							gtk_gesture_set_state ((GtkGesture*) _tmp25_, GTK_EVENT_SEQUENCE_CLAIMED);
						}
						self->should_select = TRUE;
					} else {
						gboolean _tmp26_ = FALSE;
						GtkTreePath* _tmp27_;
						GtkTreePath* _tmp28_;
						if (no_mods) {
							_tmp26_ = !path_selected;
						} else {
							_tmp26_ = FALSE;
						}
						if (_tmp26_) {
							files_abstract_directory_view_unselect_all (self);
						}
						_tmp27_ = path;
						files_abstract_directory_view_select_path (self, _tmp27_, TRUE);
						_tmp28_ = path;
						if (files_abstract_directory_view_handle_primary_button_click (self, (guint) n_press, mods, _tmp28_)) {
							GtkGestureMultiPress* _tmp29_;
							_tmp29_ = self->button_controller;
							gtk_gesture_set_state ((GtkGesture*) _tmp29_, GTK_EVENT_SEQUENCE_CLAIMED);
						}
						self->priv->button_press_disabled = TRUE;
						files_abstract_directory_view_unblock_drag_and_drop (self);
					}
					files_abstract_directory_view_update_selected_files_and_menu (self);
					break;
				}
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_HELPER:
				{
					gboolean _tmp30_ = FALSE;
					if (only_control_pressed) {
						_tmp30_ = TRUE;
					} else {
						_tmp30_ = only_shift_pressed;
					}
					if (_tmp30_) {
						gboolean _tmp31_ = FALSE;
						if (only_shift_pressed) {
							GtkTreePath* _tmp32_;
							_tmp32_ = path;
							_tmp31_ = files_abstract_directory_view_handle_multi_select (self, _tmp32_);
						} else {
							_tmp31_ = FALSE;
						}
						if (_tmp31_) {
							GtkGestureMultiPress* _tmp33_;
							_tmp33_ = self->button_controller;
							gtk_gesture_set_state ((GtkGesture*) _tmp33_, GTK_EVENT_SEQUENCE_CLAIMED);
						}
					} else {
						GtkGestureMultiPress* _tmp35_;
						if (path_selected) {
							self->should_deselect = TRUE;
						} else {
							GtkTreePath* _tmp34_;
							_tmp34_ = path;
							files_abstract_directory_view_select_path (self, _tmp34_, TRUE);
						}
						files_abstract_directory_view_unblock_drag_and_drop (self);
						_tmp35_ = self->button_controller;
						gtk_gesture_set_state ((GtkGesture*) _tmp35_, GTK_EVENT_SEQUENCE_CLAIMED);
					}
					break;
				}
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_EXPANDER:
				{
					GtkTreePath* _tmp36_;
					GtkGestureMultiPress* _tmp37_;
					_tmp36_ = path;
					files_abstract_directory_view_expand_collapse (self, _tmp36_);
					_tmp37_ = self->button_controller;
					gtk_gesture_set_state ((GtkGesture*) _tmp37_, GTK_EVENT_SEQUENCE_CLAIMED);
					break;
				}
				default:
				{
					break;
				}
			}
			break;
		}
		case GDK_BUTTON_MIDDLE:
		{
			GtkTreePath* _tmp38_;
			_tmp38_ = path;
			if (!files_abstract_directory_view_path_is_selected (self, _tmp38_)) {
				GtkTreePath* _tmp39_;
				_tmp39_ = path;
				files_abstract_directory_view_select_path (self, _tmp39_, TRUE);
			}
			self->should_activate = TRUE;
			files_abstract_directory_view_unblock_drag_and_drop (self);
			break;
		}
		case GDK_BUTTON_SECONDARY:
		{
			GtkGestureMultiPress* _tmp40_;
			_tmp40_ = self->button_controller;
			gtk_gesture_set_state ((GtkGesture*) _tmp40_, GTK_EVENT_SEQUENCE_CLAIMED);
			switch (self->click_zone) {
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_NO_PATH:
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_INVALID:
				{
					files_abstract_directory_view_unselect_all (self);
					break;
				}
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_BLANK_PATH:
				{
					gboolean _tmp41_ = FALSE;
					if (!path_selected) {
						_tmp41_ = no_mods;
					} else {
						_tmp41_ = FALSE;
					}
					if (_tmp41_) {
						files_abstract_directory_view_unselect_all (self);
					}
					break;
				}
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_NAME:
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_ICON:
				case FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_HELPER:
				{
					gboolean _tmp42_ = FALSE;
					GtkTreePath* _tmp43_;
					if (!path_selected) {
						_tmp42_ = no_mods;
					} else {
						_tmp42_ = FALSE;
					}
					if (_tmp42_) {
						files_abstract_directory_view_unselect_all (self);
					}
					_tmp43_ = path;
					files_abstract_directory_view_select_path (self, _tmp43_, FALSE);
					break;
				}
				default:
				{
					break;
				}
			}
			files_abstract_directory_view_update_selected_files_and_menu (self);
			break;
		}
		default:
		{
			if (files_abstract_directory_view_handle_default_button_click (self)) {
				GtkGestureMultiPress* _tmp44_;
				_tmp44_ = self->button_controller;
				gtk_gesture_set_state ((GtkGesture*) _tmp44_, GTK_EVENT_SEQUENCE_CLAIMED);
			}
			break;
		}
	}
	__vala_GtkTreePath_free0 (path);
}

void
files_abstract_directory_view_on_view_button_press_event (FilesAbstractDirectoryView* self,
                                                          gint n_press,
                                                          gdouble x,
                                                          gdouble y)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->on_view_button_press_event) {
		_klass_->on_view_button_press_event (self, n_press, x, y);
	}
}

static Block33Data*
block33_data_ref (Block33Data* _data33_)
{
	g_atomic_int_inc (&_data33_->_ref_count_);
	return _data33_;
}

static void
block33_data_unref (void * _userdata_)
{
	Block33Data* _data33_;
	_data33_ = (Block33Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data33_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data33_->self;
		_g_object_unref0 (self);
		g_slice_free (Block33Data, _data33_);
	}
}

static gboolean
____lambda132_ (Block33Data* _data33_)
{
	FilesAbstractDirectoryView* self;
	FilesOpenFlag _tmp0_ = 0;
	FilesOpenFlag flag = 0;
	GList* _tmp1_;
	gboolean result;
	self = _data33_->self;
	if (_data33_->button == ((guint) GDK_BUTTON_MIDDLE)) {
		_tmp0_ = FILES_OPEN_FLAG_NEW_TAB;
	} else {
		_tmp0_ = FILES_OPEN_FLAG_DEFAULT;
	}
	flag = _tmp0_;
	_tmp1_ = files_abstract_directory_view_get_selected_files (self);
	files_abstract_directory_view_activate_selected_items (self, flag, _tmp1_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
_____lambda132__gsource_func (gpointer self)
{
	gboolean result;
	result = ____lambda132_ (self);
	return result;
}

static gboolean
__lambda133_ (FilesAbstractDirectoryView* self)
{
	gboolean result;
	files_abstract_directory_view_update_selected_files_and_menu (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda133__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda133_ ((FilesAbstractDirectoryView*) self);
	return result;
}

static void
files_abstract_directory_view_real_on_view_button_release_event (FilesAbstractDirectoryView* self,
                                                                 gint n_press,
                                                                 gdouble x,
                                                                 gdouble y)
{
	Block33Data* _data33_;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	GtkGestureMultiPress* _tmp2_;
	FilesViewSlot* _tmp3_;
	GtkScrolledWindow* _tmp4_;
	GtkWidget* _tmp5_;
	_data33_ = g_slice_new0 (Block33Data);
	_data33_->_ref_count_ = 1;
	_data33_->self = g_object_ref (self);
	files_abstract_directory_view_unblock_drag_and_drop (self);
	self->priv->button_press_disabled = FALSE;
	_tmp1_ = self->priv->_renaming;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = !files_abstract_directory_view_view_has_focus (self);
	}
	if (_tmp0_) {
		block33_data_unref (_data33_);
		_data33_ = NULL;
		return;
	}
	_tmp2_ = self->button_controller;
	_data33_->button = gtk_gesture_single_get_current_button ((GtkGestureSingle*) _tmp2_);
	_tmp3_ = self->slot;
	g_signal_emit_by_name ((FilesAbstractSlot*) _tmp3_, "active", _data33_->button == ((guint) GDK_BUTTON_SECONDARY), TRUE);
	_tmp4_ = self->scrolled_window;
	_tmp5_ = gtk_bin_get_child ((GtkBin*) _tmp4_);
	if (!gtk_drag_check_threshold (_tmp5_, (gint) self->priv->drag_x, (gint) self->priv->drag_y, (gint) x, (gint) y)) {
		if (self->should_activate) {
			g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _____lambda132__gsource_func, block33_data_ref (_data33_), block33_data_unref);
		} else {
			gboolean _tmp6_ = FALSE;
			if (self->should_deselect) {
				GtkTreePath* _tmp7_;
				_tmp7_ = self->click_path;
				_tmp6_ = _tmp7_ != NULL;
			} else {
				_tmp6_ = FALSE;
			}
			if (_tmp6_) {
				GtkTreePath* _tmp8_;
				_tmp8_ = self->click_path;
				files_abstract_directory_view_unselect_path (self, _tmp8_);
			} else {
				gboolean _tmp9_ = FALSE;
				if (self->should_select) {
					GtkTreePath* _tmp10_;
					_tmp10_ = self->click_path;
					_tmp9_ = _tmp10_ != NULL;
				} else {
					_tmp9_ = FALSE;
				}
				if (_tmp9_) {
					GtkTreePath* _tmp11_;
					_tmp11_ = self->click_path;
					files_abstract_directory_view_select_path (self, _tmp11_, FALSE);
				} else {
					if (_data33_->button == ((guint) GDK_BUTTON_SECONDARY)) {
						files_abstract_directory_view_on_popup_menu (self);
					}
				}
			}
		}
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda133__gsource_func, g_object_ref (self), g_object_unref);
	self->should_activate = FALSE;
	self->should_deselect = FALSE;
	self->should_select = FALSE;
	__vala_GtkTreePath_free0 (self->click_path);
	self->click_path = NULL;
	block33_data_unref (_data33_);
	_data33_ = NULL;
	return;
}

void
files_abstract_directory_view_on_view_button_release_event (FilesAbstractDirectoryView* self,
                                                            gint n_press,
                                                            gdouble x,
                                                            gdouble y)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->on_view_button_release_event) {
		_klass_->on_view_button_release_event (self, n_press, x, y);
	}
}

static void
files_abstract_directory_view_real_change_zoom_level (FilesAbstractDirectoryView* self)
{
	FilesIconRenderer* _tmp0_;
	FilesZoomLevel _tmp1_;
	FilesZoomLevel _tmp2_;
	FilesTextRenderer* _tmp3_;
	FilesZoomLevel _tmp4_;
	FilesZoomLevel _tmp5_;
	GtkWidget* _tmp6_;
	_tmp0_ = self->icon_renderer;
	_tmp1_ = files_abstract_directory_view_get_zoom_level (self);
	_tmp2_ = _tmp1_;
	files_icon_renderer_set_zoom_level (_tmp0_, _tmp2_);
	_tmp3_ = self->name_renderer;
	_tmp4_ = files_abstract_directory_view_get_zoom_level (self);
	_tmp5_ = _tmp4_;
	files_text_renderer_set_zoom_level (_tmp3_, _tmp5_);
	_tmp6_ = self->priv->view;
	g_signal_emit_by_name (_tmp6_, "style-updated");
}

void
files_abstract_directory_view_change_zoom_level (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->change_zoom_level) {
		_klass_->change_zoom_level (self);
	}
}

static Block34Data*
block34_data_ref (Block34Data* _data34_)
{
	g_atomic_int_inc (&_data34_->_ref_count_);
	return _data34_;
}

static void
block34_data_unref (void * _userdata_)
{
	Block34Data* _data34_;
	_data34_ = (Block34Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data34_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data34_->self;
		__vala_GtkTreePath_free0 (_data34_->start_path);
		__vala_GtkTreePath_free0 (_data34_->path);
		_g_object_unref0 (self);
		g_slice_free (Block34Data, _data34_);
	}
}

static gboolean
__lambda105_ (Block34Data* _data34_)
{
	FilesAbstractDirectoryView* self;
	GtkTreePath* start = NULL;
	GtkTreePath* end = NULL;
	GtkTreePath* _tmp0_ = NULL;
	GtkTreePath* _tmp1_ = NULL;
	guint _tmp2_;
	gboolean _tmp3_ = FALSE;
	GtkTreePath* _tmp4_;
	FilesTextRenderer* _tmp10_;
	GtkTreePath* _tmp11_;
	FilesTextRenderer* _tmp12_;
	gboolean result;
	self = _data34_->self;
	start = NULL;
	end = NULL;
	files_abstract_directory_view_get_visible_range (self, &_tmp0_, &_tmp1_);
	__vala_GtkTreePath_free0 (start);
	start = _tmp0_;
	__vala_GtkTreePath_free0 (end);
	end = _tmp1_;
	_tmp2_ = _data34_->count;
	_data34_->count = _tmp2_ + 1;
	_tmp4_ = _data34_->start_path;
	if (_tmp4_ == NULL) {
		_tmp3_ = TRUE;
	} else {
		gboolean _tmp5_ = FALSE;
		if (_data34_->count < ((guint) 20)) {
			GtkTreePath* _tmp6_;
			GtkTreePath* _tmp7_;
			_tmp6_ = start;
			_tmp7_ = _data34_->start_path;
			_tmp5_ = gtk_tree_path_compare (_tmp6_, _tmp7_) != 0;
		} else {
			_tmp5_ = FALSE;
		}
		_tmp3_ = _tmp5_;
	}
	if (_tmp3_) {
		GtkTreePath* _tmp8_;
		GtkTreePath* _tmp9_;
		_tmp8_ = start;
		_tmp9_ = __vala_GtkTreePath_copy0 (_tmp8_);
		__vala_GtkTreePath_free0 (_data34_->start_path);
		_data34_->start_path = _tmp9_;
		_data34_->ok_next_time = FALSE;
		result = G_SOURCE_CONTINUE;
		__vala_GtkTreePath_free0 (end);
		__vala_GtkTreePath_free0 (start);
		return result;
	} else {
		if (!_data34_->ok_next_time) {
			_data34_->ok_next_time = TRUE;
			result = G_SOURCE_CONTINUE;
			__vala_GtkTreePath_free0 (end);
			__vala_GtkTreePath_free0 (start);
			return result;
		}
	}
	_tmp10_ = self->name_renderer;
	g_object_set ((GtkCellRendererText*) _tmp10_, "editable", TRUE, NULL);
	_tmp11_ = _data34_->path;
	_tmp12_ = self->name_renderer;
	files_abstract_directory_view_set_cursor_on_cell (self, _tmp11_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, gtk_cell_renderer_get_type ()) ? ((GtkCellRenderer*) _tmp12_) : NULL, TRUE, FALSE);
	result = G_SOURCE_REMOVE;
	__vala_GtkTreePath_free0 (end);
	__vala_GtkTreePath_free0 (start);
	return result;
}

static gboolean
___lambda105__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda105_ (self);
	return result;
}

static void
files_abstract_directory_view_start_renaming_file (FilesAbstractDirectoryView* self,
                                                   FilesFile* file)
{
	Block34Data* _data34_;
	gboolean _tmp0_;
	gboolean _tmp1_;
	FilesListModel* _tmp2_;
	GtkTreePath* _tmp3_;
	GtkTreePath* _tmp4_;
	GtkTreePath* _tmp5_;
	FilesTextRenderer* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_data34_ = g_slice_new0 (Block34Data);
	_data34_->_ref_count_ = 1;
	_data34_->self = g_object_ref (self);
	_tmp0_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		g_warning ("AbstractDirectoryView.vala:3638: Trying to rename when frozen");
		block34_data_unref (_data34_);
		_data34_ = NULL;
		return;
	}
	_tmp2_ = self->model;
	_tmp3_ = files_list_model_get_path_for_first_file (_tmp2_, file);
	_data34_->path = _tmp3_;
	_tmp4_ = _data34_->path;
	if (_tmp4_ == NULL) {
		g_critical ("AbstractDirectoryView.vala:3644: Failed to find rename file in model");
		block34_data_unref (_data34_);
		_data34_ = NULL;
		return;
	}
	files_abstract_directory_view_set_renaming (self, TRUE);
	files_abstract_directory_view_update_menu_actions (self);
	files_abstract_directory_view_enable_scroll (self, FALSE);
	files_abstract_directory_view_set_is_frozen (self, TRUE);
	_data34_->count = (guint) 0;
	_data34_->ok_next_time = FALSE;
	_data34_->start_path = NULL;
	_tmp5_ = _data34_->path;
	_tmp6_ = self->name_renderer;
	files_abstract_directory_view_set_cursor_on_cell (self, _tmp5_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, gtk_cell_renderer_get_type ()) ? ((GtkCellRenderer*) _tmp6_) : NULL, FALSE, FALSE);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 50, ___lambda105__gsource_func, block34_data_ref (_data34_), block34_data_unref);
	block34_data_unref (_data34_);
	_data34_ = NULL;
}

static Block35Data*
block35_data_ref (Block35Data* _data35_)
{
	g_atomic_int_inc (&_data35_->_ref_count_);
	return _data35_;
}

static void
block35_data_unref (void * _userdata_)
{
	Block35Data* _data35_;
	_data35_ = (Block35Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data35_->_ref_count_)) {
		FilesAbstractDirectoryView* self;
		self = _data35_->self;
		_g_object_unref0 (_data35_->dir);
		_g_object_unref0 (self);
		g_slice_free (Block35Data, _data35_);
	}
}

static void
___lambda124_ (Block35Data* _data35_,
               GObject* obj,
               GAsyncResult* res)
{
	FilesAbstractDirectoryView* self;
	GError* _inner_error0_ = NULL;
	self = _data35_->self;
	g_return_if_fail (res != NULL);
	{
		GFileInfo* inf = NULL;
		FilesDirectory* _tmp0_;
		GFile* _tmp1_;
		GFile* _tmp2_;
		GFileInfo* _tmp3_ = NULL;
		_tmp0_ = _data35_->dir;
		_tmp1_ = files_directory_get_location (_tmp0_);
		_tmp2_ = _tmp1_;
		g_file_set_attributes_finish (_tmp2_, res, &_tmp3_, &_inner_error0_);
		_g_object_unref0 (inf);
		inf = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (inf);
			goto __catch0_g_error;
		}
		_g_object_unref0 (inf);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_warning ("AbstractDirectoryView.vala:3726: Could not set file attributes: %s", _tmp5_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
____lambda124__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda124_ (self, source_object, res);
	block35_data_unref (self);
}

void
files_abstract_directory_view_on_sort_column_changed (FilesAbstractDirectoryView* self)
{
	Block35Data* _data35_;
	gint sort_column_id = 0;
	GtkSortType sort_order = 0;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	GFileInfo* info = NULL;
	GFileInfo* _tmp6_;
	FilesViewSlot* _tmp7_;
	FilesDirectory* _tmp8_;
	FilesDirectory* _tmp9_;
	FilesDirectory* _tmp10_;
	const gchar* sort_col_s = NULL;
	const gchar* _tmp11_;
	const gchar* _tmp12_ = NULL;
	const gchar* sort_order_s = NULL;
	GFileInfo* _tmp13_;
	const gchar* _tmp14_;
	GFileInfo* _tmp15_;
	const gchar* _tmp16_;
	FilesDirectory* _tmp17_;
	FilesFile* _tmp18_;
	FilesFile* _tmp19_;
	GFileInfo* _tmp20_;
	const gchar* _tmp21_;
	FilesDirectory* _tmp22_;
	FilesFile* _tmp23_;
	FilesFile* _tmp24_;
	GFileInfo* _tmp25_;
	const gchar* _tmp26_;
	FilesDirectory* _tmp27_;
	FilesFile* _tmp28_;
	FilesFile* _tmp29_;
	FilesDirectory* _tmp30_;
	FilesFile* _tmp31_;
	FilesFile* _tmp32_;
	g_return_if_fail (self != NULL);
	_data35_ = g_slice_new0 (Block35Data);
	_data35_->_ref_count_ = 1;
	_data35_->self = g_object_ref (self);
	sort_column_id = 0;
	sort_order = 0;
	if (files_is_admin ()) {
		block35_data_unref (_data35_);
		_data35_ = NULL;
		return;
	}
	_tmp1_ = self->priv->_tree_frozen;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		FilesListModel* _tmp2_;
		gint _tmp3_ = 0;
		GtkSortType _tmp4_ = 0;
		gboolean _tmp5_;
		_tmp2_ = self->model;
		_tmp5_ = gtk_tree_sortable_get_sort_column_id ((GtkTreeSortable*) _tmp2_, &_tmp3_, &_tmp4_);
		sort_column_id = _tmp3_;
		sort_order = _tmp4_;
		_tmp0_ = !_tmp5_;
	}
	if (_tmp0_) {
		block35_data_unref (_data35_);
		_data35_ = NULL;
		return;
	}
	_tmp6_ = g_file_info_new ();
	info = _tmp6_;
	_tmp7_ = self->slot;
	_tmp8_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	_data35_->dir = _tmp10_;
	_tmp11_ = files_list_model_column_id_to_string ((FilesListModelColumnID) sort_column_id);
	sort_col_s = _tmp11_;
	if (sort_order == GTK_SORT_DESCENDING) {
		_tmp12_ = "true";
	} else {
		_tmp12_ = "false";
	}
	sort_order_s = _tmp12_;
	_tmp13_ = info;
	_tmp14_ = sort_col_s;
	g_file_info_set_attribute_string (_tmp13_, "metadata::marlin-sort-column-id", _tmp14_);
	_tmp15_ = info;
	_tmp16_ = sort_order_s;
	g_file_info_set_attribute_string (_tmp15_, "metadata::marlin-sort-reversed", _tmp16_);
	_tmp17_ = _data35_->dir;
	_tmp18_ = files_directory_get_file (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = _tmp19_->info;
	_tmp21_ = sort_col_s;
	g_file_info_set_attribute_string (_tmp20_, "metadata::marlin-sort-column-id", _tmp21_);
	_tmp22_ = _data35_->dir;
	_tmp23_ = files_directory_get_file (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = _tmp24_->info;
	_tmp26_ = sort_order_s;
	g_file_info_set_attribute_string (_tmp25_, "metadata::marlin-sort-reversed", _tmp26_);
	_tmp27_ = _data35_->dir;
	_tmp28_ = files_directory_get_file (_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp29_->sort_column_id = sort_column_id;
	_tmp30_ = _data35_->dir;
	_tmp31_ = files_directory_get_file (_tmp30_);
	_tmp32_ = _tmp31_;
	_tmp32_->sort_order = sort_order;
	if (!files_is_admin ()) {
		FilesDirectory* _tmp33_;
		GFile* _tmp34_;
		GFile* _tmp35_;
		GFileInfo* _tmp36_;
		_tmp33_ = _data35_->dir;
		_tmp34_ = files_directory_get_location (_tmp33_);
		_tmp35_ = _tmp34_;
		_tmp36_ = info;
		g_file_set_attributes_async (_tmp35_, _tmp36_, G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, NULL, ____lambda124__gasync_ready_callback, block35_data_ref (_data35_));
	}
	_g_object_unref0 (info);
	block35_data_unref (_data35_);
	_data35_ = NULL;
}

void
files_abstract_directory_view_cancel_timeout (FilesAbstractDirectoryView* self,
                                              guint* id)
{
	g_return_if_fail (self != NULL);
	if ((*id) > ((guint) 0)) {
		g_source_remove (*id);
		*id = (guint) 0;
	}
}

void
files_abstract_directory_view_update_selected_files_and_menu (FilesAbstractDirectoryView* self)
{
	gboolean _tmp6_ = FALSE;
	GList* _tmp7_;
	g_return_if_fail (self != NULL);
	if (self->priv->selected_files_invalid) {
		guint selected_count = 0U;
		GList* _tmp0_ = NULL;
		guint _tmp1_;
		FilesViewSlot* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		GList* _tmp5_;
		(self->selected_files == NULL) ? NULL : (self->selected_files = (_g_list_free__g_object_unref0_ (self->selected_files), NULL));
		self->selected_files = NULL;
		_tmp1_ = files_abstract_directory_view_get_selected_files_from_model (self, &_tmp0_);
		(self->selected_files == NULL) ? NULL : (self->selected_files = (_g_list_free__g_object_unref0_ (self->selected_files), NULL));
		self->selected_files = _tmp0_;
		selected_count = _tmp1_;
		_tmp2_ = self->slot;
		_tmp3_ = files_view_slot_get_displayed_files_count (_tmp2_);
		_tmp4_ = _tmp3_;
		self->priv->all_selected = selected_count == ((guint) _tmp4_);
		self->selected_files = g_list_reverse (self->selected_files);
		self->priv->selected_files_invalid = FALSE;
		files_abstract_directory_view_update_menu_actions (self);
		_tmp5_ = self->selected_files;
		g_signal_emit (self, files_abstract_directory_view_signals[FILES_ABSTRACT_DIRECTORY_VIEW_SELECTION_CHANGED_SIGNAL], 0, _tmp5_);
	}
	_tmp7_ = self->selected_files;
	if (_tmp7_ == NULL) {
		_tmp6_ = TRUE;
	} else {
		GList* _tmp8_;
		GList* _tmp9_;
		_tmp8_ = self->selected_files;
		_tmp9_ = _tmp8_->next;
		_tmp6_ = _tmp9_ == NULL;
	}
	self->one_or_less = _tmp6_;
}

static gboolean
files_abstract_directory_view_real_expand_collapse (FilesAbstractDirectoryView* self,
                                                    GtkTreePath* path)
{
	gboolean result;
	result = TRUE;
	return result;
}

gboolean
files_abstract_directory_view_expand_collapse (FilesAbstractDirectoryView* self,
                                               GtkTreePath* path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->expand_collapse) {
		return _klass_->expand_collapse (self, path);
	}
	return FALSE;
}

static gboolean
files_abstract_directory_view_real_handle_default_button_click (FilesAbstractDirectoryView* self)
{
	gboolean result;
	result = FALSE;
	return result;
}

gboolean
files_abstract_directory_view_handle_default_button_click (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->handle_default_button_click) {
		return _klass_->handle_default_button_click (self);
	}
	return FALSE;
}

static gboolean
files_abstract_directory_view_real_get_next_visible_iter (FilesAbstractDirectoryView* self,
                                                          GtkTreeIter* iter,
                                                          gboolean recurse)
{
	FilesListModel* _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = self->model;
	_tmp1_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp0_, iter);
	result = _tmp1_;
	return result;
}

gboolean
files_abstract_directory_view_get_next_visible_iter (FilesAbstractDirectoryView* self,
                                                     GtkTreeIter* iter,
                                                     gboolean recurse)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->get_next_visible_iter) {
		return _klass_->get_next_visible_iter (self, iter, recurse);
	}
	return FALSE;
}

static void
files_abstract_directory_view_real_cancel (FilesAbstractDirectoryView* self)
{
	files_abstract_directory_view_grab_focus (self);
	files_abstract_directory_view_cancel_hover (self);
	files_abstract_directory_view_cancel_thumbnailing (self);
	files_abstract_directory_view_cancel_timeout (self, &self->priv->drag_scroll_timer_id);
	files_abstract_directory_view_cancel_timeout (self, &self->priv->add_remove_file_timeout_id);
	files_abstract_directory_view_cancel_timeout (self, &self->priv->set_cursor_timeout_id);
	files_abstract_directory_view_cancel_timeout (self, &self->priv->draw_timeout_id);
}

void
files_abstract_directory_view_cancel (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->cancel) {
		_klass_->cancel (self);
	}
}

static void
files_abstract_directory_view_cancel_hover (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	__vala_GtkTreePath_free0 (self->priv->hover_path);
	self->priv->hover_path = NULL;
}

void
files_abstract_directory_view_close (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	files_abstract_directory_view_set_is_frozen (self, TRUE);
	files_abstract_directory_view_cancel (self);
	files_abstract_directory_view_unselect_all (self);
}

static void
__vala_GtkTreePath_free0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (_vala_GtkTreePath_free (var), NULL));
}

static inline void
_g_list_free___vala_GtkTreePath_free0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) __vala_GtkTreePath_free0_);
}

static GtkTreeRowReference*
_vala_GtkTreeRowReference_copy (GtkTreeRowReference* self)
{
	return g_boxed_copy (gtk_tree_row_reference_get_type (), self);
}

static gpointer
__vala_GtkTreeRowReference_copy0 (gpointer self)
{
	return self ? _vala_GtkTreeRowReference_copy (self) : NULL;
}

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

void
files_abstract_directory_view_invert_selection (FilesAbstractDirectoryView* self)
{
	GList* selected_row_refs = NULL;
	GList* _tmp0_;
	GList* _tmp5_;
	g_return_if_fail (self != NULL);
	selected_row_refs = NULL;
	_tmp0_ = files_abstract_directory_view_get_selected_paths (self);
	{
		GList* p_collection = NULL;
		GList* p_it = NULL;
		p_collection = _tmp0_;
		for (p_it = p_collection; p_it != NULL; p_it = p_it->next) {
			GtkTreePath* _tmp1_;
			GtkTreePath* p = NULL;
			_tmp1_ = __vala_GtkTreePath_copy0 ((GtkTreePath*) p_it->data);
			p = _tmp1_;
			{
				FilesListModel* _tmp2_;
				GtkTreePath* _tmp3_;
				GtkTreeRowReference* _tmp4_;
				_tmp2_ = self->model;
				_tmp3_ = p;
				_tmp4_ = gtk_tree_row_reference_new ((GtkTreeModel*) _tmp2_, _tmp3_);
				selected_row_refs = g_list_prepend (selected_row_refs, _tmp4_);
				__vala_GtkTreePath_free0 (p);
			}
		}
		(p_collection == NULL) ? NULL : (p_collection = (_g_list_free___vala_GtkTreePath_free0_ (p_collection), NULL));
	}
	files_abstract_directory_view_select_all (self);
	_tmp5_ = selected_row_refs;
	if (_tmp5_ != NULL) {
		GList* _tmp6_;
		_tmp6_ = selected_row_refs;
		{
			GList* r_collection = NULL;
			GList* r_it = NULL;
			r_collection = _tmp6_;
			for (r_it = r_collection; r_it != NULL; r_it = r_it->next) {
				GtkTreeRowReference* _tmp7_;
				GtkTreeRowReference* r = NULL;
				_tmp7_ = __vala_GtkTreeRowReference_copy0 ((GtkTreeRowReference*) r_it->data);
				r = _tmp7_;
				{
					GtkTreePath* p = NULL;
					GtkTreeRowReference* _tmp8_;
					GtkTreePath* _tmp9_;
					GtkTreePath* _tmp10_;
					_tmp8_ = r;
					_tmp9_ = gtk_tree_row_reference_get_path (_tmp8_);
					p = _tmp9_;
					_tmp10_ = p;
					if (_tmp10_ != NULL) {
						GtkTreePath* _tmp11_;
						_tmp11_ = p;
						files_abstract_directory_view_unselect_path (self, _tmp11_);
					}
					__vala_GtkTreePath_free0 (p);
					__vala_GtkTreeRowReference_free0 (r);
				}
			}
		}
	}
	(selected_row_refs == NULL) ? NULL : (selected_row_refs = (_g_list_free___vala_GtkTreeRowReference_free0_ (selected_row_refs), NULL));
}

void
files_abstract_directory_view_select_all (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	files_abstract_directory_view_tree_select_all (self);
	files_abstract_directory_view_update_selected_files_and_menu (self);
}

void
files_abstract_directory_view_unselect_all (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	files_abstract_directory_view_tree_unselect_all (self);
	files_abstract_directory_view_update_selected_files_and_menu (self);
}

void
files_abstract_directory_view_unselect_others (FilesAbstractDirectoryView* self)
{
	g_return_if_fail (self != NULL);
	files_abstract_directory_view_tree_unselect_others (self);
	files_abstract_directory_view_update_selected_files_and_menu (self);
}

guint
files_abstract_directory_view_get_selected_files_from_model (FilesAbstractDirectoryView* self,
                                                             GList** selected_files)
{
	GList* _vala_selected_files = NULL;
	GList* list = NULL;
	guint count = 0U;
	GList* selected_paths = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	GList* _tmp9_;
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	list = NULL;
	count = (guint) 0;
	_tmp0_ = files_abstract_directory_view_get_selected_paths (self);
	selected_paths = _tmp0_;
	_tmp1_ = selected_paths;
	{
		GList* path_collection = NULL;
		GList* path_it = NULL;
		path_collection = _tmp1_;
		for (path_it = path_collection; path_it != NULL; path_it = path_it->next) {
			GtkTreePath* _tmp2_;
			GtkTreePath* path = NULL;
			_tmp2_ = __vala_GtkTreePath_copy0 ((GtkTreePath*) path_it->data);
			path = _tmp2_;
			{
				FilesFile* file = NULL;
				FilesListModel* _tmp3_;
				GtkTreePath* _tmp4_;
				FilesFile* _tmp5_;
				FilesFile* _tmp6_;
				_tmp3_ = self->model;
				_tmp4_ = path;
				_tmp5_ = files_list_model_file_for_path (_tmp3_, _tmp4_);
				file = _tmp5_;
				_tmp6_ = file;
				if (_tmp6_ != NULL) {
					FilesFile* _tmp7_;
					guint _tmp8_;
					_tmp7_ = file;
					file = NULL;
					list = g_list_prepend (list, _tmp7_);
					_tmp8_ = count;
					count = _tmp8_ + 1;
				} else {
					g_critical ("AbstractDirectoryView.vala:3832: Null file in model");
				}
				_g_object_unref0 (file);
				__vala_GtkTreePath_free0 (path);
			}
		}
	}
	_tmp9_ = list;
	list = NULL;
	(_vala_selected_files == NULL) ? NULL : (_vala_selected_files = (_g_list_free__g_object_unref0_ (_vala_selected_files), NULL));
	_vala_selected_files = _tmp9_;
	result = count;
	(selected_paths == NULL) ? NULL : (selected_paths = (_g_list_free___vala_GtkTreePath_free0_ (selected_paths), NULL));
	(list == NULL) ? NULL : (list = (_g_list_free__g_object_unref0_ (list), NULL));
	if (selected_files) {
		*selected_files = _vala_selected_files;
	} else {
		(_vala_selected_files == NULL) ? NULL : (_vala_selected_files = (_g_list_free__g_object_unref0_ (_vala_selected_files), NULL));
	}
	return result;
}

static void
files_abstract_directory_view_real_highlight_path (FilesAbstractDirectoryView* self,
                                                   GtkTreePath* path)
{
}

void
files_abstract_directory_view_highlight_path (FilesAbstractDirectoryView* self,
                                              GtkTreePath* path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->highlight_path) {
		_klass_->highlight_path (self, path);
	}
}

static GtkTreePath*
files_abstract_directory_view_real_up (FilesAbstractDirectoryView* self,
                                       GtkTreePath* path)
{
	GtkTreePath* _tmp0_;
	GtkTreePath* result;
	g_return_val_if_fail (path != NULL, NULL);
	gtk_tree_path_up (path);
	_tmp0_ = __vala_GtkTreePath_copy0 (path);
	result = _tmp0_;
	return result;
}

GtkTreePath*
files_abstract_directory_view_up (FilesAbstractDirectoryView* self,
                                  GtkTreePath* path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->up) {
		return _klass_->up (self, path);
	}
	return NULL;
}

static GtkTreePath*
files_abstract_directory_view_real_down (FilesAbstractDirectoryView* self,
                                         GtkTreePath* path)
{
	GtkTreePath* _tmp0_;
	GtkTreePath* result;
	g_return_val_if_fail (path != NULL, NULL);
	gtk_tree_path_down (path);
	_tmp0_ = __vala_GtkTreePath_copy0 (path);
	result = _tmp0_;
	return result;
}

GtkTreePath*
files_abstract_directory_view_down (FilesAbstractDirectoryView* self,
                                    GtkTreePath* path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->down) {
		return _klass_->down (self, path);
	}
	return NULL;
}

static GSettings*
files_abstract_directory_view_real_get_view_settings (FilesAbstractDirectoryView* self)
{
	GSettings* result;
	result = NULL;
	return result;
}

GSettings*
files_abstract_directory_view_get_view_settings (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->get_view_settings) {
		return _klass_->get_view_settings (self);
	}
	return NULL;
}

static void
files_abstract_directory_view_real_set_up_zoom_level (FilesAbstractDirectoryView* self)
{
	GSettings* view_settings = NULL;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	_tmp0_ = files_abstract_directory_view_get_view_settings (self);
	view_settings = _tmp0_;
	_tmp1_ = view_settings;
	if (_tmp1_ == NULL) {
		self->minimum_zoom = FILES_ZOOM_LEVEL_SMALLEST;
		self->maximum_zoom = FILES_ZOOM_LEVEL_LARGEST;
		files_abstract_directory_view_set_zoom_level (self, FILES_ZOOM_LEVEL_NORMAL);
	} else {
		GSettings* _tmp2_;
		GSettings* _tmp3_;
		GSettings* _tmp4_;
		GSettings* _tmp5_;
		_tmp2_ = view_settings;
		self->minimum_zoom = (FilesZoomLevel) g_settings_get_enum (_tmp2_, "minimum-zoom-level");
		_tmp3_ = view_settings;
		self->maximum_zoom = (FilesZoomLevel) g_settings_get_enum (_tmp3_, "maximum-zoom-level");
		_tmp4_ = view_settings;
		files_abstract_directory_view_set_zoom_level (self, (FilesZoomLevel) g_settings_get_enum (_tmp4_, "zoom-level"));
		_tmp5_ = view_settings;
		g_settings_bind (_tmp5_, "zoom-level", (GObject*) self, "zoom-level", G_SETTINGS_BIND_SET);
	}
	_g_object_unref0 (view_settings);
}

void
files_abstract_directory_view_set_up_zoom_level (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->set_up_zoom_level) {
		_klass_->set_up_zoom_level (self);
	}
}

static gboolean
files_abstract_directory_view_real_view_has_focus (FilesAbstractDirectoryView* self)
{
	GtkWidget* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	_tmp0_ = self->priv->view;
	g_object_get (_tmp0_, "has-focus", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

gboolean
files_abstract_directory_view_view_has_focus (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->view_has_focus) {
		return _klass_->view_has_focus (self);
	}
	return FALSE;
}

static void
files_abstract_directory_view_real_scroll_to_cell (FilesAbstractDirectoryView* self,
                                                   GtkTreePath* path,
                                                   gboolean scroll_to_top)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	if (path == NULL) {
		_tmp3_ = TRUE;
	} else {
		FilesViewSlot* _tmp4_;
		_tmp4_ = self->slot;
		_tmp3_ = _tmp4_ == NULL;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		FilesViewSlot* _tmp5_;
		FilesDirectory* _tmp6_;
		FilesDirectory* _tmp7_;
		_tmp5_ = self->slot;
		_tmp6_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp2_ = _tmp7_ == NULL;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		FilesViewSlot* _tmp8_;
		FilesDirectory* _tmp9_;
		FilesDirectory* _tmp10_;
		_tmp8_ = self->slot;
		_tmp9_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp1_ = _tmp10_->permission_denied;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		FilesViewSlot* _tmp11_;
		FilesDirectory* _tmp12_;
		FilesDirectory* _tmp13_;
		_tmp11_ = self->slot;
		_tmp12_ = files_abstract_slot_get_directory ((FilesAbstractSlot*) _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp0_ = files_directory_is_empty (_tmp13_);
	}
	if (_tmp0_) {
		return;
	}
	files_abstract_directory_view_scroll_to_path (self, path, scroll_to_top);
}

void
files_abstract_directory_view_scroll_to_cell (FilesAbstractDirectoryView* self,
                                              GtkTreePath* path,
                                              gboolean scroll_to_top)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->scroll_to_cell) {
		_klass_->scroll_to_cell (self, path, scroll_to_top);
	}
}

static void
_vala_GdkEventKey_free (GdkEventKey* self)
{
	g_boxed_free (gdk_event_get_type (), self);
}

guint
files_abstract_directory_view_map_key (guint original_keyval,
                                       guint keycode,
                                       GdkModifierType* consumed_mods)
{
	GdkModifierType _vala_consumed_mods = 0U;
	guint keyval = 0U;
	guint result;
	keyval = original_keyval;
	_vala_consumed_mods = 0;
	if (keyval > ((guint) 127)) {
		gint eff_grp = 0;
		gint level = 0;
		GdkEventKey* event = NULL;
		GdkEvent* _tmp0_;
		GdkDisplay* display = NULL;
		GdkDevice* _tmp1_;
		GdkDisplay* _tmp2_;
		GdkDisplay* _tmp3_;
		GdkKeymap* keymap = NULL;
		GdkDisplay* _tmp4_;
		GdkKeymap* _tmp5_;
		GdkKeymap* _tmp6_;
		GdkKeymap* _tmp7_;
		GdkEventKey* _tmp8_;
		GdkEventKey* _tmp9_;
		GdkEventKey* _tmp10_;
		guint _tmp11_ = 0U;
		gint _tmp12_ = 0;
		gint _tmp13_ = 0;
		GdkModifierType _tmp14_ = 0U;
		gboolean _tmp15_;
		_tmp0_ = gtk_get_current_event ();
		event = (GdkEventKey*) _tmp0_;
		_tmp1_ = gtk_get_current_event_device ();
		_tmp2_ = gdk_device_get_display (_tmp1_);
		_tmp3_ = _g_object_ref0 (_tmp2_);
		display = _tmp3_;
		_tmp4_ = display;
		_tmp5_ = gdk_keymap_get_for_display (_tmp4_);
		_tmp6_ = _g_object_ref0 (_tmp5_);
		keymap = _tmp6_;
		_tmp7_ = keymap;
		_tmp8_ = event;
		_tmp9_ = event;
		_tmp10_ = event;
		_tmp15_ = gdk_keymap_translate_keyboard_state (_tmp7_, (guint) _tmp8_->hardware_keycode, _tmp9_->state, (gint) _tmp10_->group, &_tmp11_, &_tmp12_, &_tmp13_, &_tmp14_);
		keyval = _tmp11_;
		eff_grp = _tmp12_;
		level = _tmp13_;
		_vala_consumed_mods = _tmp14_;
		if (!_tmp15_) {
			g_warning ("AbstractDirectoryView.vala:3892: translate keyboard state failed");
			keyval = original_keyval;
			_vala_consumed_mods = 0;
		} else {
			keyval = (guint) 0;
			{
				guint key = 0U;
				key = (guint) 32;
				{
					gboolean _tmp16_ = FALSE;
					_tmp16_ = TRUE;
					while (TRUE) {
						GdkKeymap* _tmp18_;
						GdkEventKey* _tmp19_;
						if (!_tmp16_) {
							guint _tmp17_;
							_tmp17_ = key;
							key = _tmp17_ + 1;
						}
						_tmp16_ = FALSE;
						if (!(key < ((guint) 128))) {
							break;
						}
						_tmp18_ = keymap;
						_tmp19_ = event;
						if (files_abstract_directory_view_match_keycode (_tmp18_, key, (guint) _tmp19_->hardware_keycode, level)) {
							keyval = key;
							break;
						}
					}
				}
			}
			if (keyval == ((guint) 0)) {
				g_debug ("AbstractDirectoryView.vala:3905: Could not match hardware code to ASCI" \
"I hotkey");
				keyval = original_keyval;
				_vala_consumed_mods = 0;
			}
		}
		_g_object_unref0 (keymap);
		_g_object_unref0 (display);
		__vala_GdkEventKey_free0 (event);
	}
	result = keyval;
	if (consumed_mods) {
		*consumed_mods = _vala_consumed_mods;
	}
	return result;
}

/** Returns true if the code parameter matches the keycode of the keyval parameter for
      * any keyboard group or level (in order to allow for non-QWERTY keyboards) **/
gboolean
files_abstract_directory_view_match_keycode (GdkKeymap* keymap,
                                             guint keyval,
                                             guint code,
                                             gint level)
{
	GdkKeymapKey* keys = NULL;
	gint keys_length1 = 0;
	gint _keys_size_ = 0;
	GdkKeymapKey* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gboolean _tmp2_;
	gboolean result;
	g_return_val_if_fail (keymap != NULL, FALSE);
	_tmp2_ = gdk_keymap_get_entries_for_keyval (keymap, keyval, &_tmp0_, &_tmp1_);
	keys = (g_free (keys), NULL);
	keys = _tmp0_;
	keys_length1 = _tmp1_;
	_keys_size_ = keys_length1;
	if (_tmp2_) {
		GdkKeymapKey* _tmp3_;
		gint _tmp3__length1;
		_tmp3_ = keys;
		_tmp3__length1 = keys_length1;
		{
			GdkKeymapKey* key_collection = NULL;
			gint key_collection_length1 = 0;
			gint _key_collection_size_ = 0;
			gint key_it = 0;
			key_collection = _tmp3_;
			key_collection_length1 = _tmp3__length1;
			for (key_it = 0; key_it < key_collection_length1; key_it = key_it + 1) {
				GdkKeymapKey key = {0};
				key = key_collection[key_it];
				{
					gboolean _tmp4_ = FALSE;
					GdkKeymapKey _tmp5_;
					_tmp5_ = key;
					if (code == _tmp5_.keycode) {
						GdkKeymapKey _tmp6_;
						_tmp6_ = key;
						_tmp4_ = level == _tmp6_.level;
					} else {
						_tmp4_ = FALSE;
					}
					if (_tmp4_) {
						result = TRUE;
						keys = (g_free (keys), NULL);
						return result;
					}
				}
			}
		}
	}
	result = FALSE;
	keys = (g_free (keys), NULL);
	return result;
}

/** Abstract methods - must be overridden*/
static GList*
files_abstract_directory_view_real_get_selected_paths (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_get_selected_paths'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

GList*
files_abstract_directory_view_get_selected_paths (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->get_selected_paths) {
		return _klass_->get_selected_paths (self);
	}
	return NULL;
}

static GtkTreePath*
files_abstract_directory_view_real_get_path_at_pos (FilesAbstractDirectoryView* self,
                                                    gint x,
                                                    gint win)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_get_path_at_pos'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

GtkTreePath*
files_abstract_directory_view_get_path_at_pos (FilesAbstractDirectoryView* self,
                                               gint x,
                                               gint win)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->get_path_at_pos) {
		return _klass_->get_path_at_pos (self, x, win);
	}
	return NULL;
}

static GtkTreePath*
files_abstract_directory_view_real_get_path_at_cursor (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_get_path_at_cursor'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

GtkTreePath*
files_abstract_directory_view_get_path_at_cursor (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->get_path_at_cursor) {
		return _klass_->get_path_at_cursor (self);
	}
	return NULL;
}

static void
files_abstract_directory_view_real_tree_select_all (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_tree_select_all'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_tree_select_all (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->tree_select_all) {
		_klass_->tree_select_all (self);
	}
}

static void
files_abstract_directory_view_real_tree_unselect_all (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_tree_unselect_all'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_tree_unselect_all (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->tree_unselect_all) {
		_klass_->tree_unselect_all (self);
	}
}

static void
files_abstract_directory_view_real_tree_unselect_others (FilesAbstractDirectoryView* self)
{
}

void
files_abstract_directory_view_tree_unselect_others (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->tree_unselect_others) {
		_klass_->tree_unselect_others (self);
	}
}

static void
files_abstract_directory_view_real_select_path (FilesAbstractDirectoryView* self,
                                                GtkTreePath* path,
                                                gboolean cursor_follows)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_select_path'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_select_path (FilesAbstractDirectoryView* self,
                                           GtkTreePath* path,
                                           gboolean cursor_follows)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->select_path) {
		_klass_->select_path (self, path, cursor_follows);
	}
}

static void
files_abstract_directory_view_real_unselect_path (FilesAbstractDirectoryView* self,
                                                  GtkTreePath* path)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_unselect_path'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_unselect_path (FilesAbstractDirectoryView* self,
                                             GtkTreePath* path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->unselect_path) {
		_klass_->unselect_path (self, path);
	}
}

static gboolean
files_abstract_directory_view_real_path_is_selected (FilesAbstractDirectoryView* self,
                                                     GtkTreePath* path)
{
	gboolean _tmp0_ = FALSE;
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_path_is_selected'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return _tmp0_;
}

gboolean
files_abstract_directory_view_path_is_selected (FilesAbstractDirectoryView* self,
                                                GtkTreePath* path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->path_is_selected) {
		return _klass_->path_is_selected (self, path);
	}
	return FALSE;
}

static gboolean
files_abstract_directory_view_real_get_visible_range (FilesAbstractDirectoryView* self,
                                                      GtkTreePath** start_path,
                                                      GtkTreePath** end_path)
{
	gboolean _tmp0_ = FALSE;
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_get_visible_range'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return _tmp0_;
}

gboolean
files_abstract_directory_view_get_visible_range (FilesAbstractDirectoryView* self,
                                                 GtkTreePath** start_path,
                                                 GtkTreePath** end_path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->get_visible_range) {
		return _klass_->get_visible_range (self, start_path, end_path);
	}
	return FALSE;
}

static void
files_abstract_directory_view_real_set_cursor (FilesAbstractDirectoryView* self,
                                               GtkTreePath* path,
                                               gboolean start_editing,
                                               gboolean select,
                                               gboolean scroll_to_top)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_set_cursor'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_set_cursor (FilesAbstractDirectoryView* self,
                                          GtkTreePath* path,
                                          gboolean start_editing,
                                          gboolean select,
                                          gboolean scroll_to_top)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->set_cursor) {
		_klass_->set_cursor (self, path, start_editing, select, scroll_to_top);
	}
}

static gboolean
files_abstract_directory_view_real_move_cursor (FilesAbstractDirectoryView* self,
                                                guint keyval,
                                                gboolean only_shift_pressed,
                                                gboolean control_pressed)
{
	gboolean result;
	result = FALSE;
	return result;
}

gboolean
files_abstract_directory_view_move_cursor (FilesAbstractDirectoryView* self,
                                           guint keyval,
                                           gboolean only_shift_pressed,
                                           gboolean control_pressed)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->move_cursor) {
		return _klass_->move_cursor (self, keyval, only_shift_pressed, control_pressed);
	}
	return FALSE;
}

static gboolean
files_abstract_directory_view_real_will_handle_button_press (FilesAbstractDirectoryView* self,
                                                             gboolean no_mods,
                                                             gboolean only_control_pressed,
                                                             gboolean only_shift_pressed)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	if (!no_mods) {
		_tmp0_ = !only_control_pressed;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		result = FALSE;
		return result;
	} else {
		result = TRUE;
		return result;
	}
}

gboolean
files_abstract_directory_view_will_handle_button_press (FilesAbstractDirectoryView* self,
                                                        gboolean no_mods,
                                                        gboolean only_control_pressed,
                                                        gboolean only_shift_pressed)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->will_handle_button_press) {
		return _klass_->will_handle_button_press (self, no_mods, only_control_pressed, only_shift_pressed);
	}
	return FALSE;
}

gboolean
files_abstract_directory_view_is_on_icon (FilesAbstractDirectoryView* self,
                                          gint x,
                                          gint y,
                                          gboolean* on_helper)
{
	GdkRectangle pointer_rect = {0};
	GdkRectangle _tmp0_ = {0};
	gboolean on_icon = FALSE;
	FilesIconRenderer* _tmp1_;
	GdkRectangle _tmp2_;
	FilesIconRenderer* _tmp3_;
	GdkRectangle _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_.x = x - 2;
	_tmp0_.y = y - 2;
	_tmp0_.width = 4;
	_tmp0_.height = 4;
	pointer_rect = _tmp0_;
	_tmp1_ = self->icon_renderer;
	_tmp2_ = _tmp1_->hover_rect;
	on_icon = gdk_rectangle_intersect (&pointer_rect, &_tmp2_, NULL);
	_tmp3_ = self->icon_renderer;
	_tmp4_ = _tmp3_->hover_helper_rect;
	*on_helper = gdk_rectangle_intersect (&pointer_rect, &_tmp4_, NULL);
	result = on_icon;
	return result;
}

static gboolean
files_abstract_directory_view_real_handle_multi_select (FilesAbstractDirectoryView* self,
                                                        GtkTreePath* path)
{
	gboolean result;
	g_return_val_if_fail (path != NULL, FALSE);
	result = FALSE;
	return result;
}

gboolean
files_abstract_directory_view_handle_multi_select (FilesAbstractDirectoryView* self,
                                                   GtkTreePath* path)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->handle_multi_select) {
		return _klass_->handle_multi_select (self, path);
	}
	return FALSE;
}

static GtkWidget*
files_abstract_directory_view_real_create_view (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_create_view'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

GtkWidget*
files_abstract_directory_view_create_view (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->create_view) {
		return _klass_->create_view (self);
	}
	return NULL;
}

static guint
files_abstract_directory_view_real_get_event_position_info (FilesAbstractDirectoryView* self,
                                                            gdouble x,
                                                            gdouble y,
                                                            GtkTreePath** path,
                                                            gboolean rubberband)
{
	guint _tmp0_ = 0U;
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_get_event_position_info'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return _tmp0_;
}

guint
files_abstract_directory_view_get_event_position_info (FilesAbstractDirectoryView* self,
                                                       gdouble x,
                                                       gdouble y,
                                                       GtkTreePath** path,
                                                       gboolean rubberband)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_val_if_fail (self != NULL, 0U);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->get_event_position_info) {
		return _klass_->get_event_position_info (self, x, y, path, rubberband);
	}
	return 0U;
}

static void
files_abstract_directory_view_real_scroll_to_path (FilesAbstractDirectoryView* self,
                                                   GtkTreePath* path,
                                                   gboolean scroll_to_top)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_scroll_to_path'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_scroll_to_path (FilesAbstractDirectoryView* self,
                                              GtkTreePath* path,
                                              gboolean scroll_to_top)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->scroll_to_path) {
		_klass_->scroll_to_path (self, path, scroll_to_top);
	}
}

static void
files_abstract_directory_view_real_set_cursor_on_cell (FilesAbstractDirectoryView* self,
                                                       GtkTreePath* path,
                                                       GtkCellRenderer* renderer,
                                                       gboolean start_editing,
                                                       gboolean scroll_to_top)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_set_cursor_on_cell'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_set_cursor_on_cell (FilesAbstractDirectoryView* self,
                                                  GtkTreePath* path,
                                                  GtkCellRenderer* renderer,
                                                  gboolean start_editing,
                                                  gboolean scroll_to_top)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->set_cursor_on_cell) {
		_klass_->set_cursor_on_cell (self, path, renderer, start_editing, scroll_to_top);
	}
}

static void
files_abstract_directory_view_real_freeze_tree (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_freeze_tree'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_freeze_tree (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->freeze_tree) {
		_klass_->freeze_tree (self);
	}
}

static void
files_abstract_directory_view_real_thaw_tree (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_thaw_tree'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_thaw_tree (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->thaw_tree) {
		_klass_->thaw_tree (self);
	}
}

static void
files_abstract_directory_view_real_freeze_child_notify (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_freeze_child_notify'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_freeze_child_notify (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->freeze_child_notify) {
		_klass_->freeze_child_notify (self);
	}
}

static void
files_abstract_directory_view_real_thaw_child_notify (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_thaw_child_notify'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_thaw_child_notify (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->thaw_child_notify) {
		_klass_->thaw_child_notify (self);
	}
}

static void
files_abstract_directory_view_real_connect_tree_signals (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_connect_tree_signals'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_connect_tree_signals (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->connect_tree_signals) {
		_klass_->connect_tree_signals (self);
	}
}

static void
files_abstract_directory_view_real_disconnect_tree_signals (FilesAbstractDirectoryView* self)
{
	g_critical ("Type `%s' does not implement abstract method `files_abstract_directory_view_disconnect_tree_signals'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
files_abstract_directory_view_disconnect_tree_signals (FilesAbstractDirectoryView* self)
{
	FilesAbstractDirectoryViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FILES_ABSTRACT_DIRECTORY_VIEW_GET_CLASS (self);
	if (_klass_->disconnect_tree_signals) {
		_klass_->disconnect_tree_signals (self);
	}
}

FilesZoomLevel
files_abstract_directory_view_get_zoom_level (FilesAbstractDirectoryView* self)
{
	FilesZoomLevel result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_zoom_level;
	return result;
}

void
files_abstract_directory_view_set_zoom_level (FilesAbstractDirectoryView* self,
                                              FilesZoomLevel value)
{
	g_return_if_fail (self != NULL);
	if (value > self->maximum_zoom) {
		self->priv->_zoom_level = self->maximum_zoom;
	} else {
		if (value < self->minimum_zoom) {
			self->priv->_zoom_level = self->minimum_zoom;
		} else {
			self->priv->_zoom_level = value;
		}
	}
	files_abstract_directory_view_on_zoom_level_changed (self, self->priv->_zoom_level);
	g_object_notify_by_pspec ((GObject *) self, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_ZOOM_LEVEL_PROPERTY]);
}

gint
files_abstract_directory_view_get_icon_size (FilesAbstractDirectoryView* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = (gint) files_zoom_level_to_icon_size (self->priv->_zoom_level);
	return result;
}

static gboolean
files_abstract_directory_view_get_drop_highlight (FilesAbstractDirectoryView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_drop_highlight;
	return result;
}

static void
files_abstract_directory_view_set_drop_highlight (FilesAbstractDirectoryView* self,
                                                  gboolean value)
{
	g_return_if_fail (self != NULL);
	if (value != self->priv->_drop_highlight) {
		if (value) {
			gtk_drag_highlight ((GtkWidget*) self);
		} else {
			gtk_drag_unhighlight ((GtkWidget*) self);
		}
	}
	self->priv->_drop_highlight = value;
}

gboolean
files_abstract_directory_view_get_singleclick_select (FilesAbstractDirectoryView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_singleclick_select;
	return result;
}

void
files_abstract_directory_view_set_singleclick_select (FilesAbstractDirectoryView* self,
                                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = files_abstract_directory_view_get_singleclick_select (self);
	if (old_value != value) {
		self->priv->_singleclick_select = value;
		g_object_notify_by_pspec ((GObject *) self, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_SINGLECLICK_SELECT_PROPERTY]);
	}
}

gboolean
files_abstract_directory_view_get_renaming (FilesAbstractDirectoryView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_renaming;
	return result;
}

void
files_abstract_directory_view_set_renaming (FilesAbstractDirectoryView* self,
                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = files_abstract_directory_view_get_renaming (self);
	if (old_value != value) {
		self->priv->_renaming = value;
		g_object_notify_by_pspec ((GObject *) self, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_RENAMING_PROPERTY]);
	}
}

gboolean
files_abstract_directory_view_get_is_frozen (FilesAbstractDirectoryView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_frozen;
	return result;
}

void
files_abstract_directory_view_set_is_frozen (FilesAbstractDirectoryView* self,
                                             gboolean value)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = files_abstract_directory_view_get_is_frozen (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != value) {
		GtkPropagationPhase _tmp9_ = 0;
		GtkEventControllerKey* _tmp10_;
		self->priv->_is_frozen = value;
		if (value) {
			GSimpleActionGroup* _tmp2_;
			GSimpleActionGroup* _tmp3_;
			GSimpleActionGroup* _tmp4_;
			GSimpleActionGroup* _tmp5_;
			FilesClipboardManager* _tmp6_;
			guint _tmp7_;
			_tmp2_ = self->priv->selection_actions;
			files_abstract_directory_view_action_set_enabled (self, _tmp2_, "cut", FALSE);
			_tmp3_ = self->priv->common_actions;
			files_abstract_directory_view_action_set_enabled (self, _tmp3_, "copy", FALSE);
			_tmp4_ = self->priv->common_actions;
			files_abstract_directory_view_action_set_enabled (self, _tmp4_, "paste-into", FALSE);
			_tmp5_ = self->priv->common_actions;
			files_abstract_directory_view_action_set_enabled (self, _tmp5_, "paste", FALSE);
			files_abstract_directory_view_disconnect_tree_signals (self);
			_tmp6_ = self->priv->clipboard;
			g_signal_parse_name ("changed", FILES_TYPE_CLIPBOARD_MANAGER, &_tmp7_, NULL, FALSE);
			g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _files_abstract_directory_view_on_clipboard_changed_files_clipboard_manager_changed, self);
		} else {
			FilesClipboardManager* _tmp8_;
			_tmp8_ = self->priv->clipboard;
			g_signal_connect_object (_tmp8_, "changed", (GCallback) _files_abstract_directory_view_on_clipboard_changed_files_clipboard_manager_changed, self, 0);
			files_abstract_directory_view_connect_tree_signals (self);
			files_abstract_directory_view_update_menu_actions (self);
		}
		if (value) {
			_tmp9_ = GTK_PHASE_NONE;
		} else {
			_tmp9_ = GTK_PHASE_BUBBLE;
		}
		_tmp10_ = self->key_controller;
		gtk_event_controller_set_propagation_phase ((GtkEventController*) _tmp10_, _tmp9_);
	}
	g_object_notify_by_pspec ((GObject *) self, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_IS_FROZEN_PROPERTY]);
}

gboolean
files_abstract_directory_view_get_in_recent (FilesAbstractDirectoryView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_in_recent;
	return result;
}

static void
files_abstract_directory_view_set_in_recent (FilesAbstractDirectoryView* self,
                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = files_abstract_directory_view_get_in_recent (self);
	if (old_value != value) {
		self->priv->_in_recent = value;
		g_object_notify_by_pspec ((GObject *) self, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_IN_RECENT_PROPERTY]);
	}
}

gboolean
files_abstract_directory_view_get_tree_frozen (FilesAbstractDirectoryView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_tree_frozen;
	return result;
}

void
files_abstract_directory_view_set_tree_frozen (FilesAbstractDirectoryView* self,
                                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = files_abstract_directory_view_get_tree_frozen (self);
	if (old_value != value) {
		self->priv->_tree_frozen = value;
		g_object_notify_by_pspec ((GObject *) self, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_TREE_FROZEN_PROPERTY]);
	}
}

FilesViewWindow*
files_abstract_directory_view_get_window (FilesAbstractDirectoryView* self)
{
	FilesViewWindow* result;
	FilesViewSlot* _tmp0_;
	FilesViewViewContainer* _tmp1_;
	FilesViewViewContainer* _tmp2_;
	FilesViewWindow* _tmp3_;
	FilesViewWindow* _tmp4_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->slot;
	_tmp1_ = files_view_slot_get_ctab (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = files_view_view_container_get_window (_tmp2_);
	_tmp4_ = _tmp3_;
	result = _tmp4_;
	return result;
}

static void
g_cclosure_user_marshal_VOID__OBJECT_ENUM_BOOLEAN (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_ENUM_BOOLEAN) (gpointer data1, gpointer arg_1, gint arg_2, gboolean arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_ENUM_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_ENUM_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_enum (param_values + 2), g_value_get_boolean (param_values + 3), data2);
}

static FilesAbstractDirectoryViewSortSubMenuItem*
files_abstract_directory_view_sort_sub_menu_item_construct (GType object_type)
{
	FilesAbstractDirectoryViewSortSubMenuItem * self = NULL;
	self = (FilesAbstractDirectoryViewSortSubMenuItem*) g_object_new (object_type, NULL);
	return self;
}

static FilesAbstractDirectoryViewSortSubMenuItem*
files_abstract_directory_view_sort_sub_menu_item_new (void)
{
	return files_abstract_directory_view_sort_sub_menu_item_construct (FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_SORT_SUB_MENU_ITEM);
}

static GObject *
files_abstract_directory_view_sort_sub_menu_item_constructor (GType type,
                                                              guint n_construct_properties,
                                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FilesAbstractDirectoryViewSortSubMenuItem * self;
	GMenuItem* name_item = NULL;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GMenuItem* _tmp4_;
	GMenuItem* _tmp5_;
	GMenuItem* size_item = NULL;
	GVariant* _tmp6_;
	GVariant* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	GMenuItem* _tmp10_;
	GMenuItem* _tmp11_;
	GMenuItem* type_item = NULL;
	GVariant* _tmp12_;
	GVariant* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	GMenuItem* _tmp16_;
	GMenuItem* _tmp17_;
	GMenuItem* date_item = NULL;
	GVariant* _tmp18_;
	GVariant* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	GMenuItem* _tmp22_;
	GMenuItem* _tmp23_;
	GMenuItem* reversed_item = NULL;
	GMenuItem* _tmp24_;
	GMenuItem* folders_first_item = NULL;
	GMenuItem* _tmp25_;
	GMenu* radio_section = NULL;
	GMenu* _tmp26_;
	GMenu* _tmp27_;
	GMenuItem* _tmp28_;
	GMenu* _tmp29_;
	GMenuItem* _tmp30_;
	GMenu* _tmp31_;
	GMenuItem* _tmp32_;
	GMenu* _tmp33_;
	GMenuItem* _tmp34_;
	GMenu* check_section = NULL;
	GMenu* _tmp35_;
	GMenu* _tmp36_;
	GMenuItem* _tmp37_;
	GMenu* _tmp38_;
	GMenuItem* _tmp39_;
	GMenu* menu_model = NULL;
	GMenu* _tmp40_;
	GMenu* _tmp41_;
	GMenu* _tmp42_;
	GMenu* _tmp43_;
	GMenu* _tmp44_;
	GMenu* _tmp45_;
	GtkMenu* _tmp46_;
	GtkMenu* _tmp47_;
	parent_class = G_OBJECT_CLASS (files_abstract_directory_view_sort_sub_menu_item_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_SORT_SUB_MENU_ITEM, FilesAbstractDirectoryViewSortSubMenuItem);
	_tmp0_ = g_variant_new_string ("name");
	g_variant_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_action_print_detailed_name ("background.sort-by", _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_menu_item_new (_ ("Name"), _tmp3_);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	_g_variant_unref0 (_tmp1_);
	name_item = _tmp5_;
	_tmp6_ = g_variant_new_string ("size");
	g_variant_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_action_print_detailed_name ("background.sort-by", _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_menu_item_new (_ ("Size"), _tmp9_);
	_tmp11_ = _tmp10_;
	_g_free0 (_tmp9_);
	_g_variant_unref0 (_tmp7_);
	size_item = _tmp11_;
	_tmp12_ = g_variant_new_string ("type");
	g_variant_ref_sink (_tmp12_);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_action_print_detailed_name ("background.sort-by", _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = g_menu_item_new (_ ("Type"), _tmp15_);
	_tmp17_ = _tmp16_;
	_g_free0 (_tmp15_);
	_g_variant_unref0 (_tmp13_);
	type_item = _tmp17_;
	_tmp18_ = g_variant_new_string ("modified");
	g_variant_ref_sink (_tmp18_);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_action_print_detailed_name ("background.sort-by", _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = g_menu_item_new (_ ("Date"), _tmp21_);
	_tmp23_ = _tmp22_;
	_g_free0 (_tmp21_);
	_g_variant_unref0 (_tmp19_);
	date_item = _tmp23_;
	_tmp24_ = g_menu_item_new (_ ("Reversed Order"), "background.reverse");
	reversed_item = _tmp24_;
	_tmp25_ = g_menu_item_new (_ ("Folders Before Files"), "win.sort-directories-first");
	folders_first_item = _tmp25_;
	_tmp26_ = g_menu_new ();
	radio_section = _tmp26_;
	_tmp27_ = radio_section;
	_tmp28_ = name_item;
	g_menu_append_item (_tmp27_, _tmp28_);
	_tmp29_ = radio_section;
	_tmp30_ = size_item;
	g_menu_append_item (_tmp29_, _tmp30_);
	_tmp31_ = radio_section;
	_tmp32_ = type_item;
	g_menu_append_item (_tmp31_, _tmp32_);
	_tmp33_ = radio_section;
	_tmp34_ = date_item;
	g_menu_append_item (_tmp33_, _tmp34_);
	_tmp35_ = g_menu_new ();
	check_section = _tmp35_;
	_tmp36_ = check_section;
	_tmp37_ = reversed_item;
	g_menu_append_item (_tmp36_, _tmp37_);
	_tmp38_ = check_section;
	_tmp39_ = folders_first_item;
	g_menu_append_item (_tmp38_, _tmp39_);
	_tmp40_ = g_menu_new ();
	menu_model = _tmp40_;
	_tmp41_ = menu_model;
	_tmp42_ = radio_section;
	g_menu_append_section (_tmp41_, NULL, (GMenuModel*) _tmp42_);
	_tmp43_ = menu_model;
	_tmp44_ = check_section;
	g_menu_append_section (_tmp43_, NULL, (GMenuModel*) _tmp44_);
	_tmp45_ = menu_model;
	_tmp46_ = (GtkMenu*) gtk_menu_new_from_model ((GMenuModel*) _tmp45_);
	g_object_ref_sink (_tmp46_);
	_tmp47_ = _tmp46_;
	gtk_menu_item_set_submenu ((GtkMenuItem*) self, _tmp47_);
	_g_object_unref0 (_tmp47_);
	gtk_menu_item_set_label ((GtkMenuItem*) self, _ ("Sort by"));
	_g_object_unref0 (menu_model);
	_g_object_unref0 (check_section);
	_g_object_unref0 (radio_section);
	_g_object_unref0 (folders_first_item);
	_g_object_unref0 (reversed_item);
	_g_object_unref0 (date_item);
	_g_object_unref0 (type_item);
	_g_object_unref0 (size_item);
	_g_object_unref0 (name_item);
	return obj;
}

static void
files_abstract_directory_view_sort_sub_menu_item_class_init (FilesAbstractDirectoryViewSortSubMenuItemClass * klass,
                                                             gpointer klass_data)
{
	files_abstract_directory_view_sort_sub_menu_item_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = files_abstract_directory_view_sort_sub_menu_item_constructor;
}

static void
files_abstract_directory_view_sort_sub_menu_item_instance_init (FilesAbstractDirectoryViewSortSubMenuItem * self,
                                                                gpointer klass)
{
}

 G_GNUC_NO_INLINE static GType
files_abstract_directory_view_sort_sub_menu_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FilesAbstractDirectoryViewSortSubMenuItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) files_abstract_directory_view_sort_sub_menu_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FilesAbstractDirectoryViewSortSubMenuItem), 0, (GInstanceInitFunc) files_abstract_directory_view_sort_sub_menu_item_instance_init, NULL };
	GType files_abstract_directory_view_sort_sub_menu_item_type_id;
	files_abstract_directory_view_sort_sub_menu_item_type_id = g_type_register_static (gtk_menu_item_get_type (), "FilesAbstractDirectoryViewSortSubMenuItem", &g_define_type_info, 0);
	return files_abstract_directory_view_sort_sub_menu_item_type_id;
}

static GType
files_abstract_directory_view_sort_sub_menu_item_get_type (void)
{
	static volatile gsize files_abstract_directory_view_sort_sub_menu_item_type_id__once = 0;
	if (g_once_init_enter (&files_abstract_directory_view_sort_sub_menu_item_type_id__once)) {
		GType files_abstract_directory_view_sort_sub_menu_item_type_id;
		files_abstract_directory_view_sort_sub_menu_item_type_id = files_abstract_directory_view_sort_sub_menu_item_get_type_once ();
		g_once_init_leave (&files_abstract_directory_view_sort_sub_menu_item_type_id__once, files_abstract_directory_view_sort_sub_menu_item_type_id);
	}
	return files_abstract_directory_view_sort_sub_menu_item_type_id__once;
}

static inline gpointer
files_abstract_directory_view_new_sub_menu_item_get_instance_private (FilesAbstractDirectoryViewNewSubMenuItem* self)
{
	return G_STRUCT_MEMBER_P (self, FilesAbstractDirectoryViewNewSubMenuItem_private_offset);
}

static gint
___lambda86_ (GFile* a,
              GFile* b)
{
	GCompareFunc _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gint _tmp9_;
	gint result;
	g_return_val_if_fail (a != NULL, -1);
	g_return_val_if_fail (b != NULL, -1);
	_tmp0_ = ((GCompareFunc) g_strcmp0);
	_tmp1_ = g_file_get_basename (a);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_utf8_strdown (_tmp2_, (gssize) -1);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_file_get_basename (b);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_utf8_strdown (_tmp6_, (gssize) -1);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp0_ (_tmp4_, _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
	result = _tmp9_;
	return result;
}

static gint
____lambda86__gcompare_func (gconstpointer a,
                             gconstpointer b)
{
	gint result;
	result = ___lambda86_ ((GFile*) a, (GFile*) b);
	return result;
}

static gint
___lambda87_ (GFile* a,
              GFile* b)
{
	GCompareFunc _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gint _tmp9_;
	gint result;
	g_return_val_if_fail (a != NULL, -1);
	g_return_val_if_fail (b != NULL, -1);
	_tmp0_ = ((GCompareFunc) g_strcmp0);
	_tmp1_ = g_file_get_basename (a);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_utf8_strdown (_tmp2_, (gssize) -1);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_file_get_basename (b);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_utf8_strdown (_tmp6_, (gssize) -1);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp0_ (_tmp4_, _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
	result = _tmp9_;
	return result;
}

static gint
____lambda87__gcompare_func (gconstpointer a,
                             gconstpointer b)
{
	gint result;
	result = ___lambda87_ ((GFile*) a, (GFile*) b);
	return result;
}

static gboolean
files_abstract_directory_view_new_sub_menu_item_load_templates_from_folder (FilesAbstractDirectoryViewNewSubMenuItem* self,
                                                                            GFile* template_folder,
                                                                            GMenu* submenu)
{
	GList* file_list = NULL;
	GList* folder_list = NULL;
	GFileEnumerator* enumerator = NULL;
	GFileQueryInfoFlags flags = 0U;
	gboolean has_nonempty_items = FALSE;
	GList* _tmp20_;
	GList* _tmp32_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (template_folder != NULL, FALSE);
	g_return_val_if_fail (submenu != NULL, FALSE);
	if (self->priv->total_item_count >= ((guint) FILES_ABSTRACT_DIRECTORY_VIEW_MAX_TEMPLATES)) {
		result = FALSE;
		return result;
	}
	file_list = NULL;
	folder_list = NULL;
	flags = G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS;
	{
		GFileEnumerator* _tmp0_ = NULL;
		GFileEnumerator* _tmp1_;
		GFileEnumerator* _tmp2_;
		GFile* location = NULL;
		GFileInfo* info = NULL;
		GFileEnumerator* _tmp3_;
		GFileInfo* _tmp4_;
		_tmp1_ = g_file_enumerate_children (template_folder, "standard::*", flags, NULL, &_inner_error0_);
		_tmp0_ = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (enumerator);
		enumerator = _tmp2_;
		_tmp3_ = enumerator;
		_tmp4_ = g_file_enumerator_next_file (_tmp3_, NULL, &_inner_error0_);
		info = _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (location);
			_g_object_unref0 (_tmp0_);
			goto __catch0_g_error;
		}
		while (TRUE) {
			GFileInfo* _tmp5_;
			GFileInfo* _tmp6_;
			GFileInfo* _tmp15_ = NULL;
			GFileEnumerator* _tmp16_;
			GFileInfo* _tmp17_;
			GFileInfo* _tmp18_;
			_tmp5_ = info;
			if (!(_tmp5_ != NULL)) {
				break;
			}
			_tmp6_ = info;
			if (!g_file_info_get_attribute_boolean (_tmp6_, G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP)) {
				GFileInfo* _tmp7_;
				const gchar* _tmp8_;
				GFile* _tmp9_;
				GFileInfo* _tmp10_;
				_tmp7_ = info;
				_tmp8_ = g_file_info_get_name (_tmp7_);
				_tmp9_ = g_file_get_child (template_folder, _tmp8_);
				_g_object_unref0 (location);
				location = _tmp9_;
				_tmp10_ = info;
				if (g_file_info_get_file_type (_tmp10_) == G_FILE_TYPE_DIRECTORY) {
					GFile* _tmp11_;
					GFile* _tmp12_;
					_tmp11_ = location;
					_tmp12_ = _g_object_ref0 (_tmp11_);
					folder_list = g_list_prepend (folder_list, _tmp12_);
				} else {
					GFile* _tmp13_;
					GFile* _tmp14_;
					_tmp13_ = location;
					_tmp14_ = _g_object_ref0 (_tmp13_);
					file_list = g_list_prepend (file_list, _tmp14_);
				}
			}
			_tmp16_ = enumerator;
			_tmp17_ = g_file_enumerator_next_file (_tmp16_, NULL, &_inner_error0_);
			_tmp15_ = _tmp17_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (info);
				_g_object_unref0 (location);
				_g_object_unref0 (_tmp0_);
				goto __catch0_g_error;
			}
			_tmp18_ = _tmp15_;
			_tmp15_ = NULL;
			_g_object_unref0 (info);
			info = _tmp18_;
			_g_object_unref0 (_tmp15_);
		}
		_g_object_unref0 (info);
		_g_object_unref0 (location);
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		result = FALSE;
		_g_object_unref0 (enumerator);
		(folder_list == NULL) ? NULL : (folder_list = (_g_list_free__g_object_unref0_ (folder_list), NULL));
		(file_list == NULL) ? NULL : (file_list = (_g_list_free__g_object_unref0_ (file_list), NULL));
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp19_ = FALSE;
		_g_object_unref0 (enumerator);
		(folder_list == NULL) ? NULL : (folder_list = (_g_list_free__g_object_unref0_ (folder_list), NULL));
		(file_list == NULL) ? NULL : (file_list = (_g_list_free__g_object_unref0_ (file_list), NULL));
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp19_;
	}
	has_nonempty_items = FALSE;
	_tmp20_ = folder_list;
	if (g_list_length (_tmp20_) > ((guint) 0)) {
		GList* _tmp21_;
		folder_list = g_list_sort (folder_list, ____lambda86__gcompare_func);
		_tmp21_ = folder_list;
		{
			GList* folder_collection = NULL;
			GList* folder_it = NULL;
			folder_collection = _tmp21_;
			for (folder_it = folder_collection; folder_it != NULL; folder_it = folder_it->next) {
				GFile* _tmp22_;
				GFile* folder = NULL;
				_tmp22_ = _g_object_ref0 ((GFile*) folder_it->data);
				folder = _tmp22_;
				{
					GMenu* folder_menu = NULL;
					GMenu* _tmp23_;
					guint _tmp24_;
					GFile* _tmp25_;
					GMenu* _tmp26_;
					_tmp23_ = g_menu_new ();
					folder_menu = _tmp23_;
					_tmp24_ = self->priv->total_item_count;
					self->priv->total_item_count = _tmp24_ + 1;
					_tmp25_ = folder;
					_tmp26_ = folder_menu;
					if (files_abstract_directory_view_new_sub_menu_item_load_templates_from_folder (self, _tmp25_, _tmp26_)) {
						GFile* _tmp27_;
						gchar* _tmp28_;
						gchar* _tmp29_;
						GMenu* _tmp30_;
						has_nonempty_items = TRUE;
						_tmp27_ = folder;
						_tmp28_ = g_file_get_basename (_tmp27_);
						_tmp29_ = _tmp28_;
						_tmp30_ = folder_menu;
						g_menu_append_submenu (submenu, _tmp29_, (GMenuModel*) _tmp30_);
						_g_free0 (_tmp29_);
					} else {
						guint _tmp31_;
						_tmp31_ = self->priv->total_item_count;
						self->priv->total_item_count = _tmp31_ - 1;
					}
					if (self->priv->total_item_count > ((guint) FILES_ABSTRACT_DIRECTORY_VIEW_MAX_TEMPLATES)) {
						_g_object_unref0 (folder_menu);
						_g_object_unref0 (folder);
						break;
					}
					_g_object_unref0 (folder_menu);
					_g_object_unref0 (folder);
				}
			}
		}
	}
	_tmp32_ = file_list;
	if (g_list_length (_tmp32_) > ((guint) 0)) {
		GList* _tmp33_;
		file_list = g_list_sort (file_list, ____lambda87__gcompare_func);
		_tmp33_ = file_list;
		{
			GList* file_collection = NULL;
			GList* file_it = NULL;
			file_collection = _tmp33_;
			for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
				GFile* _tmp34_;
				GFile* file = NULL;
				_tmp34_ = _g_object_ref0 ((GFile*) file_it->data);
				file = _tmp34_;
				{
					guint _tmp35_;
					GMenuItem* template_menuitem = NULL;
					GFile* _tmp36_;
					gchar* _tmp37_;
					gchar* _tmp38_;
					GFile* _tmp39_;
					gchar* _tmp40_;
					gchar* _tmp41_;
					GVariant* _tmp42_;
					GVariant* _tmp43_;
					gchar* _tmp44_;
					gchar* _tmp45_;
					GMenuItem* _tmp46_;
					GMenuItem* _tmp47_;
					GMenuItem* _tmp48_;
					has_nonempty_items = TRUE;
					_tmp35_ = self->priv->total_item_count;
					self->priv->total_item_count = _tmp35_ + 1;
					if (self->priv->total_item_count > ((guint) FILES_ABSTRACT_DIRECTORY_VIEW_MAX_TEMPLATES)) {
						_g_object_unref0 (file);
						break;
					}
					_tmp36_ = file;
					_tmp37_ = g_file_get_basename (_tmp36_);
					_tmp38_ = _tmp37_;
					_tmp39_ = file;
					_tmp40_ = g_file_get_path (_tmp39_);
					_tmp41_ = _tmp40_;
					_tmp42_ = g_variant_new_string (_tmp41_);
					g_variant_ref_sink (_tmp42_);
					_tmp43_ = _tmp42_;
					_tmp44_ = g_action_print_detailed_name ("background.create-from", _tmp43_);
					_tmp45_ = _tmp44_;
					_tmp46_ = g_menu_item_new (_tmp38_, _tmp45_);
					_tmp47_ = _tmp46_;
					_g_free0 (_tmp45_);
					_g_variant_unref0 (_tmp43_);
					_g_free0 (_tmp41_);
					_g_free0 (_tmp38_);
					template_menuitem = _tmp47_;
					_tmp48_ = template_menuitem;
					g_menu_append_item (submenu, _tmp48_);
					_g_object_unref0 (template_menuitem);
					_g_object_unref0 (file);
				}
			}
		}
	}
	result = has_nonempty_items;
	_g_object_unref0 (enumerator);
	(folder_list == NULL) ? NULL : (folder_list = (_g_list_free__g_object_unref0_ (folder_list), NULL));
	(file_list == NULL) ? NULL : (file_list = (_g_list_free__g_object_unref0_ (file_list), NULL));
	return result;
}

static FilesAbstractDirectoryViewNewSubMenuItem*
files_abstract_directory_view_new_sub_menu_item_construct (GType object_type)
{
	FilesAbstractDirectoryViewNewSubMenuItem * self = NULL;
	self = (FilesAbstractDirectoryViewNewSubMenuItem*) g_object_new (object_type, NULL);
	return self;
}

static FilesAbstractDirectoryViewNewSubMenuItem*
files_abstract_directory_view_new_sub_menu_item_new (void)
{
	return files_abstract_directory_view_new_sub_menu_item_construct (FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_NEW_SUB_MENU_ITEM);
}

static GVariant*
_variant_new7 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GObject *
files_abstract_directory_view_new_sub_menu_item_constructor (GType type,
                                                             guint n_construct_properties,
                                                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FilesAbstractDirectoryViewNewSubMenuItem * self;
	GMenuItem* folder_menuitem = NULL;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GMenuItem* _tmp4_;
	GMenuItem* _tmp5_;
	GMenuItem* _tmp6_;
	GVariant* _tmp7_;
	GMenuItem* file_menuitem = NULL;
	GVariant* _tmp8_;
	GVariant* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	GMenuItem* _tmp12_;
	GMenuItem* _tmp13_;
	GMenu* menu_model = NULL;
	GMenu* _tmp14_;
	GMenu* _tmp15_;
	GMenuItem* _tmp16_;
	GMenu* _tmp17_;
	GMenuItem* _tmp18_;
	const gchar* template_path = NULL;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	GMenu* _tmp29_;
	GtkMenu* _tmp30_;
	GtkMenu* _tmp31_;
	parent_class = G_OBJECT_CLASS (files_abstract_directory_view_new_sub_menu_item_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_NEW_SUB_MENU_ITEM, FilesAbstractDirectoryViewNewSubMenuItem);
	_tmp0_ = g_variant_new_string ("FOLDER");
	g_variant_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_action_print_detailed_name ("background.new", _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_menu_item_new (_ ("Folder"), _tmp3_);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	_g_variant_unref0 (_tmp1_);
	folder_menuitem = _tmp5_;
	_tmp6_ = folder_menuitem;
	_tmp7_ = _variant_new7 ("<Ctrl><Shift>n");
	g_menu_item_set_attribute_value (_tmp6_, "accel", _tmp7_);
	_g_variant_unref0 (_tmp7_);
	_tmp8_ = g_variant_new_string ("FILE");
	g_variant_ref_sink (_tmp8_);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_action_print_detailed_name ("background.new", _tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_menu_item_new (_ ("Empty File"), _tmp11_);
	_tmp13_ = _tmp12_;
	_g_free0 (_tmp11_);
	_g_variant_unref0 (_tmp9_);
	file_menuitem = _tmp13_;
	_tmp14_ = g_menu_new ();
	menu_model = _tmp14_;
	_tmp15_ = menu_model;
	_tmp16_ = folder_menuitem;
	g_menu_append_item (_tmp15_, _tmp16_);
	_tmp17_ = menu_model;
	_tmp18_ = file_menuitem;
	g_menu_append_item (_tmp17_, _tmp18_);
	_tmp19_ = g_get_user_special_dir (G_USER_DIRECTORY_TEMPLATES);
	template_path = _tmp19_;
	_tmp20_ = template_path;
	if (_tmp20_ != NULL) {
		GMenu* template_submenu = NULL;
		GMenu* _tmp21_;
		const gchar* _tmp22_;
		GFile* _tmp23_;
		GFile* _tmp24_;
		GMenu* _tmp25_;
		_tmp21_ = g_menu_new ();
		template_submenu = _tmp21_;
		_tmp22_ = template_path;
		_tmp23_ = g_file_new_for_path (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = template_submenu;
		files_abstract_directory_view_new_sub_menu_item_load_templates_from_folder (self, _tmp24_, _tmp25_);
		_g_object_unref0 (_tmp24_);
		if (self->priv->total_item_count > ((guint) 0)) {
			GMenu* _tmp26_;
			GMenu* _tmp27_;
			_tmp26_ = menu_model;
			_tmp27_ = template_submenu;
			g_menu_append_submenu (_tmp26_, _ ("Template"), (GMenuModel*) _tmp27_);
			if (self->priv->total_item_count > ((guint) FILES_ABSTRACT_DIRECTORY_VIEW_MAX_TEMPLATES)) {
				GMenu* _tmp28_;
				_tmp28_ = template_submenu;
				g_menu_append (_tmp28_, _ ("…too many templates"), NULL);
			}
		}
		_g_object_unref0 (template_submenu);
	}
	_tmp29_ = menu_model;
	_tmp30_ = (GtkMenu*) gtk_menu_new_from_model ((GMenuModel*) _tmp29_);
	g_object_ref_sink (_tmp30_);
	_tmp31_ = _tmp30_;
	gtk_menu_item_set_submenu ((GtkMenuItem*) self, _tmp31_);
	_g_object_unref0 (_tmp31_);
	gtk_menu_item_set_label ((GtkMenuItem*) self, _ ("New"));
	_g_object_unref0 (menu_model);
	_g_object_unref0 (file_menuitem);
	_g_object_unref0 (folder_menuitem);
	return obj;
}

static void
files_abstract_directory_view_new_sub_menu_item_class_init (FilesAbstractDirectoryViewNewSubMenuItemClass * klass,
                                                            gpointer klass_data)
{
	files_abstract_directory_view_new_sub_menu_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FilesAbstractDirectoryViewNewSubMenuItem_private_offset);
	G_OBJECT_CLASS (klass)->constructor = files_abstract_directory_view_new_sub_menu_item_constructor;
	G_OBJECT_CLASS (klass)->finalize = files_abstract_directory_view_new_sub_menu_item_finalize;
}

static void
files_abstract_directory_view_new_sub_menu_item_instance_init (FilesAbstractDirectoryViewNewSubMenuItem * self,
                                                               gpointer klass)
{
	self->priv = files_abstract_directory_view_new_sub_menu_item_get_instance_private (self);
	self->priv->total_item_count = (guint) 0;
}

static void
files_abstract_directory_view_new_sub_menu_item_finalize (GObject * obj)
{
	FilesAbstractDirectoryViewNewSubMenuItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FILES_ABSTRACT_DIRECTORY_VIEW_TYPE_NEW_SUB_MENU_ITEM, FilesAbstractDirectoryViewNewSubMenuItem);
	G_OBJECT_CLASS (files_abstract_directory_view_new_sub_menu_item_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
files_abstract_directory_view_new_sub_menu_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FilesAbstractDirectoryViewNewSubMenuItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) files_abstract_directory_view_new_sub_menu_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FilesAbstractDirectoryViewNewSubMenuItem), 0, (GInstanceInitFunc) files_abstract_directory_view_new_sub_menu_item_instance_init, NULL };
	GType files_abstract_directory_view_new_sub_menu_item_type_id;
	files_abstract_directory_view_new_sub_menu_item_type_id = g_type_register_static (gtk_menu_item_get_type (), "FilesAbstractDirectoryViewNewSubMenuItem", &g_define_type_info, 0);
	FilesAbstractDirectoryViewNewSubMenuItem_private_offset = g_type_add_instance_private (files_abstract_directory_view_new_sub_menu_item_type_id, sizeof (FilesAbstractDirectoryViewNewSubMenuItemPrivate));
	return files_abstract_directory_view_new_sub_menu_item_type_id;
}

static GType
files_abstract_directory_view_new_sub_menu_item_get_type (void)
{
	static volatile gsize files_abstract_directory_view_new_sub_menu_item_type_id__once = 0;
	if (g_once_init_enter (&files_abstract_directory_view_new_sub_menu_item_type_id__once)) {
		GType files_abstract_directory_view_new_sub_menu_item_type_id;
		files_abstract_directory_view_new_sub_menu_item_type_id = files_abstract_directory_view_new_sub_menu_item_get_type_once ();
		g_once_init_leave (&files_abstract_directory_view_new_sub_menu_item_type_id__once, files_abstract_directory_view_new_sub_menu_item_type_id);
	}
	return files_abstract_directory_view_new_sub_menu_item_type_id__once;
}

static void
files_abstract_directory_view_class_init (FilesAbstractDirectoryViewClass * klass,
                                          gpointer klass_data)
{
	FilesDndHandler* _tmp0_;
	GSettings* _tmp1_;
	files_abstract_directory_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FilesAbstractDirectoryView_private_offset);
	((FilesAbstractDirectoryViewClass *) klass)->on_row_deleted = (void (*) (FilesAbstractDirectoryView*, GtkTreePath*)) files_abstract_directory_view_real_on_row_deleted;
	((FilesAbstractDirectoryViewClass *) klass)->on_view_key_press_event = (gboolean (*) (FilesAbstractDirectoryView*, guint, guint, GdkModifierType)) files_abstract_directory_view_real_on_view_key_press_event;
	((FilesAbstractDirectoryViewClass *) klass)->on_scroll_event = (void (*) (FilesAbstractDirectoryView*, gdouble, gdouble)) files_abstract_directory_view_real_on_scroll_event;
	((FilesAbstractDirectoryViewClass *) klass)->handle_primary_button_click = (gboolean (*) (FilesAbstractDirectoryView*, guint, GdkModifierType, GtkTreePath*)) files_abstract_directory_view_real_handle_primary_button_click;
	((FilesAbstractDirectoryViewClass *) klass)->on_view_button_press_event = (void (*) (FilesAbstractDirectoryView*, gint, gdouble, gdouble)) files_abstract_directory_view_real_on_view_button_press_event;
	((FilesAbstractDirectoryViewClass *) klass)->on_view_button_release_event = (void (*) (FilesAbstractDirectoryView*, gint, gdouble, gdouble)) files_abstract_directory_view_real_on_view_button_release_event;
	((FilesAbstractDirectoryViewClass *) klass)->change_zoom_level = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_change_zoom_level;
	((FilesAbstractDirectoryViewClass *) klass)->expand_collapse = (gboolean (*) (FilesAbstractDirectoryView*, GtkTreePath*)) files_abstract_directory_view_real_expand_collapse;
	((FilesAbstractDirectoryViewClass *) klass)->handle_default_button_click = (gboolean (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_handle_default_button_click;
	((FilesAbstractDirectoryViewClass *) klass)->get_next_visible_iter = (gboolean (*) (FilesAbstractDirectoryView*, GtkTreeIter*, gboolean)) files_abstract_directory_view_real_get_next_visible_iter;
	((FilesAbstractDirectoryViewClass *) klass)->cancel = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_cancel;
	((FilesAbstractDirectoryViewClass *) klass)->highlight_path = (void (*) (FilesAbstractDirectoryView*, GtkTreePath*)) files_abstract_directory_view_real_highlight_path;
	((FilesAbstractDirectoryViewClass *) klass)->up = (GtkTreePath* (*) (FilesAbstractDirectoryView*, GtkTreePath*)) files_abstract_directory_view_real_up;
	((FilesAbstractDirectoryViewClass *) klass)->down = (GtkTreePath* (*) (FilesAbstractDirectoryView*, GtkTreePath*)) files_abstract_directory_view_real_down;
	((FilesAbstractDirectoryViewClass *) klass)->get_view_settings = (GSettings* (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_get_view_settings;
	((FilesAbstractDirectoryViewClass *) klass)->set_up_zoom_level = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_set_up_zoom_level;
	((FilesAbstractDirectoryViewClass *) klass)->view_has_focus = (gboolean (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_view_has_focus;
	((FilesAbstractDirectoryViewClass *) klass)->scroll_to_cell = (void (*) (FilesAbstractDirectoryView*, GtkTreePath*, gboolean)) files_abstract_directory_view_real_scroll_to_cell;
	((FilesAbstractDirectoryViewClass *) klass)->get_selected_paths = (GList* (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_get_selected_paths;
	((FilesAbstractDirectoryViewClass *) klass)->get_path_at_pos = (GtkTreePath* (*) (FilesAbstractDirectoryView*, gint, gint)) files_abstract_directory_view_real_get_path_at_pos;
	((FilesAbstractDirectoryViewClass *) klass)->get_path_at_cursor = (GtkTreePath* (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_get_path_at_cursor;
	((FilesAbstractDirectoryViewClass *) klass)->tree_select_all = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_tree_select_all;
	((FilesAbstractDirectoryViewClass *) klass)->tree_unselect_all = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_tree_unselect_all;
	((FilesAbstractDirectoryViewClass *) klass)->tree_unselect_others = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_tree_unselect_others;
	((FilesAbstractDirectoryViewClass *) klass)->select_path = (void (*) (FilesAbstractDirectoryView*, GtkTreePath*, gboolean)) files_abstract_directory_view_real_select_path;
	((FilesAbstractDirectoryViewClass *) klass)->unselect_path = (void (*) (FilesAbstractDirectoryView*, GtkTreePath*)) files_abstract_directory_view_real_unselect_path;
	((FilesAbstractDirectoryViewClass *) klass)->path_is_selected = (gboolean (*) (FilesAbstractDirectoryView*, GtkTreePath*)) files_abstract_directory_view_real_path_is_selected;
	((FilesAbstractDirectoryViewClass *) klass)->get_visible_range = (gboolean (*) (FilesAbstractDirectoryView*, GtkTreePath**, GtkTreePath**)) files_abstract_directory_view_real_get_visible_range;
	((FilesAbstractDirectoryViewClass *) klass)->set_cursor = (void (*) (FilesAbstractDirectoryView*, GtkTreePath*, gboolean, gboolean, gboolean)) files_abstract_directory_view_real_set_cursor;
	((FilesAbstractDirectoryViewClass *) klass)->move_cursor = (gboolean (*) (FilesAbstractDirectoryView*, guint, gboolean, gboolean)) files_abstract_directory_view_real_move_cursor;
	((FilesAbstractDirectoryViewClass *) klass)->will_handle_button_press = (gboolean (*) (FilesAbstractDirectoryView*, gboolean, gboolean, gboolean)) files_abstract_directory_view_real_will_handle_button_press;
	((FilesAbstractDirectoryViewClass *) klass)->handle_multi_select = (gboolean (*) (FilesAbstractDirectoryView*, GtkTreePath*)) files_abstract_directory_view_real_handle_multi_select;
	((FilesAbstractDirectoryViewClass *) klass)->create_view = (GtkWidget* (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_create_view;
	((FilesAbstractDirectoryViewClass *) klass)->get_event_position_info = (guint (*) (FilesAbstractDirectoryView*, gdouble, gdouble, GtkTreePath**, gboolean)) files_abstract_directory_view_real_get_event_position_info;
	((FilesAbstractDirectoryViewClass *) klass)->scroll_to_path = (void (*) (FilesAbstractDirectoryView*, GtkTreePath*, gboolean)) files_abstract_directory_view_real_scroll_to_path;
	((FilesAbstractDirectoryViewClass *) klass)->set_cursor_on_cell = (void (*) (FilesAbstractDirectoryView*, GtkTreePath*, GtkCellRenderer*, gboolean, gboolean)) files_abstract_directory_view_real_set_cursor_on_cell;
	((FilesAbstractDirectoryViewClass *) klass)->freeze_tree = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_freeze_tree;
	((FilesAbstractDirectoryViewClass *) klass)->thaw_tree = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_thaw_tree;
	((FilesAbstractDirectoryViewClass *) klass)->freeze_child_notify = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_freeze_child_notify;
	((FilesAbstractDirectoryViewClass *) klass)->thaw_child_notify = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_thaw_child_notify;
	((FilesAbstractDirectoryViewClass *) klass)->connect_tree_signals = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_connect_tree_signals;
	((FilesAbstractDirectoryViewClass *) klass)->disconnect_tree_signals = (void (*) (FilesAbstractDirectoryView*)) files_abstract_directory_view_real_disconnect_tree_signals;
	G_OBJECT_CLASS (klass)->get_property = _vala_files_abstract_directory_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_files_abstract_directory_view_set_property;
	G_OBJECT_CLASS (klass)->finalize = files_abstract_directory_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_ABSTRACT_DIRECTORY_VIEW_ZOOM_LEVEL_PROPERTY, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_ZOOM_LEVEL_PROPERTY] = g_param_spec_enum ("zoom-level", "zoom-level", "zoom-level", FILES_TYPE_ZOOM_LEVEL, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_ABSTRACT_DIRECTORY_VIEW_ICON_SIZE_PROPERTY, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_ICON_SIZE_PROPERTY] = g_param_spec_int ("icon-size", "icon-size", "icon-size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_ABSTRACT_DIRECTORY_VIEW_SINGLECLICK_SELECT_PROPERTY, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_SINGLECLICK_SELECT_PROPERTY] = g_param_spec_boolean ("singleclick-select", "singleclick-select", "singleclick-select", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_ABSTRACT_DIRECTORY_VIEW_RENAMING_PROPERTY, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_RENAMING_PROPERTY] = g_param_spec_boolean ("renaming", "renaming", "renaming", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_ABSTRACT_DIRECTORY_VIEW_IS_FROZEN_PROPERTY, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_IS_FROZEN_PROPERTY] = g_param_spec_boolean ("is-frozen", "is-frozen", "is-frozen", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_ABSTRACT_DIRECTORY_VIEW_IN_RECENT_PROPERTY, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_IN_RECENT_PROPERTY] = g_param_spec_boolean ("in-recent", "in-recent", "in-recent", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_ABSTRACT_DIRECTORY_VIEW_TREE_FROZEN_PROPERTY, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_TREE_FROZEN_PROPERTY] = g_param_spec_boolean ("tree-frozen", "tree-frozen", "tree-frozen", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_ABSTRACT_DIRECTORY_VIEW_WINDOW_PROPERTY, files_abstract_directory_view_properties[FILES_ABSTRACT_DIRECTORY_VIEW_WINDOW_PROPERTY] = g_param_spec_object ("window", "window", "window", FILES_VIEW_TYPE_WINDOW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	files_abstract_directory_view_signals[FILES_ABSTRACT_DIRECTORY_VIEW_PATH_CHANGE_REQUEST_SIGNAL] = g_signal_new ("path-change-request", FILES_TYPE_ABSTRACT_DIRECTORY_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_ENUM_BOOLEAN, G_TYPE_NONE, 3, g_file_get_type (), FILES_TYPE_OPEN_FLAG, G_TYPE_BOOLEAN);
	files_abstract_directory_view_signals[FILES_ABSTRACT_DIRECTORY_VIEW_SELECTION_CHANGED_SIGNAL] = g_signal_new ("selection-changed", FILES_TYPE_ABSTRACT_DIRECTORY_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
	_tmp0_ = files_dnd_handler_new ();
	files_abstract_directory_view_dnd_handler = _tmp0_;
	_tmp1_ = g_settings_new ("io.elementary.files.preferences");
	_g_object_unref0 (files_abstract_directory_view_app_settings);
	files_abstract_directory_view_app_settings = _tmp1_;
}

static void
files_abstract_directory_view_instance_init (FilesAbstractDirectoryView * self,
                                             gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = files_abstract_directory_view_get_instance_private (self);
	self->priv->_zoom_level = FILES_ZOOM_LEVEL_NORMAL;
	self->minimum_zoom = FILES_ZOOM_LEVEL_SMALLEST;
	self->maximum_zoom = FILES_ZOOM_LEVEL_LARGEST;
	self->priv->drag_x = (gdouble) 0;
	self->priv->drag_y = (gdouble) 0;
	self->source_drag_file_list = NULL;
	self->current_target_type = GDK_NONE;
	self->priv->drag_scroll_timer_id = (guint) 0;
	self->priv->drag_enter_timer_id = (guint) 0;
	self->priv->destination_data_ready = FALSE;
	self->priv->drop_occurred = FALSE;
	self->priv->drop_target_file = NULL;
	self->priv->destination_drop_file_list = NULL;
	self->priv->current_suggested_action = GDK_ACTION_DEFAULT;
	self->priv->current_actions = GDK_ACTION_DEFAULT;
	self->dnd_disabled = FALSE;
	self->priv->button_press_disabled = FALSE;
	self->priv->thumbnail_request = -1;
	self->priv->thumbnail_source_id = (guint) 0;
	self->priv->freeze_source_id = (guint) 0;
	self->priv->thumbnailer = NULL;
	self->priv->add_remove_file_timeout_id = (guint) 0;
	self->priv->signal_free_space_change = FALSE;
	self->name_renderer = NULL;
	_tmp0_ = g_strdup ("");
	self->original_name = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->proposed_name = _tmp1_;
	self->priv->total_delta_y = 0.0;
	self->right_margin_unselects_all = FALSE;
	self->on_directory = FALSE;
	self->one_or_less = TRUE;
	self->should_activate = FALSE;
	self->should_deselect = FALSE;
	self->should_thumbnail = TRUE;
	self->should_select = FALSE;
	self->click_path = NULL;
	self->click_zone = (guint) FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_ICON;
	self->previous_click_zone = (guint) FILES_ABSTRACT_DIRECTORY_VIEW_CLICK_ZONE_ICON;
	self->selected_files = NULL;
	self->priv->selected_files_invalid = TRUE;
	self->priv->hover_path = NULL;
	self->priv->_renaming = FALSE;
	self->priv->_is_frozen = FALSE;
	self->priv->_in_recent = FALSE;
	self->priv->_tree_frozen = FALSE;
	self->priv->in_trash = FALSE;
	self->priv->in_network_root = FALSE;
	self->is_writable = FALSE;
	self->priv->all_selected = FALSE;
	self->priv->set_cursor_timeout_id = (guint) 0;
	self->priv->select_source_handler = (gulong) 0;
	self->priv->draw_timeout_id = (guint) 0;
}

static void
files_abstract_directory_view_finalize (GObject * obj)
{
	FilesAbstractDirectoryView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FILES_TYPE_ABSTRACT_DIRECTORY_VIEW, FilesAbstractDirectoryView);
	g_debug ("AbstractDirectoryView.vala:417: ADV destruct");
	_g_object_unref0 (self->priv->common_actions);
	_g_object_unref0 (self->priv->selection_actions);
	_g_object_unref0 (self->priv->background_actions);
	(self->source_drag_file_list == NULL) ? NULL : (self->source_drag_file_list = (_g_list_free__g_object_unref0_ (self->source_drag_file_list), NULL));
	_g_object_unref0 (self->priv->drop_target_file);
	(self->priv->destination_drop_file_list == NULL) ? NULL : (self->priv->destination_drop_file_list = (_g_list_free__g_object_unref0_ (self->priv->destination_drop_file_list), NULL));
	_g_object_unref0 (self->priv->thumbnailer);
	_g_object_unref0 (self->name_renderer);
	_g_free0 (self->original_name);
	_g_free0 (self->proposed_name);
	__vala_GtkTreePath_free0 (self->priv->deleted_path);
	__vala_GtkTreePath_free0 (self->click_path);
	_g_object_unref0 (self->priv->editable_cursor);
	_g_object_unref0 (self->priv->activatable_cursor);
	_g_object_unref0 (self->priv->selectable_cursor);
	(self->priv->open_with_apps == NULL) ? NULL : (self->priv->open_with_apps = (_g_list_free__g_object_unref0_ (self->priv->open_with_apps), NULL));
	(self->selected_files == NULL) ? NULL : (self->selected_files = (_g_list_free__g_object_unref0_ (self->selected_files), NULL));
	_g_object_unref0 (self->priv->default_app);
	__vala_GtkTreePath_free0 (self->priv->hover_path);
	_g_object_unref0 (self->priv->view);
	_g_object_unref0 (self->scrolled_window);
	_g_object_unref0 (self->priv->empty_label);
	_g_object_unref0 (self->priv->overlay);
	_g_object_unref0 (self->model);
	_g_object_unref0 (self->icon_renderer);
	_g_object_unref0 (self->key_controller);
	_g_object_unref0 (self->button_controller);
	_g_object_unref0 (self->scroll_controller);
	_g_object_unref0 (self->motion_controller);
	G_OBJECT_CLASS (files_abstract_directory_view_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
files_abstract_directory_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FilesAbstractDirectoryViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) files_abstract_directory_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FilesAbstractDirectoryView), 0, (GInstanceInitFunc) files_abstract_directory_view_instance_init, NULL };
	GType files_abstract_directory_view_type_id;
	files_abstract_directory_view_type_id = g_type_register_static (gtk_bin_get_type (), "FilesAbstractDirectoryView", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	FilesAbstractDirectoryView_private_offset = g_type_add_instance_private (files_abstract_directory_view_type_id, sizeof (FilesAbstractDirectoryViewPrivate));
	return files_abstract_directory_view_type_id;
}

GType
files_abstract_directory_view_get_type (void)
{
	static volatile gsize files_abstract_directory_view_type_id__once = 0;
	if (g_once_init_enter (&files_abstract_directory_view_type_id__once)) {
		GType files_abstract_directory_view_type_id;
		files_abstract_directory_view_type_id = files_abstract_directory_view_get_type_once ();
		g_once_init_leave (&files_abstract_directory_view_type_id__once, files_abstract_directory_view_type_id);
	}
	return files_abstract_directory_view_type_id__once;
}

static void
_vala_files_abstract_directory_view_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	FilesAbstractDirectoryView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FILES_TYPE_ABSTRACT_DIRECTORY_VIEW, FilesAbstractDirectoryView);
	switch (property_id) {
		case FILES_ABSTRACT_DIRECTORY_VIEW_ZOOM_LEVEL_PROPERTY:
		g_value_set_enum (value, files_abstract_directory_view_get_zoom_level (self));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_ICON_SIZE_PROPERTY:
		g_value_set_int (value, files_abstract_directory_view_get_icon_size (self));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_SINGLECLICK_SELECT_PROPERTY:
		g_value_set_boolean (value, files_abstract_directory_view_get_singleclick_select (self));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_RENAMING_PROPERTY:
		g_value_set_boolean (value, files_abstract_directory_view_get_renaming (self));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_IS_FROZEN_PROPERTY:
		g_value_set_boolean (value, files_abstract_directory_view_get_is_frozen (self));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_IN_RECENT_PROPERTY:
		g_value_set_boolean (value, files_abstract_directory_view_get_in_recent (self));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_TREE_FROZEN_PROPERTY:
		g_value_set_boolean (value, files_abstract_directory_view_get_tree_frozen (self));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_WINDOW_PROPERTY:
		g_value_set_object (value, files_abstract_directory_view_get_window (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_files_abstract_directory_view_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	FilesAbstractDirectoryView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FILES_TYPE_ABSTRACT_DIRECTORY_VIEW, FilesAbstractDirectoryView);
	switch (property_id) {
		case FILES_ABSTRACT_DIRECTORY_VIEW_ZOOM_LEVEL_PROPERTY:
		files_abstract_directory_view_set_zoom_level (self, g_value_get_enum (value));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_SINGLECLICK_SELECT_PROPERTY:
		files_abstract_directory_view_set_singleclick_select (self, g_value_get_boolean (value));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_RENAMING_PROPERTY:
		files_abstract_directory_view_set_renaming (self, g_value_get_boolean (value));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_IS_FROZEN_PROPERTY:
		files_abstract_directory_view_set_is_frozen (self, g_value_get_boolean (value));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_IN_RECENT_PROPERTY:
		files_abstract_directory_view_set_in_recent (self, g_value_get_boolean (value));
		break;
		case FILES_ABSTRACT_DIRECTORY_VIEW_TREE_FROZEN_PROPERTY:
		files_abstract_directory_view_set_tree_frozen (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

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

