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

/*
 * Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
 *
 * 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: Alain M. <alainmh23@gmail.com>
 */

#include <adwaita.h>
#include <glib-object.h>
#include "planify.h"
#include <gtk/gtk.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>
#include <float.h>
#include <math.h>

#define VIEWS_FILTER_PAGE_SIZE CONSTANTS_COMPLETED_PAGE_SIZE
#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 VIEWS_TYPE_FILTER (views_filter_get_type ())
#define VIEWS_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEWS_TYPE_FILTER, ViewsFilter))
#define VIEWS_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEWS_TYPE_FILTER, ViewsFilterClass))
#define VIEWS_IS_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEWS_TYPE_FILTER))
#define VIEWS_IS_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEWS_TYPE_FILTER))
#define VIEWS_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEWS_TYPE_FILTER, ViewsFilterClass))

typedef struct _ViewsFilter ViewsFilter;
typedef struct _ViewsFilterClass ViewsFilterClass;
typedef struct _ViewsFilterPrivate ViewsFilterPrivate;

#define LAYOUTS_TYPE_HEADER_BAR (layouts_header_bar_get_type ())
#define LAYOUTS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_HEADER_BAR, LayoutsHeaderBar))
#define LAYOUTS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_HEADER_BAR, LayoutsHeaderBarClass))
#define LAYOUTS_IS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_HEADER_BAR))
#define LAYOUTS_IS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_HEADER_BAR))
#define LAYOUTS_HEADER_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_HEADER_BAR, LayoutsHeaderBarClass))

typedef struct _LayoutsHeaderBar LayoutsHeaderBar;
typedef struct _LayoutsHeaderBarClass LayoutsHeaderBarClass;

#define WIDGETS_TYPE_MAGIC_BUTTON (widgets_magic_button_get_type ())
#define WIDGETS_MAGIC_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_MAGIC_BUTTON, WidgetsMagicButton))
#define WIDGETS_MAGIC_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_MAGIC_BUTTON, WidgetsMagicButtonClass))
#define WIDGETS_IS_MAGIC_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_MAGIC_BUTTON))
#define WIDGETS_IS_MAGIC_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_MAGIC_BUTTON))
#define WIDGETS_MAGIC_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_MAGIC_BUTTON, WidgetsMagicButtonClass))

typedef struct _WidgetsMagicButton WidgetsMagicButton;
typedef struct _WidgetsMagicButtonClass WidgetsMagicButtonClass;

#define LAYOUTS_TYPE_ITEM_BASE (layouts_item_base_get_type ())
#define LAYOUTS_ITEM_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBase))
#define LAYOUTS_ITEM_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBaseClass))
#define LAYOUTS_IS_ITEM_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_BASE))
#define LAYOUTS_IS_ITEM_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_BASE))
#define LAYOUTS_ITEM_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBaseClass))

typedef struct _LayoutsItemBase LayoutsItemBase;
typedef struct _LayoutsItemBaseClass LayoutsItemBaseClass;

#define LAYOUTS_TYPE_ITEM_ROW (layouts_item_row_get_type ())
#define LAYOUTS_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow))
#define LAYOUTS_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRowClass))
#define LAYOUTS_IS_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_ROW))
#define LAYOUTS_IS_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_ROW))
#define LAYOUTS_ITEM_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRowClass))

typedef struct _LayoutsItemRow LayoutsItemRow;
typedef struct _LayoutsItemRowClass LayoutsItemRowClass;
enum  {
	VIEWS_FILTER_0_PROPERTY,
	VIEWS_FILTER_FILTER_PROPERTY,
	VIEWS_FILTER_NUM_PROPERTIES
};
static GParamSpec* views_filter_properties[VIEWS_FILTER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define DIALOGS_TYPE_QUICK_ADD (dialogs_quick_add_get_type ())
#define DIALOGS_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAdd))
#define DIALOGS_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAddClass))
#define DIALOGS_IS_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_QUICK_ADD))
#define DIALOGS_IS_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_QUICK_ADD))
#define DIALOGS_QUICK_ADD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAddClass))

typedef struct _DialogsQuickAdd DialogsQuickAdd;
typedef struct _DialogsQuickAddClass DialogsQuickAddClass;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define TYPE_PLANIFY (planify_get_type ())
#define PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PLANIFY, Planify))
#define PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PLANIFY, PlanifyClass))
#define IS_PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PLANIFY))
#define IS_PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PLANIFY))
#define PLANIFY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PLANIFY, PlanifyClass))

typedef struct _Planify Planify;
typedef struct _PlanifyClass PlanifyClass;
typedef struct _PlanifyPrivate PlanifyPrivate;

#define TYPE_MAIN_WINDOW (main_window_get_type ())
#define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WINDOW, MainWindow))
#define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WINDOW, MainWindowClass))
#define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WINDOW))
#define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WINDOW))
#define MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WINDOW, MainWindowClass))

typedef struct _MainWindow MainWindow;
typedef struct _MainWindowClass MainWindowClass;
typedef struct _Block74Data Block74Data;
typedef struct _Block75Data Block75Data;
typedef struct _Block76Data Block76Data;
typedef struct _Block77Data Block77Data;

struct _ViewsFilter {
	AdwBin parent_instance;
	ViewsFilterPrivate * priv;
};

struct _ViewsFilterClass {
	AdwBinClass parent_class;
};

struct _ViewsFilterPrivate {
	ObjectsBaseObject* _filter;
	LayoutsHeaderBar* headerbar;
	GtkImage* title_icon;
	GtkLabel* title_label;
	GtkListBox* listbox;
	GtkStack* listbox_stack;
	WidgetsMagicButton* magic_button;
	GtkRevealer* view_setting_revealer;
	GtkButton* load_more_button;
	GtkRevealer* load_more_button_revealer;
	GeeHashMap* items;
	GeeHashMap* signal_map;
	GeeArrayList* items_list;
	gint page_index;
};

struct _Planify {
	AdwApplication parent_instance;
	PlanifyPrivate * priv;
	MainWindow* main_window;
};

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _Block74Data {
	int _ref_count_;
	ViewsFilter* self;
	GtkBox* header_box;
};

struct _Block75Data {
	int _ref_count_;
	Block74Data * _data74_;
	gulong handler_id;
};

struct _Block76Data {
	int _ref_count_;
	ViewsFilter* self;
	GeeArrayList* items_checked;
};

struct _Block77Data {
	int _ref_count_;
	ViewsFilter* self;
	GtkBox* title_box;
	GtkScrolledWindow* scrolled_window;
};

static gint ViewsFilter_private_offset;
static gpointer views_filter_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;

VALA_EXTERN GType views_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ViewsFilter, g_object_unref)
VALA_EXTERN GType layouts_header_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsHeaderBar, g_object_unref)
VALA_EXTERN GType widgets_magic_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsMagicButton, g_object_unref)
VALA_EXTERN GType layouts_item_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemBase, g_object_unref)
VALA_EXTERN GType layouts_item_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemRow, g_object_unref)
VALA_EXTERN ViewsFilter* views_filter_new (ObjectsBaseObject* filter);
VALA_EXTERN ViewsFilter* views_filter_construct (GType object_type,
                                     ObjectsBaseObject* filter);
VALA_EXTERN void views_filter_prepare_new_item (ViewsFilter* self,
                                    const gchar* content);
VALA_EXTERN GType dialogs_quick_add_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsQuickAdd, g_object_unref)
VALA_EXTERN DialogsQuickAdd* dialogs_quick_add_new (void);
VALA_EXTERN DialogsQuickAdd* dialogs_quick_add_construct (GType object_type);
VALA_EXTERN void dialogs_quick_add_set_project (DialogsQuickAdd* self,
                                    ObjectsProject* project);
VALA_EXTERN void dialogs_quick_add_update_content (DialogsQuickAdd* self,
                                       const gchar* content);
VALA_EXTERN ObjectsBaseObject* views_filter_get_filter (ViewsFilter* self);
VALA_EXTERN void dialogs_quick_add_set_priority (DialogsQuickAdd* self,
                                     gint priority);
VALA_EXTERN void dialogs_quick_add_set_due (DialogsQuickAdd* self,
                                GDateTime* date);
VALA_EXTERN void dialogs_quick_add_set_pinned (DialogsQuickAdd* self,
                                   gboolean pinned);
VALA_EXTERN GType planify_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Planify, g_object_unref)
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_unref)
static void views_filter_update_request (ViewsFilter* self);
static void views_filter_header_project_function (ViewsFilter* self,
                                           GtkListBoxRow* lbrow,
                                           GtkListBoxRow* lbbefore);
static void _views_filter_header_project_function_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                            GtkListBoxRow* before,
                                                                            gpointer self);
static void views_filter_header_completed_function (ViewsFilter* self,
                                             GtkListBoxRow* lbrow,
                                             GtkListBoxRow* lbbefore);
static void _views_filter_header_completed_function_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                              GtkListBoxRow* before,
                                                                              gpointer self);
static gint ____lambda878_ (ViewsFilter* self,
                     GtkListBoxRow* row1,
                     GtkListBoxRow* row2);
static gint views_filter_sort_completed_function (ViewsFilter* self,
                                           ObjectsItem* a,
                                           ObjectsItem* b);
VALA_EXTERN ObjectsItem* layouts_item_base_get_item (LayoutsItemBase* self);
static gint _____lambda878__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                             GtkListBoxRow* row2,
                                             gpointer self);
VALA_EXTERN void layouts_header_bar_set_title (LayoutsHeaderBar* self,
                                   const gchar* value);
static void views_filter_add_items (ViewsFilter* self);
VALA_EXTERN void layouts_item_base_clean_up (LayoutsItemBase* self);
static gint ___lambda879_ (ViewsFilter* self,
                    ObjectsItem* a,
                    ObjectsItem* b);
static gint ____lambda879__gcompare_data_func (gconstpointer a,
                                        gconstpointer b,
                                        gpointer self);
static gint ___lambda880_ (ViewsFilter* self,
                    ObjectsItem* a,
                    ObjectsItem* b);
static gint ____lambda880__gcompare_data_func (gconstpointer a,
                                        gconstpointer b,
                                        gpointer self);
static void views_filter_load_next_page (ViewsFilter* self);
static void views_filter_add_item (ViewsFilter* self,
                            ObjectsItem* item);
static void views_filter_update_load_more_button_label (ViewsFilter* self);
VALA_EXTERN LayoutsItemRow* layouts_item_row_new (ObjectsItem* item,
                                      gboolean is_project_view);
VALA_EXTERN LayoutsItemRow* layouts_item_row_construct (GType object_type,
                                            ObjectsItem* item,
                                            gboolean is_project_view);
VALA_EXTERN void layouts_item_row_disable_drag_and_drop (LayoutsItemRow* self);
static void views_filter_valid_add_item (ViewsFilter* self,
                                  ObjectsItem* item,
                                  gboolean insert);
static void views_filter_validate_placeholder (ViewsFilter* self);
static void views_filter_valid_delete_item (ViewsFilter* self,
                                     ObjectsItem* item);
VALA_EXTERN void layouts_item_base_hide_destroy (LayoutsItemBase* self);
static void views_filter_valid_update_item (ViewsFilter* self,
                                     ObjectsItem* item,
                                     const gchar* update_id);
VALA_EXTERN const gchar* layouts_item_base_get_update_id (LayoutsItemBase* self);
VALA_EXTERN void layouts_item_base_update_request (LayoutsItemBase* self);
static void views_filter_valid_checked_item (ViewsFilter* self,
                                      ObjectsItem* item,
                                      gboolean old_checked);
static GtkWidget* views_filter_get_header_box (ViewsFilter* self,
                                        const gchar* title);
VALA_EXTERN const gchar* layouts_item_row_get_project_id (LayoutsItemRow* self);
static gboolean views_filter_get_has_items (ViewsFilter* self);
static void views_filter_invalidate_listbox (ViewsFilter* self);
static Block74Data* block74_data_ref (Block74Data* _data74_);
static void block74_data_unref (void * _userdata_);
static Block75Data* block75_data_ref (Block75Data* _data75_);
static void block75_data_unref (void * _userdata_);
static void ___lambda876_ (Block75Data* _data75_,
                    gboolean active,
                    const gchar* focused_item_id);
static void ____lambda876__services_event_bus_dim_content (ServicesEventBus* _sender,
                                                    gboolean active,
                                                    const gchar* focused_item_id,
                                                    gpointer self);
static void ___lambda877_ (Block75Data* _data75_);
static void ____lambda877__gtk_widget_destroy (GtkWidget* _sender,
                                        gpointer self);
static GtkPopover* views_filter_build_view_setting_popover (ViewsFilter* self);
static void __lambda881_ (ViewsFilter* self);
static Block76Data* block76_data_ref (Block76Data* _data76_);
static void block76_data_unref (void * _userdata_);
static void __lambda882_ (Block76Data* _data76_,
                   const gchar* response);
static void ___lambda882__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                              const gchar* response,
                                              gpointer self);
static void ___lambda881__widgets_context_menu_menu_item_activate_item (WidgetsContextMenuMenuItem* _sender,
                                                                 gpointer self);
VALA_EXTERN void views_filter_clean_up (ViewsFilter* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void views_filter_set_filter (ViewsFilter* self,
                              ObjectsBaseObject* value);
static GObject * views_filter_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties);
static Block77Data* block77_data_ref (Block77Data* _data77_);
static void block77_data_unref (void * _userdata_);
VALA_EXTERN LayoutsHeaderBar* layouts_header_bar_new (void);
VALA_EXTERN LayoutsHeaderBar* layouts_header_bar_construct (GType object_type);
VALA_EXTERN void layouts_header_bar_pack_end (LayoutsHeaderBar* self,
                                  GtkWidget* widget);
VALA_EXTERN WidgetsMagicButton* widgets_magic_button_new (void);
VALA_EXTERN WidgetsMagicButton* widgets_magic_button_construct (GType object_type);
static gboolean _views_filter___lambda883_ (ViewsFilter* self);
static gboolean __views_filter___lambda883__gsource_func (gpointer self);
static void _views_filter_valid_add_item_services_store_item_added (ServicesStore* _sender,
                                                             ObjectsItem* item,
                                                             gboolean insert,
                                                             gpointer self);
static void _views_filter_valid_delete_item_services_store_item_deleted (ServicesStore* _sender,
                                                                  ObjectsItem* item,
                                                                  gpointer self);
static void _views_filter_valid_update_item_services_store_item_updated (ServicesStore* _sender,
                                                                  ObjectsItem* item,
                                                                  const gchar* update_id,
                                                                  gpointer self);
static void _views_filter_valid_checked_item_services_event_bus_checked_toggled (ServicesEventBus* _sender,
                                                                          ObjectsItem* item,
                                                                          gboolean old_checked,
                                                                          gpointer self);
static void _views_filter_valid_delete_item_services_store_item_archived (ServicesStore* _sender,
                                                                   ObjectsItem* item,
                                                                   gpointer self);
static void _views_filter___lambda884_ (ViewsFilter* self,
                                 ObjectsItem* item);
static void __views_filter___lambda884__services_store_item_unarchived (ServicesStore* _sender,
                                                                 ObjectsItem* item,
                                                                 gpointer self);
static void _views_filter___lambda885_ (ViewsFilter* self,
                                 ObjectsItem* item);
static void __views_filter___lambda885__services_event_bus_item_moved (ServicesEventBus* _sender,
                                                                ObjectsItem* item,
                                                                const gchar* old_project_id,
                                                                const gchar* old_section_id,
                                                                const gchar* old_parent_id,
                                                                gpointer self);
static void _views_filter___lambda886_ (ViewsFilter* self);
static void __views_filter___lambda886__widgets_magic_button_clicked (WidgetsMagicButton* _sender,
                                                               gpointer self);
static void _views_filter___lambda887_ (ViewsFilter* self);
static void __views_filter___lambda887__services_event_bus_theme_changed (ServicesEventBus* _sender,
                                                                   gpointer self);
static void _views_filter___lambda888_ (Block77Data* _data77_);
VALA_EXTERN void layouts_header_bar_revealer_title_box (LayoutsHeaderBar* self,
                                            gboolean reveal);
static void __views_filter___lambda888__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                               gpointer self);
static void _views_filter___lambda889_ (ViewsFilter* self);
static void __views_filter___lambda889__gtk_button_clicked (GtkButton* _sender,
                                                     gpointer self);
static void _views_filter___lambda890_ (Block77Data* _data77_,
                                 gboolean active,
                                 const gchar* focused_item_id);
static void __views_filter___lambda890__services_event_bus_dim_content (ServicesEventBus* _sender,
                                                                 gboolean active,
                                                                 const gchar* focused_item_id,
                                                                 gpointer self);
static void views_filter_finalize (GObject * obj);
static GType views_filter_get_type_once (void);
static void _vala_views_filter_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec);
static void _vala_views_filter_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 inline gpointer
views_filter_get_instance_private (ViewsFilter* self)
{
	return G_STRUCT_MEMBER_P (self, ViewsFilter_private_offset);
}

ViewsFilter*
views_filter_construct (GType object_type,
                        ObjectsBaseObject* filter)
{
	ViewsFilter * self = NULL;
	g_return_val_if_fail (filter != NULL, NULL);
	self = (ViewsFilter*) g_object_new (object_type, "filter", filter, NULL);
	return self;
}

ViewsFilter*
views_filter_new (ObjectsBaseObject* filter)
{
	return views_filter_construct (VIEWS_TYPE_FILTER, filter);
}

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

void
views_filter_prepare_new_item (ViewsFilter* self,
                               const gchar* content)
{
	ObjectsProject* inbox_project = NULL;
	ServicesStore* _tmp0_;
	ServicesSettings* _tmp1_;
	ServicesSettings* _tmp2_;
	GSettings* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ObjectsProject* _tmp6_;
	ObjectsProject* _tmp7_;
	DialogsQuickAdd* dialog = NULL;
	DialogsQuickAdd* _tmp8_;
	DialogsQuickAdd* _tmp9_;
	ObjectsProject* _tmp10_;
	DialogsQuickAdd* _tmp11_;
	ObjectsBaseObject* _tmp12_;
	DialogsQuickAdd* _tmp29_;
	Planify* _tmp30_;
	MainWindow* _tmp31_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (content != NULL);
	_tmp0_ = services_store_instance ();
	_tmp1_ = services_settings_get_default ();
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->settings;
	_tmp4_ = g_settings_get_string (_tmp3_, "local-inbox-project-id");
	_tmp5_ = _tmp4_;
	_tmp6_ = services_store_get_project (_tmp0_, _tmp5_);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	_g_object_unref0 (_tmp2_);
	inbox_project = _tmp7_;
	_tmp8_ = dialogs_quick_add_new ();
	g_object_ref_sink (_tmp8_);
	dialog = _tmp8_;
	_tmp9_ = dialog;
	_tmp10_ = inbox_project;
	dialogs_quick_add_set_project (_tmp9_, _tmp10_);
	_tmp11_ = dialog;
	dialogs_quick_add_update_content (_tmp11_, content);
	_tmp12_ = self->priv->_filter;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, OBJECTS_FILTERS_TYPE_PRIORITY)) {
		ObjectsFiltersPriority* priority = NULL;
		ObjectsBaseObject* _tmp13_;
		ObjectsFiltersPriority* _tmp14_;
		DialogsQuickAdd* _tmp15_;
		ObjectsFiltersPriority* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		_tmp13_ = self->priv->_filter;
		_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, OBJECTS_FILTERS_TYPE_PRIORITY, ObjectsFiltersPriority));
		priority = _tmp14_;
		_tmp15_ = dialog;
		_tmp16_ = priority;
		_tmp17_ = objects_filters_priority_get_priority (_tmp16_);
		_tmp18_ = _tmp17_;
		dialogs_quick_add_set_priority (_tmp15_, _tmp18_);
		_g_object_unref0 (priority);
	} else {
		ObjectsBaseObject* _tmp19_;
		_tmp19_ = self->priv->_filter;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, OBJECTS_FILTERS_TYPE_TOMORROW)) {
			DialogsQuickAdd* _tmp20_;
			GDateTime* _tmp21_;
			GDateTime* _tmp22_;
			GDateTime* _tmp23_;
			GDateTime* _tmp24_;
			GDateTime* _tmp25_;
			GDateTime* _tmp26_;
			_tmp20_ = dialog;
			_tmp21_ = g_date_time_new_now_local ();
			_tmp22_ = _tmp21_;
			_tmp23_ = g_date_time_add_days (_tmp22_, 1);
			_tmp24_ = _tmp23_;
			_tmp25_ = utils_datetime_get_date_only (_tmp24_);
			_tmp26_ = _tmp25_;
			dialogs_quick_add_set_due (_tmp20_, _tmp26_);
			_g_date_time_unref0 (_tmp26_);
			_g_date_time_unref0 (_tmp24_);
			_g_date_time_unref0 (_tmp22_);
		} else {
			ObjectsBaseObject* _tmp27_;
			_tmp27_ = self->priv->_filter;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, OBJECTS_FILTERS_TYPE_PINBOARD)) {
				DialogsQuickAdd* _tmp28_;
				_tmp28_ = dialog;
				dialogs_quick_add_set_pinned (_tmp28_, TRUE);
			}
		}
	}
	_tmp29_ = dialog;
	_tmp30_ = planify__instance;
	_tmp31_ = _tmp30_->main_window;
	adw_dialog_present ((AdwDialog*) _tmp29_, (GtkWidget*) _tmp31_);
	_g_object_unref0 (dialog);
	_g_object_unref0 (inbox_project);
}

static void
_views_filter_header_project_function_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                       GtkListBoxRow* before,
                                                                       gpointer self)
{
	views_filter_header_project_function ((ViewsFilter*) self, row, before);
}

static void
_views_filter_header_completed_function_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                         GtkListBoxRow* before,
                                                                         gpointer self)
{
	views_filter_header_completed_function ((ViewsFilter*) self, row, before);
}

static gint
____lambda878_ (ViewsFilter* self,
                GtkListBoxRow* row1,
                GtkListBoxRow* row2)
{
	ObjectsItem* _tmp0_;
	ObjectsItem* _tmp1_;
	ObjectsItem* _tmp2_;
	ObjectsItem* _tmp3_;
	gint result;
	g_return_val_if_fail (row1 != NULL, -1);
	g_return_val_if_fail (row2 != NULL, -1);
	_tmp0_ = layouts_item_base_get_item ((LayoutsItemBase*) G_TYPE_CHECK_INSTANCE_CAST (row1, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = layouts_item_base_get_item ((LayoutsItemBase*) G_TYPE_CHECK_INSTANCE_CAST (row2, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
	_tmp3_ = _tmp2_;
	result = views_filter_sort_completed_function (self, _tmp1_, _tmp3_);
	return result;
}

static gint
_____lambda878__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                        GtkListBoxRow* row2,
                                        gpointer self)
{
	gint result;
	result = ____lambda878_ ((ViewsFilter*) self, row1, row2);
	return result;
}

static void
views_filter_update_request (ViewsFilter* self)
{
	ObjectsBaseObject* _tmp0_;
	LayoutsHeaderBar* _tmp39_;
	GtkLabel* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	GtkRevealer* _tmp43_;
	ObjectsBaseObject* _tmp44_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_filter;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, OBJECTS_FILTERS_TYPE_PRIORITY)) {
		ObjectsFiltersPriority* priority = NULL;
		ObjectsBaseObject* _tmp1_;
		ObjectsFiltersPriority* _tmp2_;
		GtkImage* _tmp3_;
		ObjectsFiltersPriority* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		Util* _tmp7_;
		Util* _tmp8_;
		ObjectsFiltersPriority* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GtkImage* _tmp12_;
		GtkLabel* _tmp13_;
		ObjectsFiltersPriority* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		GtkListBox* _tmp17_;
		WidgetsMagicButton* _tmp18_;
		_tmp1_ = self->priv->_filter;
		_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, OBJECTS_FILTERS_TYPE_PRIORITY, ObjectsFiltersPriority));
		priority = _tmp2_;
		_tmp3_ = self->priv->title_icon;
		_tmp4_ = priority;
		_tmp5_ = objects_filters_priority_get_icon (_tmp4_);
		_tmp6_ = _tmp5_;
		g_object_set (_tmp3_, "icon-name", _tmp6_, NULL);
		_tmp7_ = util_get_default ();
		_tmp8_ = _tmp7_;
		_tmp9_ = priority;
		_tmp10_ = objects_filters_priority_get_color (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = self->priv->title_icon;
		util_set_widget_color (_tmp8_, _tmp11_, (GtkWidget*) _tmp12_);
		_g_object_unref0 (_tmp8_);
		_tmp13_ = self->priv->title_label;
		_tmp14_ = priority;
		_tmp15_ = objects_filters_priority_get_title (_tmp14_);
		_tmp16_ = _tmp15_;
		gtk_label_set_label (_tmp13_, _tmp16_);
		_tmp17_ = self->priv->listbox;
		gtk_list_box_set_header_func (_tmp17_, _views_filter_header_project_function_gtk_list_box_update_header_func, g_object_ref (self), g_object_unref);
		_tmp18_ = self->priv->magic_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp18_, TRUE);
		_g_object_unref0 (priority);
	} else {
		GtkImage* _tmp19_;
		ObjectsBaseObject* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		Util* _tmp23_;
		Util* _tmp24_;
		ObjectsBaseObject* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		GtkImage* _tmp28_;
		GtkLabel* _tmp29_;
		ObjectsBaseObject* _tmp30_;
		const gchar* _tmp31_;
		const gchar* _tmp32_;
		WidgetsMagicButton* _tmp33_;
		ObjectsBaseObject* _tmp34_;
		_tmp19_ = self->priv->title_icon;
		_tmp20_ = self->priv->_filter;
		_tmp21_ = objects_base_object_get_icon_name (_tmp20_);
		_tmp22_ = _tmp21_;
		g_object_set (_tmp19_, "icon-name", _tmp22_, NULL);
		_tmp23_ = util_get_default ();
		_tmp24_ = _tmp23_;
		_tmp25_ = self->priv->_filter;
		_tmp26_ = objects_base_object_theme_color (_tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = self->priv->title_icon;
		util_set_widget_color (_tmp24_, _tmp27_, (GtkWidget*) _tmp28_);
		_g_free0 (_tmp27_);
		_g_object_unref0 (_tmp24_);
		_tmp29_ = self->priv->title_label;
		_tmp30_ = self->priv->_filter;
		_tmp31_ = objects_base_object_get_name (_tmp30_);
		_tmp32_ = _tmp31_;
		gtk_label_set_label (_tmp29_, _tmp32_);
		_tmp33_ = self->priv->magic_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp33_, TRUE);
		_tmp34_ = self->priv->_filter;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp34_, OBJECTS_FILTERS_TYPE_COMPLETED)) {
			WidgetsMagicButton* _tmp35_;
			GtkListBox* _tmp36_;
			GtkListBox* _tmp37_;
			_tmp35_ = self->priv->magic_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp35_, FALSE);
			_tmp36_ = self->priv->listbox;
			gtk_list_box_set_header_func (_tmp36_, _views_filter_header_completed_function_gtk_list_box_update_header_func, g_object_ref (self), g_object_unref);
			_tmp37_ = self->priv->listbox;
			gtk_list_box_set_sort_func (_tmp37_, _____lambda878__gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
		} else {
			GtkListBox* _tmp38_;
			_tmp38_ = self->priv->listbox;
			gtk_list_box_set_header_func (_tmp38_, _views_filter_header_project_function_gtk_list_box_update_header_func, g_object_ref (self), g_object_unref);
		}
	}
	_tmp39_ = self->priv->headerbar;
	_tmp40_ = self->priv->title_label;
	_tmp41_ = gtk_label_get_label (_tmp40_);
	_tmp42_ = _tmp41_;
	layouts_header_bar_set_title (_tmp39_, _tmp42_);
	_tmp43_ = self->priv->view_setting_revealer;
	_tmp44_ = self->priv->_filter;
	gtk_revealer_set_reveal_child (_tmp43_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp44_, OBJECTS_FILTERS_TYPE_COMPLETED));
}

static gint
___lambda879_ (ViewsFilter* self,
               ObjectsItem* a,
               ObjectsItem* b)
{
	gint result;
	g_return_val_if_fail (a != NULL, -1);
	g_return_val_if_fail (b != NULL, -1);
	result = views_filter_sort_completed_function (self, a, b);
	return result;
}

static gint
____lambda879__gcompare_data_func (gconstpointer a,
                                   gconstpointer b,
                                   gpointer self)
{
	gint result;
	result = ___lambda879_ ((ViewsFilter*) self, (ObjectsItem*) a, (ObjectsItem*) b);
	return result;
}

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 gint
___lambda880_ (ViewsFilter* self,
               ObjectsItem* a,
               ObjectsItem* b)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gint _tmp8_;
	gint result;
	g_return_val_if_fail (a != NULL, -1);
	g_return_val_if_fail (b != NULL, -1);
	_tmp0_ = objects_item_get_project_id (a);
	_tmp1_ = _tmp0_;
	_tmp2_ = string_strip (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_item_get_project_id (b);
	_tmp5_ = _tmp4_;
	_tmp6_ = string_strip (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_utf8_collate (_tmp3_, _tmp7_);
	_g_free0 (_tmp7_);
	_g_free0 (_tmp3_);
	result = _tmp8_;
	return result;
}

static gint
____lambda880__gcompare_data_func (gconstpointer a,
                                   gconstpointer b,
                                   gpointer self)
{
	gint result;
	result = ___lambda880_ ((ViewsFilter*) self, (ObjectsItem*) a, (ObjectsItem*) b);
	return result;
}

static void
views_filter_add_items (ViewsFilter* self)
{
	GeeHashMap* _tmp12_;
	GeeArrayList* _tmp13_;
	ObjectsBaseObject* _tmp16_;
	ObjectsBaseObject* _tmp122_;
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _row_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->items;
		_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_row_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			LayoutsItemRow* row = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			LayoutsItemRow* _tmp9_;
			GtkListBox* _tmp10_;
			LayoutsItemRow* _tmp11_;
			_tmp6_ = _row_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _row_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			row = (LayoutsItemRow*) _tmp8_;
			_tmp9_ = row;
			layouts_item_base_clean_up ((LayoutsItemBase*) _tmp9_);
			_tmp10_ = self->priv->listbox;
			_tmp11_ = row;
			gtk_list_box_remove (_tmp10_, (GtkWidget*) _tmp11_);
			_g_object_unref0 (row);
		}
		_g_object_unref0 (_row_it);
	}
	_tmp12_ = self->priv->items;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp12_);
	_tmp13_ = self->priv->items_list;
	if (_tmp13_ == NULL) {
		GeeArrayList* _tmp14_;
		_tmp14_ = gee_array_list_new (OBJECTS_TYPE_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
		_g_object_unref0 (self->priv->items_list);
		self->priv->items_list = _tmp14_;
	} else {
		GeeArrayList* _tmp15_;
		_tmp15_ = self->priv->items_list;
		gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp15_);
	}
	_tmp16_ = self->priv->_filter;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, OBJECTS_FILTERS_TYPE_PRIORITY)) {
		ObjectsFiltersPriority* priority = NULL;
		ObjectsBaseObject* _tmp17_;
		ObjectsFiltersPriority* _tmp18_;
		_tmp17_ = self->priv->_filter;
		_tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, OBJECTS_FILTERS_TYPE_PRIORITY, ObjectsFiltersPriority));
		priority = _tmp18_;
		{
			GeeArrayList* _item_list = NULL;
			ServicesStore* _tmp19_;
			ObjectsFiltersPriority* _tmp20_;
			gint _tmp21_;
			gint _tmp22_;
			GeeArrayList* _tmp23_;
			gint _item_size = 0;
			GeeArrayList* _tmp24_;
			gint _tmp25_;
			gint _tmp26_;
			gint _item_index = 0;
			_tmp19_ = services_store_instance ();
			_tmp20_ = priority;
			_tmp21_ = objects_filters_priority_get_priority (_tmp20_);
			_tmp22_ = _tmp21_;
			_tmp23_ = services_store_get_items_by_priority (_tmp19_, _tmp22_, FALSE);
			_item_list = _tmp23_;
			_tmp24_ = _item_list;
			_tmp25_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp24_);
			_tmp26_ = _tmp25_;
			_item_size = _tmp26_;
			_item_index = -1;
			while (TRUE) {
				gint _tmp27_;
				gint _tmp28_;
				ObjectsItem* item = NULL;
				GeeArrayList* _tmp29_;
				gpointer _tmp30_;
				GeeArrayList* _tmp31_;
				ObjectsItem* _tmp32_;
				_item_index = _item_index + 1;
				_tmp27_ = _item_index;
				_tmp28_ = _item_size;
				if (!(_tmp27_ < _tmp28_)) {
					break;
				}
				_tmp29_ = _item_list;
				_tmp30_ = gee_abstract_list_get ((GeeAbstractList*) _tmp29_, _item_index);
				item = (ObjectsItem*) _tmp30_;
				_tmp31_ = self->priv->items_list;
				_tmp32_ = item;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp31_, _tmp32_);
				_g_object_unref0 (item);
			}
			_g_object_unref0 (_item_list);
		}
		_g_object_unref0 (priority);
	} else {
		ObjectsBaseObject* _tmp33_;
		_tmp33_ = self->priv->_filter;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, OBJECTS_FILTERS_TYPE_COMPLETED)) {
			{
				GeeArrayList* _item_list = NULL;
				ServicesStore* _tmp34_;
				GeeArrayList* _tmp35_;
				gint _item_size = 0;
				GeeArrayList* _tmp36_;
				gint _tmp37_;
				gint _tmp38_;
				gint _item_index = 0;
				_tmp34_ = services_store_instance ();
				_tmp35_ = services_store_get_items_completed (_tmp34_);
				_item_list = _tmp35_;
				_tmp36_ = _item_list;
				_tmp37_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp36_);
				_tmp38_ = _tmp37_;
				_item_size = _tmp38_;
				_item_index = -1;
				while (TRUE) {
					gint _tmp39_;
					gint _tmp40_;
					ObjectsItem* item = NULL;
					GeeArrayList* _tmp41_;
					gpointer _tmp42_;
					GeeArrayList* _tmp43_;
					ObjectsItem* _tmp44_;
					_item_index = _item_index + 1;
					_tmp39_ = _item_index;
					_tmp40_ = _item_size;
					if (!(_tmp39_ < _tmp40_)) {
						break;
					}
					_tmp41_ = _item_list;
					_tmp42_ = gee_abstract_list_get ((GeeAbstractList*) _tmp41_, _item_index);
					item = (ObjectsItem*) _tmp42_;
					_tmp43_ = self->priv->items_list;
					_tmp44_ = item;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp43_, _tmp44_);
					_g_object_unref0 (item);
				}
				_g_object_unref0 (_item_list);
			}
		} else {
			ObjectsBaseObject* _tmp45_;
			_tmp45_ = self->priv->_filter;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp45_, OBJECTS_FILTERS_TYPE_TOMORROW)) {
				{
					GeeArrayList* _item_list = NULL;
					ServicesStore* _tmp46_;
					GDateTime* _tmp47_;
					GDateTime* _tmp48_;
					GDateTime* _tmp49_;
					GDateTime* _tmp50_;
					GeeArrayList* _tmp51_;
					GeeArrayList* _tmp52_;
					gint _item_size = 0;
					GeeArrayList* _tmp53_;
					gint _tmp54_;
					gint _tmp55_;
					gint _item_index = 0;
					_tmp46_ = services_store_instance ();
					_tmp47_ = g_date_time_new_now_local ();
					_tmp48_ = _tmp47_;
					_tmp49_ = g_date_time_add_days (_tmp48_, 1);
					_tmp50_ = _tmp49_;
					_tmp51_ = services_store_get_items_by_date (_tmp46_, _tmp50_, FALSE);
					_tmp52_ = _tmp51_;
					_g_date_time_unref0 (_tmp50_);
					_g_date_time_unref0 (_tmp48_);
					_item_list = _tmp52_;
					_tmp53_ = _item_list;
					_tmp54_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp53_);
					_tmp55_ = _tmp54_;
					_item_size = _tmp55_;
					_item_index = -1;
					while (TRUE) {
						gint _tmp56_;
						gint _tmp57_;
						ObjectsItem* item = NULL;
						GeeArrayList* _tmp58_;
						gpointer _tmp59_;
						GeeArrayList* _tmp60_;
						ObjectsItem* _tmp61_;
						_item_index = _item_index + 1;
						_tmp56_ = _item_index;
						_tmp57_ = _item_size;
						if (!(_tmp56_ < _tmp57_)) {
							break;
						}
						_tmp58_ = _item_list;
						_tmp59_ = gee_abstract_list_get ((GeeAbstractList*) _tmp58_, _item_index);
						item = (ObjectsItem*) _tmp59_;
						_tmp60_ = self->priv->items_list;
						_tmp61_ = item;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp60_, _tmp61_);
						_g_object_unref0 (item);
					}
					_g_object_unref0 (_item_list);
				}
			} else {
				ObjectsBaseObject* _tmp62_;
				_tmp62_ = self->priv->_filter;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp62_, OBJECTS_FILTERS_TYPE_PINBOARD)) {
					{
						GeeArrayList* _item_list = NULL;
						ServicesStore* _tmp63_;
						GeeArrayList* _tmp64_;
						gint _item_size = 0;
						GeeArrayList* _tmp65_;
						gint _tmp66_;
						gint _tmp67_;
						gint _item_index = 0;
						_tmp63_ = services_store_instance ();
						_tmp64_ = services_store_get_items_pinned (_tmp63_, FALSE);
						_item_list = _tmp64_;
						_tmp65_ = _item_list;
						_tmp66_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp65_);
						_tmp67_ = _tmp66_;
						_item_size = _tmp67_;
						_item_index = -1;
						while (TRUE) {
							gint _tmp68_;
							gint _tmp69_;
							ObjectsItem* item = NULL;
							GeeArrayList* _tmp70_;
							gpointer _tmp71_;
							GeeArrayList* _tmp72_;
							ObjectsItem* _tmp73_;
							_item_index = _item_index + 1;
							_tmp68_ = _item_index;
							_tmp69_ = _item_size;
							if (!(_tmp68_ < _tmp69_)) {
								break;
							}
							_tmp70_ = _item_list;
							_tmp71_ = gee_abstract_list_get ((GeeAbstractList*) _tmp70_, _item_index);
							item = (ObjectsItem*) _tmp71_;
							_tmp72_ = self->priv->items_list;
							_tmp73_ = item;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp72_, _tmp73_);
							_g_object_unref0 (item);
						}
						_g_object_unref0 (_item_list);
					}
				} else {
					ObjectsBaseObject* _tmp74_;
					_tmp74_ = self->priv->_filter;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp74_, OBJECTS_FILTERS_TYPE_ANYTIME)) {
						{
							GeeArrayList* _item_list = NULL;
							ServicesStore* _tmp75_;
							GeeArrayList* _tmp76_;
							gint _item_size = 0;
							GeeArrayList* _tmp77_;
							gint _tmp78_;
							gint _tmp79_;
							gint _item_index = 0;
							_tmp75_ = services_store_instance ();
							_tmp76_ = services_store_get_items_no_date (_tmp75_, FALSE);
							_item_list = _tmp76_;
							_tmp77_ = _item_list;
							_tmp78_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp77_);
							_tmp79_ = _tmp78_;
							_item_size = _tmp79_;
							_item_index = -1;
							while (TRUE) {
								gint _tmp80_;
								gint _tmp81_;
								ObjectsItem* item = NULL;
								GeeArrayList* _tmp82_;
								gpointer _tmp83_;
								GeeArrayList* _tmp84_;
								ObjectsItem* _tmp85_;
								_item_index = _item_index + 1;
								_tmp80_ = _item_index;
								_tmp81_ = _item_size;
								if (!(_tmp80_ < _tmp81_)) {
									break;
								}
								_tmp82_ = _item_list;
								_tmp83_ = gee_abstract_list_get ((GeeAbstractList*) _tmp82_, _item_index);
								item = (ObjectsItem*) _tmp83_;
								_tmp84_ = self->priv->items_list;
								_tmp85_ = item;
								gee_abstract_collection_add ((GeeAbstractCollection*) _tmp84_, _tmp85_);
								_g_object_unref0 (item);
							}
							_g_object_unref0 (_item_list);
						}
					} else {
						ObjectsBaseObject* _tmp86_;
						_tmp86_ = self->priv->_filter;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp86_, OBJECTS_FILTERS_TYPE_REPEATING)) {
							{
								GeeArrayList* _item_list = NULL;
								ServicesStore* _tmp87_;
								GeeArrayList* _tmp88_;
								gint _item_size = 0;
								GeeArrayList* _tmp89_;
								gint _tmp90_;
								gint _tmp91_;
								gint _item_index = 0;
								_tmp87_ = services_store_instance ();
								_tmp88_ = services_store_get_items_repeating (_tmp87_, FALSE);
								_item_list = _tmp88_;
								_tmp89_ = _item_list;
								_tmp90_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp89_);
								_tmp91_ = _tmp90_;
								_item_size = _tmp91_;
								_item_index = -1;
								while (TRUE) {
									gint _tmp92_;
									gint _tmp93_;
									ObjectsItem* item = NULL;
									GeeArrayList* _tmp94_;
									gpointer _tmp95_;
									GeeArrayList* _tmp96_;
									ObjectsItem* _tmp97_;
									_item_index = _item_index + 1;
									_tmp92_ = _item_index;
									_tmp93_ = _item_size;
									if (!(_tmp92_ < _tmp93_)) {
										break;
									}
									_tmp94_ = _item_list;
									_tmp95_ = gee_abstract_list_get ((GeeAbstractList*) _tmp94_, _item_index);
									item = (ObjectsItem*) _tmp95_;
									_tmp96_ = self->priv->items_list;
									_tmp97_ = item;
									gee_abstract_collection_add ((GeeAbstractCollection*) _tmp96_, _tmp97_);
									_g_object_unref0 (item);
								}
								_g_object_unref0 (_item_list);
							}
						} else {
							ObjectsBaseObject* _tmp98_;
							_tmp98_ = self->priv->_filter;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp98_, OBJECTS_FILTERS_TYPE_UNLABELED)) {
								{
									GeeArrayList* _item_list = NULL;
									ServicesStore* _tmp99_;
									GeeArrayList* _tmp100_;
									gint _item_size = 0;
									GeeArrayList* _tmp101_;
									gint _tmp102_;
									gint _tmp103_;
									gint _item_index = 0;
									_tmp99_ = services_store_instance ();
									_tmp100_ = services_store_get_items_unlabeled (_tmp99_, FALSE);
									_item_list = _tmp100_;
									_tmp101_ = _item_list;
									_tmp102_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp101_);
									_tmp103_ = _tmp102_;
									_item_size = _tmp103_;
									_item_index = -1;
									while (TRUE) {
										gint _tmp104_;
										gint _tmp105_;
										ObjectsItem* item = NULL;
										GeeArrayList* _tmp106_;
										gpointer _tmp107_;
										GeeArrayList* _tmp108_;
										ObjectsItem* _tmp109_;
										_item_index = _item_index + 1;
										_tmp104_ = _item_index;
										_tmp105_ = _item_size;
										if (!(_tmp104_ < _tmp105_)) {
											break;
										}
										_tmp106_ = _item_list;
										_tmp107_ = gee_abstract_list_get ((GeeAbstractList*) _tmp106_, _item_index);
										item = (ObjectsItem*) _tmp107_;
										_tmp108_ = self->priv->items_list;
										_tmp109_ = item;
										gee_abstract_collection_add ((GeeAbstractCollection*) _tmp108_, _tmp109_);
										_g_object_unref0 (item);
									}
									_g_object_unref0 (_item_list);
								}
							} else {
								ObjectsBaseObject* _tmp110_;
								_tmp110_ = self->priv->_filter;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp110_, OBJECTS_FILTERS_TYPE_ALL_ITEMS)) {
									{
										GeeArrayList* _item_list = NULL;
										ServicesStore* _tmp111_;
										GeeArrayList* _tmp112_;
										gint _item_size = 0;
										GeeArrayList* _tmp113_;
										gint _tmp114_;
										gint _tmp115_;
										gint _item_index = 0;
										_tmp111_ = services_store_instance ();
										_tmp112_ = services_store_get_items_no_parent (_tmp111_, FALSE);
										_item_list = _tmp112_;
										_tmp113_ = _item_list;
										_tmp114_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp113_);
										_tmp115_ = _tmp114_;
										_item_size = _tmp115_;
										_item_index = -1;
										while (TRUE) {
											gint _tmp116_;
											gint _tmp117_;
											ObjectsItem* item = NULL;
											GeeArrayList* _tmp118_;
											gpointer _tmp119_;
											GeeArrayList* _tmp120_;
											ObjectsItem* _tmp121_;
											_item_index = _item_index + 1;
											_tmp116_ = _item_index;
											_tmp117_ = _item_size;
											if (!(_tmp116_ < _tmp117_)) {
												break;
											}
											_tmp118_ = _item_list;
											_tmp119_ = gee_abstract_list_get ((GeeAbstractList*) _tmp118_, _item_index);
											item = (ObjectsItem*) _tmp119_;
											_tmp120_ = self->priv->items_list;
											_tmp121_ = item;
											gee_abstract_collection_add ((GeeAbstractCollection*) _tmp120_, _tmp121_);
											_g_object_unref0 (item);
										}
										_g_object_unref0 (_item_list);
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp122_ = self->priv->_filter;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp122_, OBJECTS_FILTERS_TYPE_COMPLETED)) {
		GeeArrayList* _tmp123_;
		_tmp123_ = self->priv->items_list;
		gee_list_sort ((GeeList*) _tmp123_, ____lambda879__gcompare_data_func, g_object_ref (self), g_object_unref);
	} else {
		GeeArrayList* _tmp124_;
		_tmp124_ = self->priv->items_list;
		gee_list_sort ((GeeList*) _tmp124_, ____lambda880__gcompare_data_func, g_object_ref (self), g_object_unref);
	}
	self->priv->page_index = 0;
	views_filter_load_next_page (self);
}

static void
views_filter_load_next_page (ViewsFilter* self)
{
	gint start = 0;
	gint _tmp0_ = 0;
	GeeArrayList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint end = 0;
	gint _tmp12_;
	g_return_if_fail (self != NULL);
	start = self->priv->page_index * VIEWS_FILTER_PAGE_SIZE;
	_tmp1_ = self->priv->items_list;
	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	if ((start + VIEWS_FILTER_PAGE_SIZE) < _tmp3_) {
		_tmp0_ = start + VIEWS_FILTER_PAGE_SIZE;
	} else {
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		_tmp4_ = self->priv->items_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_;
	}
	end = _tmp0_;
	{
		gint i = 0;
		i = start;
		{
			gboolean _tmp7_ = FALSE;
			_tmp7_ = TRUE;
			while (TRUE) {
				ObjectsItem* item = NULL;
				GeeArrayList* _tmp9_;
				gpointer _tmp10_;
				ObjectsItem* _tmp11_;
				if (!_tmp7_) {
					gint _tmp8_;
					_tmp8_ = i;
					i = _tmp8_ + 1;
				}
				_tmp7_ = FALSE;
				if (!(i < end)) {
					break;
				}
				_tmp9_ = self->priv->items_list;
				_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, i);
				item = (ObjectsItem*) _tmp10_;
				_tmp11_ = item;
				views_filter_add_item (self, _tmp11_);
				_g_object_unref0 (item);
			}
		}
	}
	_tmp12_ = self->priv->page_index;
	self->priv->page_index = _tmp12_ + 1;
	views_filter_update_load_more_button_label (self);
}

static void
views_filter_update_load_more_button_label (ViewsFilter* self)
{
	gint loaded = 0;
	gint remaining = 0;
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	loaded = self->priv->page_index * VIEWS_FILTER_PAGE_SIZE;
	_tmp0_ = self->priv->items_list;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	remaining = _tmp2_ - loaded;
	if (remaining > 0) {
		gint _tmp3_ = 0;
		gint to_show = 0;
		GtkButton* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		GtkRevealer* _tmp7_;
		if (remaining < VIEWS_FILTER_PAGE_SIZE) {
			_tmp3_ = remaining;
		} else {
			_tmp3_ = VIEWS_FILTER_PAGE_SIZE;
		}
		to_show = _tmp3_;
		_tmp4_ = self->priv->load_more_button;
		_tmp5_ = g_strdup_printf ("+%d %s", to_show, _ ("tasks"));
		_tmp6_ = _tmp5_;
		gtk_button_set_label (_tmp4_, _tmp6_);
		_g_free0 (_tmp6_);
		_tmp7_ = self->priv->load_more_button_revealer;
		gtk_revealer_set_reveal_child (_tmp7_, TRUE);
	} else {
		GtkButton* _tmp8_;
		GtkRevealer* _tmp9_;
		_tmp8_ = self->priv->load_more_button;
		gtk_button_set_label (_tmp8_, _ ("No more tasks"));
		_tmp9_ = self->priv->load_more_button_revealer;
		gtk_revealer_set_reveal_child (_tmp9_, FALSE);
	}
}

static void
views_filter_add_item (ViewsFilter* self,
                       ObjectsItem* item)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	LayoutsItemRow* _tmp3_;
	LayoutsItemRow* _tmp4_;
	GeeHashMap* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gpointer _tmp8_;
	LayoutsItemRow* _tmp9_;
	GtkListBox* _tmp10_;
	GeeHashMap* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gpointer _tmp14_;
	LayoutsItemRow* _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->items;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp2_ = _tmp1_;
	_tmp3_ = layouts_item_row_new (item, FALSE);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, _tmp2_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = self->priv->items;
	_tmp6_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp7_ = _tmp6_;
	_tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, _tmp7_);
	_tmp9_ = (LayoutsItemRow*) _tmp8_;
	layouts_item_row_disable_drag_and_drop (_tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = self->priv->listbox;
	_tmp11_ = self->priv->items;
	_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp13_ = _tmp12_;
	_tmp14_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp13_);
	_tmp15_ = (LayoutsItemRow*) _tmp14_;
	gtk_list_box_append (_tmp10_, (GtkWidget*) _tmp15_);
	_g_object_unref0 (_tmp15_);
}

static void
views_filter_valid_add_item (ViewsFilter* self,
                             ObjectsItem* item,
                             gboolean insert)
{
	gboolean _tmp0_ = FALSE;
	gboolean should_add = FALSE;
	ObjectsBaseObject* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	if (!insert) {
		_tmp0_ = TRUE;
	} else {
		GeeHashMap* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp1_ = self->priv->items;
		_tmp2_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp3_ = _tmp2_;
		_tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp3_);
	}
	if (_tmp0_) {
		views_filter_validate_placeholder (self);
		return;
	}
	should_add = FALSE;
	_tmp4_ = self->priv->_filter;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, OBJECTS_FILTERS_TYPE_PRIORITY)) {
		ObjectsFiltersPriority* priority = NULL;
		ObjectsBaseObject* _tmp5_;
		ObjectsFiltersPriority* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		ObjectsFiltersPriority* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp5_ = self->priv->_filter;
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, OBJECTS_FILTERS_TYPE_PRIORITY, ObjectsFiltersPriority));
		priority = _tmp6_;
		_tmp7_ = objects_item_get_priority (item);
		_tmp8_ = _tmp7_;
		_tmp9_ = priority;
		_tmp10_ = objects_filters_priority_get_priority (_tmp9_);
		_tmp11_ = _tmp10_;
		should_add = _tmp8_ == _tmp11_;
		_g_object_unref0 (priority);
	} else {
		ObjectsBaseObject* _tmp12_;
		_tmp12_ = self->priv->_filter;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, OBJECTS_FILTERS_TYPE_COMPLETED)) {
			gboolean _tmp13_;
			gboolean _tmp14_;
			_tmp13_ = objects_item_get_checked (item);
			_tmp14_ = _tmp13_;
			should_add = _tmp14_;
		} else {
			ObjectsBaseObject* _tmp15_;
			_tmp15_ = self->priv->_filter;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, OBJECTS_FILTERS_TYPE_TOMORROW)) {
				gboolean _tmp16_ = FALSE;
				gboolean _tmp17_;
				gboolean _tmp18_;
				_tmp17_ = objects_item_get_has_due (item);
				_tmp18_ = _tmp17_;
				if (_tmp18_) {
					ObjectsDueDate* _tmp19_;
					ObjectsDueDate* _tmp20_;
					GDateTime* _tmp21_;
					GDateTime* _tmp22_;
					_tmp19_ = objects_item_get_due (item);
					_tmp20_ = _tmp19_;
					_tmp21_ = objects_due_date_get_datetime (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp16_ = utils_datetime_is_tomorrow (_tmp22_);
				} else {
					_tmp16_ = FALSE;
				}
				should_add = _tmp16_;
			} else {
				ObjectsBaseObject* _tmp23_;
				_tmp23_ = self->priv->_filter;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, OBJECTS_FILTERS_TYPE_PINBOARD)) {
					gboolean _tmp24_;
					gboolean _tmp25_;
					_tmp24_ = objects_item_get_pinned (item);
					_tmp25_ = _tmp24_;
					should_add = _tmp25_;
				} else {
					ObjectsBaseObject* _tmp26_;
					_tmp26_ = self->priv->_filter;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, OBJECTS_FILTERS_TYPE_ANYTIME)) {
						gboolean _tmp27_;
						gboolean _tmp28_;
						_tmp27_ = objects_item_get_has_due (item);
						_tmp28_ = _tmp27_;
						should_add = !_tmp28_;
					} else {
						ObjectsBaseObject* _tmp29_;
						_tmp29_ = self->priv->_filter;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp29_, OBJECTS_FILTERS_TYPE_REPEATING)) {
							gboolean _tmp30_ = FALSE;
							gboolean _tmp31_;
							gboolean _tmp32_;
							_tmp31_ = objects_item_get_has_due (item);
							_tmp32_ = _tmp31_;
							if (_tmp32_) {
								ObjectsDueDate* _tmp33_;
								ObjectsDueDate* _tmp34_;
								gboolean _tmp35_;
								gboolean _tmp36_;
								_tmp33_ = objects_item_get_due (item);
								_tmp34_ = _tmp33_;
								_tmp35_ = objects_due_date_get_is_recurring (_tmp34_);
								_tmp36_ = _tmp35_;
								_tmp30_ = _tmp36_;
							} else {
								_tmp30_ = FALSE;
							}
							should_add = _tmp30_;
						} else {
							ObjectsBaseObject* _tmp37_;
							_tmp37_ = self->priv->_filter;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp37_, OBJECTS_FILTERS_TYPE_UNLABELED)) {
								GeeArrayList* _tmp38_;
								GeeArrayList* _tmp39_;
								gint _tmp40_;
								gint _tmp41_;
								_tmp38_ = objects_item_get_labels (item);
								_tmp39_ = _tmp38_;
								_tmp40_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp39_);
								_tmp41_ = _tmp40_;
								should_add = _tmp41_ <= 0;
							} else {
								ObjectsBaseObject* _tmp42_;
								_tmp42_ = self->priv->_filter;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp42_, OBJECTS_FILTERS_TYPE_ALL_ITEMS)) {
									should_add = TRUE;
								}
							}
						}
					}
				}
			}
		}
	}
	if (should_add) {
		GeeArrayList* _tmp43_;
		_tmp43_ = self->priv->items_list;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp43_, item);
		views_filter_add_item (self, item);
		views_filter_update_load_more_button_label (self);
	}
	views_filter_validate_placeholder (self);
}

static void
views_filter_valid_delete_item (ViewsFilter* self,
                                ObjectsItem* item)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GeeArrayList* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->items;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gpointer _tmp6_;
		LayoutsItemRow* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp3_ = self->priv->items;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (LayoutsItemRow*) _tmp6_;
		layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp7_);
		_g_object_unref0 (_tmp7_);
		_tmp8_ = self->priv->items;
		_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp10_ = _tmp9_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp8_, _tmp10_, NULL);
	}
	_tmp11_ = self->priv->items_list;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp11_, item);
	views_filter_update_load_more_button_label (self);
	views_filter_validate_placeholder (self);
}

static void
views_filter_valid_update_item (ViewsFilter* self,
                                ObjectsItem* item,
                                const gchar* update_id)
{
	gboolean _tmp0_ = FALSE;
	GeeHashMap* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	ObjectsBaseObject* _tmp16_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	g_return_if_fail (update_id != NULL);
	_tmp1_ = self->priv->items;
	_tmp2_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp3_ = _tmp2_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp3_)) {
		GeeHashMap* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gpointer _tmp7_;
		LayoutsItemRow* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp4_ = self->priv->items;
		_tmp5_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp6_ = _tmp5_;
		_tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, _tmp6_);
		_tmp8_ = (LayoutsItemRow*) _tmp7_;
		_tmp9_ = layouts_item_base_get_update_id ((LayoutsItemBase*) _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp0_ = g_strcmp0 (_tmp10_, update_id) != 0;
		_g_object_unref0 (_tmp8_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GeeHashMap* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		gpointer _tmp14_;
		LayoutsItemRow* _tmp15_;
		_tmp11_ = self->priv->items;
		_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp13_ = _tmp12_;
		_tmp14_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp13_);
		_tmp15_ = (LayoutsItemRow*) _tmp14_;
		layouts_item_base_update_request ((LayoutsItemBase*) _tmp15_);
		_g_object_unref0 (_tmp15_);
	}
	_tmp16_ = self->priv->_filter;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, OBJECTS_FILTERS_TYPE_PRIORITY)) {
		ObjectsFiltersPriority* priority = NULL;
		ObjectsBaseObject* _tmp17_;
		ObjectsFiltersPriority* _tmp18_;
		gboolean _tmp19_ = FALSE;
		GeeHashMap* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		gboolean _tmp38_ = FALSE;
		GeeHashMap* _tmp39_;
		const gchar* _tmp40_;
		const gchar* _tmp41_;
		_tmp17_ = self->priv->_filter;
		_tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, OBJECTS_FILTERS_TYPE_PRIORITY, ObjectsFiltersPriority));
		priority = _tmp18_;
		_tmp20_ = self->priv->items;
		_tmp21_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp22_ = _tmp21_;
		if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp20_, _tmp22_)) {
			gint _tmp23_;
			gint _tmp24_;
			ObjectsFiltersPriority* _tmp25_;
			gint _tmp26_;
			gint _tmp27_;
			_tmp23_ = objects_item_get_priority (item);
			_tmp24_ = _tmp23_;
			_tmp25_ = priority;
			_tmp26_ = objects_filters_priority_get_priority (_tmp25_);
			_tmp27_ = _tmp26_;
			_tmp19_ = _tmp24_ != _tmp27_;
		} else {
			_tmp19_ = FALSE;
		}
		if (_tmp19_) {
			GeeHashMap* _tmp28_;
			const gchar* _tmp29_;
			const gchar* _tmp30_;
			gpointer _tmp31_;
			LayoutsItemRow* _tmp32_;
			GeeHashMap* _tmp33_;
			const gchar* _tmp34_;
			const gchar* _tmp35_;
			ServicesEventBus* _tmp36_;
			ServicesEventBus* _tmp37_;
			_tmp28_ = self->priv->items;
			_tmp29_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp30_ = _tmp29_;
			_tmp31_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp28_, _tmp30_);
			_tmp32_ = (LayoutsItemRow*) _tmp31_;
			layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp32_);
			_g_object_unref0 (_tmp32_);
			_tmp33_ = self->priv->items;
			_tmp34_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp35_ = _tmp34_;
			gee_abstract_map_unset ((GeeAbstractMap*) _tmp33_, _tmp35_, NULL);
			_tmp36_ = services_event_bus_get_default ();
			_tmp37_ = _tmp36_;
			services_event_bus_unfocus_item (_tmp37_);
			_g_object_unref0 (_tmp37_);
		}
		_tmp39_ = self->priv->items;
		_tmp40_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp41_ = _tmp40_;
		if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp39_, _tmp41_)) {
			gboolean _tmp42_;
			gboolean _tmp43_;
			_tmp42_ = objects_item_get_checked (item);
			_tmp43_ = _tmp42_;
			_tmp38_ = !_tmp43_;
		} else {
			_tmp38_ = FALSE;
		}
		if (_tmp38_) {
			GeeHashMap* _tmp44_;
			const gchar* _tmp45_;
			const gchar* _tmp46_;
			gpointer _tmp47_;
			LayoutsItemRow* _tmp48_;
			GeeHashMap* _tmp49_;
			const gchar* _tmp50_;
			const gchar* _tmp51_;
			ServicesEventBus* _tmp52_;
			ServicesEventBus* _tmp53_;
			_tmp44_ = self->priv->items;
			_tmp45_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp46_ = _tmp45_;
			_tmp47_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp44_, _tmp46_);
			_tmp48_ = (LayoutsItemRow*) _tmp47_;
			layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp48_);
			_g_object_unref0 (_tmp48_);
			_tmp49_ = self->priv->items;
			_tmp50_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp51_ = _tmp50_;
			gee_abstract_map_unset ((GeeAbstractMap*) _tmp49_, _tmp51_, NULL);
			_tmp52_ = services_event_bus_get_default ();
			_tmp53_ = _tmp52_;
			services_event_bus_unfocus_item (_tmp53_);
			_g_object_unref0 (_tmp53_);
		}
		views_filter_valid_add_item (self, item, TRUE);
		_g_object_unref0 (priority);
	} else {
		ObjectsBaseObject* _tmp54_;
		_tmp54_ = self->priv->_filter;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp54_, OBJECTS_FILTERS_TYPE_COMPLETED)) {
			gboolean _tmp55_ = FALSE;
			GeeHashMap* _tmp56_;
			const gchar* _tmp57_;
			const gchar* _tmp58_;
			_tmp56_ = self->priv->items;
			_tmp57_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp58_ = _tmp57_;
			if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp56_, _tmp58_)) {
				gboolean _tmp59_;
				gboolean _tmp60_;
				_tmp59_ = objects_item_get_checked (item);
				_tmp60_ = _tmp59_;
				_tmp55_ = _tmp60_;
			} else {
				_tmp55_ = FALSE;
			}
			if (_tmp55_) {
				GeeHashMap* _tmp61_;
				const gchar* _tmp62_;
				const gchar* _tmp63_;
				gpointer _tmp64_;
				LayoutsItemRow* _tmp65_;
				GeeHashMap* _tmp66_;
				const gchar* _tmp67_;
				const gchar* _tmp68_;
				ServicesEventBus* _tmp69_;
				ServicesEventBus* _tmp70_;
				_tmp61_ = self->priv->items;
				_tmp62_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp63_ = _tmp62_;
				_tmp64_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp61_, _tmp63_);
				_tmp65_ = (LayoutsItemRow*) _tmp64_;
				layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp65_);
				_g_object_unref0 (_tmp65_);
				_tmp66_ = self->priv->items;
				_tmp67_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp68_ = _tmp67_;
				gee_abstract_map_unset ((GeeAbstractMap*) _tmp66_, _tmp68_, NULL);
				_tmp69_ = services_event_bus_get_default ();
				_tmp70_ = _tmp69_;
				services_event_bus_unfocus_item (_tmp70_);
				_g_object_unref0 (_tmp70_);
			}
			views_filter_valid_add_item (self, item, TRUE);
		} else {
			ObjectsBaseObject* _tmp71_;
			_tmp71_ = self->priv->_filter;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp71_, OBJECTS_FILTERS_TYPE_TOMORROW)) {
				gboolean _tmp72_ = FALSE;
				GeeHashMap* _tmp73_;
				const gchar* _tmp74_;
				const gchar* _tmp75_;
				_tmp73_ = self->priv->items;
				_tmp74_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp75_ = _tmp74_;
				if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp73_, _tmp75_)) {
					gboolean _tmp76_ = FALSE;
					gboolean _tmp77_;
					gboolean _tmp78_;
					_tmp77_ = objects_item_get_has_due (item);
					_tmp78_ = _tmp77_;
					if (!_tmp78_) {
						_tmp76_ = TRUE;
					} else {
						ObjectsDueDate* _tmp79_;
						ObjectsDueDate* _tmp80_;
						GDateTime* _tmp81_;
						GDateTime* _tmp82_;
						_tmp79_ = objects_item_get_due (item);
						_tmp80_ = _tmp79_;
						_tmp81_ = objects_due_date_get_datetime (_tmp80_);
						_tmp82_ = _tmp81_;
						_tmp76_ = !utils_datetime_is_tomorrow (_tmp82_);
					}
					_tmp72_ = _tmp76_;
				} else {
					_tmp72_ = FALSE;
				}
				if (_tmp72_) {
					GeeHashMap* _tmp83_;
					const gchar* _tmp84_;
					const gchar* _tmp85_;
					gpointer _tmp86_;
					LayoutsItemRow* _tmp87_;
					GeeHashMap* _tmp88_;
					const gchar* _tmp89_;
					const gchar* _tmp90_;
					ServicesEventBus* _tmp91_;
					ServicesEventBus* _tmp92_;
					_tmp83_ = self->priv->items;
					_tmp84_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
					_tmp85_ = _tmp84_;
					_tmp86_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp83_, _tmp85_);
					_tmp87_ = (LayoutsItemRow*) _tmp86_;
					layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp87_);
					_g_object_unref0 (_tmp87_);
					_tmp88_ = self->priv->items;
					_tmp89_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
					_tmp90_ = _tmp89_;
					gee_abstract_map_unset ((GeeAbstractMap*) _tmp88_, _tmp90_, NULL);
					_tmp91_ = services_event_bus_get_default ();
					_tmp92_ = _tmp91_;
					services_event_bus_unfocus_item (_tmp92_);
					_g_object_unref0 (_tmp92_);
				}
				views_filter_valid_add_item (self, item, TRUE);
			} else {
				ObjectsBaseObject* _tmp93_;
				_tmp93_ = self->priv->_filter;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp93_, OBJECTS_FILTERS_TYPE_PINBOARD)) {
					gboolean _tmp94_ = FALSE;
					GeeHashMap* _tmp95_;
					const gchar* _tmp96_;
					const gchar* _tmp97_;
					_tmp95_ = self->priv->items;
					_tmp96_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
					_tmp97_ = _tmp96_;
					if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp95_, _tmp97_)) {
						gboolean _tmp98_;
						gboolean _tmp99_;
						_tmp98_ = objects_item_get_pinned (item);
						_tmp99_ = _tmp98_;
						_tmp94_ = !_tmp99_;
					} else {
						_tmp94_ = FALSE;
					}
					if (_tmp94_) {
						GeeHashMap* _tmp100_;
						const gchar* _tmp101_;
						const gchar* _tmp102_;
						gpointer _tmp103_;
						LayoutsItemRow* _tmp104_;
						GeeHashMap* _tmp105_;
						const gchar* _tmp106_;
						const gchar* _tmp107_;
						ServicesEventBus* _tmp108_;
						ServicesEventBus* _tmp109_;
						_tmp100_ = self->priv->items;
						_tmp101_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
						_tmp102_ = _tmp101_;
						_tmp103_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp100_, _tmp102_);
						_tmp104_ = (LayoutsItemRow*) _tmp103_;
						layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp104_);
						_g_object_unref0 (_tmp104_);
						_tmp105_ = self->priv->items;
						_tmp106_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
						_tmp107_ = _tmp106_;
						gee_abstract_map_unset ((GeeAbstractMap*) _tmp105_, _tmp107_, NULL);
						_tmp108_ = services_event_bus_get_default ();
						_tmp109_ = _tmp108_;
						services_event_bus_unfocus_item (_tmp109_);
						_g_object_unref0 (_tmp109_);
					}
					views_filter_valid_add_item (self, item, TRUE);
				} else {
					ObjectsBaseObject* _tmp110_;
					_tmp110_ = self->priv->_filter;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp110_, OBJECTS_FILTERS_TYPE_ANYTIME)) {
						gboolean _tmp111_ = FALSE;
						GeeHashMap* _tmp112_;
						const gchar* _tmp113_;
						const gchar* _tmp114_;
						_tmp112_ = self->priv->items;
						_tmp113_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
						_tmp114_ = _tmp113_;
						if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp112_, _tmp114_)) {
							gboolean _tmp115_;
							gboolean _tmp116_;
							_tmp115_ = objects_item_get_has_due (item);
							_tmp116_ = _tmp115_;
							_tmp111_ = _tmp116_;
						} else {
							_tmp111_ = FALSE;
						}
						if (_tmp111_) {
							GeeHashMap* _tmp117_;
							const gchar* _tmp118_;
							const gchar* _tmp119_;
							gpointer _tmp120_;
							LayoutsItemRow* _tmp121_;
							GeeHashMap* _tmp122_;
							const gchar* _tmp123_;
							const gchar* _tmp124_;
							ServicesEventBus* _tmp125_;
							ServicesEventBus* _tmp126_;
							_tmp117_ = self->priv->items;
							_tmp118_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
							_tmp119_ = _tmp118_;
							_tmp120_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp117_, _tmp119_);
							_tmp121_ = (LayoutsItemRow*) _tmp120_;
							layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp121_);
							_g_object_unref0 (_tmp121_);
							_tmp122_ = self->priv->items;
							_tmp123_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
							_tmp124_ = _tmp123_;
							gee_abstract_map_unset ((GeeAbstractMap*) _tmp122_, _tmp124_, NULL);
							_tmp125_ = services_event_bus_get_default ();
							_tmp126_ = _tmp125_;
							services_event_bus_unfocus_item (_tmp126_);
							_g_object_unref0 (_tmp126_);
						}
						views_filter_valid_add_item (self, item, TRUE);
					} else {
						ObjectsBaseObject* _tmp127_;
						_tmp127_ = self->priv->_filter;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp127_, OBJECTS_FILTERS_TYPE_REPEATING)) {
							gboolean _tmp128_ = FALSE;
							GeeHashMap* _tmp129_;
							const gchar* _tmp130_;
							const gchar* _tmp131_;
							_tmp129_ = self->priv->items;
							_tmp130_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
							_tmp131_ = _tmp130_;
							if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp129_, _tmp131_)) {
								gboolean _tmp132_ = FALSE;
								gboolean _tmp133_;
								gboolean _tmp134_;
								_tmp133_ = objects_item_get_has_due (item);
								_tmp134_ = _tmp133_;
								if (!_tmp134_) {
									_tmp132_ = TRUE;
								} else {
									ObjectsDueDate* _tmp135_;
									ObjectsDueDate* _tmp136_;
									gboolean _tmp137_;
									gboolean _tmp138_;
									_tmp135_ = objects_item_get_due (item);
									_tmp136_ = _tmp135_;
									_tmp137_ = objects_due_date_get_is_recurring (_tmp136_);
									_tmp138_ = _tmp137_;
									_tmp132_ = !_tmp138_;
								}
								_tmp128_ = _tmp132_;
							} else {
								_tmp128_ = FALSE;
							}
							if (_tmp128_) {
								GeeHashMap* _tmp139_;
								const gchar* _tmp140_;
								const gchar* _tmp141_;
								gpointer _tmp142_;
								LayoutsItemRow* _tmp143_;
								GeeHashMap* _tmp144_;
								const gchar* _tmp145_;
								const gchar* _tmp146_;
								ServicesEventBus* _tmp147_;
								ServicesEventBus* _tmp148_;
								_tmp139_ = self->priv->items;
								_tmp140_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
								_tmp141_ = _tmp140_;
								_tmp142_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp139_, _tmp141_);
								_tmp143_ = (LayoutsItemRow*) _tmp142_;
								layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp143_);
								_g_object_unref0 (_tmp143_);
								_tmp144_ = self->priv->items;
								_tmp145_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
								_tmp146_ = _tmp145_;
								gee_abstract_map_unset ((GeeAbstractMap*) _tmp144_, _tmp146_, NULL);
								_tmp147_ = services_event_bus_get_default ();
								_tmp148_ = _tmp147_;
								services_event_bus_unfocus_item (_tmp148_);
								_g_object_unref0 (_tmp148_);
							}
							views_filter_valid_add_item (self, item, TRUE);
						} else {
							ObjectsBaseObject* _tmp149_;
							_tmp149_ = self->priv->_filter;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp149_, OBJECTS_FILTERS_TYPE_UNLABELED)) {
								gboolean _tmp150_ = FALSE;
								GeeHashMap* _tmp151_;
								const gchar* _tmp152_;
								const gchar* _tmp153_;
								_tmp151_ = self->priv->items;
								_tmp152_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
								_tmp153_ = _tmp152_;
								if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp151_, _tmp153_)) {
									GeeArrayList* _tmp154_;
									GeeArrayList* _tmp155_;
									gint _tmp156_;
									gint _tmp157_;
									_tmp154_ = objects_item_get_labels (item);
									_tmp155_ = _tmp154_;
									_tmp156_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp155_);
									_tmp157_ = _tmp156_;
									_tmp150_ = _tmp157_ > 0;
								} else {
									_tmp150_ = FALSE;
								}
								if (_tmp150_) {
									GeeHashMap* _tmp158_;
									const gchar* _tmp159_;
									const gchar* _tmp160_;
									gpointer _tmp161_;
									LayoutsItemRow* _tmp162_;
									GeeHashMap* _tmp163_;
									const gchar* _tmp164_;
									const gchar* _tmp165_;
									ServicesEventBus* _tmp166_;
									ServicesEventBus* _tmp167_;
									_tmp158_ = self->priv->items;
									_tmp159_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
									_tmp160_ = _tmp159_;
									_tmp161_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp158_, _tmp160_);
									_tmp162_ = (LayoutsItemRow*) _tmp161_;
									layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp162_);
									_g_object_unref0 (_tmp162_);
									_tmp163_ = self->priv->items;
									_tmp164_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
									_tmp165_ = _tmp164_;
									gee_abstract_map_unset ((GeeAbstractMap*) _tmp163_, _tmp165_, NULL);
									_tmp166_ = services_event_bus_get_default ();
									_tmp167_ = _tmp166_;
									services_event_bus_unfocus_item (_tmp167_);
									_g_object_unref0 (_tmp167_);
								}
								views_filter_valid_add_item (self, item, TRUE);
							}
						}
					}
				}
			}
		}
	}
	views_filter_validate_placeholder (self);
}

static void
views_filter_valid_checked_item (ViewsFilter* self,
                                 ObjectsItem* item,
                                 gboolean old_checked)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	ObjectsBaseObject* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp6_ = self->priv->_filter;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, OBJECTS_FILTERS_TYPE_PRIORITY)) {
		_tmp5_ = TRUE;
	} else {
		ObjectsBaseObject* _tmp7_;
		_tmp7_ = self->priv->_filter;
		_tmp5_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, OBJECTS_FILTERS_TYPE_TOMORROW);
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		ObjectsBaseObject* _tmp8_;
		_tmp8_ = self->priv->_filter;
		_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, OBJECTS_FILTERS_TYPE_PINBOARD);
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		ObjectsBaseObject* _tmp9_;
		_tmp9_ = self->priv->_filter;
		_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, OBJECTS_FILTERS_TYPE_ANYTIME);
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		ObjectsBaseObject* _tmp10_;
		_tmp10_ = self->priv->_filter;
		_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, OBJECTS_FILTERS_TYPE_REPEATING);
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		ObjectsBaseObject* _tmp11_;
		_tmp11_ = self->priv->_filter;
		_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, OBJECTS_FILTERS_TYPE_UNLABELED);
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ObjectsBaseObject* _tmp12_;
		_tmp12_ = self->priv->_filter;
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, OBJECTS_FILTERS_TYPE_ALL_ITEMS);
	}
	if (_tmp0_) {
		if (!old_checked) {
			gboolean _tmp13_ = FALSE;
			GeeHashMap* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			_tmp14_ = self->priv->items;
			_tmp15_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp16_ = _tmp15_;
			if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp14_, _tmp16_)) {
				gboolean _tmp17_;
				gboolean _tmp18_;
				_tmp17_ = objects_item_get_completed (item);
				_tmp18_ = _tmp17_;
				_tmp13_ = _tmp18_;
			} else {
				_tmp13_ = FALSE;
			}
			if (_tmp13_) {
				GeeHashMap* _tmp19_;
				const gchar* _tmp20_;
				const gchar* _tmp21_;
				gpointer _tmp22_;
				LayoutsItemRow* _tmp23_;
				GeeHashMap* _tmp24_;
				const gchar* _tmp25_;
				const gchar* _tmp26_;
				ServicesEventBus* _tmp27_;
				ServicesEventBus* _tmp28_;
				_tmp19_ = self->priv->items;
				_tmp20_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp21_ = _tmp20_;
				_tmp22_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, _tmp21_);
				_tmp23_ = (LayoutsItemRow*) _tmp22_;
				layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp23_);
				_g_object_unref0 (_tmp23_);
				_tmp24_ = self->priv->items;
				_tmp25_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp26_ = _tmp25_;
				gee_abstract_map_unset ((GeeAbstractMap*) _tmp24_, _tmp26_, NULL);
				_tmp27_ = services_event_bus_get_default ();
				_tmp28_ = _tmp27_;
				services_event_bus_unfocus_item (_tmp28_);
				_g_object_unref0 (_tmp28_);
			}
		} else {
			views_filter_valid_update_item (self, item, "");
		}
	} else {
		ObjectsBaseObject* _tmp29_;
		_tmp29_ = self->priv->_filter;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp29_, OBJECTS_FILTERS_TYPE_COMPLETED)) {
			if (!old_checked) {
				views_filter_valid_update_item (self, item, "");
			} else {
				gboolean _tmp30_ = FALSE;
				GeeHashMap* _tmp31_;
				const gchar* _tmp32_;
				const gchar* _tmp33_;
				_tmp31_ = self->priv->items;
				_tmp32_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp33_ = _tmp32_;
				if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp31_, _tmp33_)) {
					gboolean _tmp34_;
					gboolean _tmp35_;
					_tmp34_ = objects_item_get_completed (item);
					_tmp35_ = _tmp34_;
					_tmp30_ = !_tmp35_;
				} else {
					_tmp30_ = FALSE;
				}
				if (_tmp30_) {
					GeeHashMap* _tmp36_;
					const gchar* _tmp37_;
					const gchar* _tmp38_;
					gpointer _tmp39_;
					LayoutsItemRow* _tmp40_;
					GeeHashMap* _tmp41_;
					const gchar* _tmp42_;
					const gchar* _tmp43_;
					ServicesEventBus* _tmp44_;
					ServicesEventBus* _tmp45_;
					_tmp36_ = self->priv->items;
					_tmp37_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
					_tmp38_ = _tmp37_;
					_tmp39_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp36_, _tmp38_);
					_tmp40_ = (LayoutsItemRow*) _tmp39_;
					layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp40_);
					_g_object_unref0 (_tmp40_);
					_tmp41_ = self->priv->items;
					_tmp42_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
					_tmp43_ = _tmp42_;
					gee_abstract_map_unset ((GeeAbstractMap*) _tmp41_, _tmp43_, NULL);
					_tmp44_ = services_event_bus_get_default ();
					_tmp45_ = _tmp44_;
					services_event_bus_unfocus_item (_tmp45_);
					_g_object_unref0 (_tmp45_);
				}
			}
		}
	}
	views_filter_validate_placeholder (self);
}

static void
views_filter_header_completed_function (ViewsFilter* self,
                                        GtkListBoxRow* lbrow,
                                        GtkListBoxRow* lbbefore)
{
	LayoutsItemRow* row = NULL;
	LayoutsItemRow* _tmp0_;
	LayoutsItemRow* _tmp1_;
	ObjectsItem* _tmp2_;
	ObjectsItem* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	LayoutsItemRow* _tmp27_;
	LayoutsItemRow* _tmp28_;
	ObjectsItem* _tmp29_;
	ObjectsItem* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	GDateTime* _tmp33_;
	GDateTime* _tmp34_;
	GDateTime* _tmp35_;
	GDateTime* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	GtkWidget* _tmp39_;
	GtkWidget* _tmp40_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (lbrow != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (lbrow, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
	row = _tmp0_;
	_tmp1_ = row;
	_tmp2_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_item_get_completed_at (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "") == 0) {
		_g_object_unref0 (row);
		return;
	}
	if (lbbefore != NULL) {
		LayoutsItemRow* before = NULL;
		LayoutsItemRow* _tmp6_;
		GDateTime* comp_before = NULL;
		LayoutsItemRow* _tmp7_;
		ObjectsItem* _tmp8_;
		ObjectsItem* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GDateTime* _tmp12_;
		GDateTime* _tmp13_;
		GDateTime* _tmp14_;
		GDateTime* _tmp15_;
		GDateTime* comp_after = NULL;
		LayoutsItemRow* _tmp16_;
		ObjectsItem* _tmp17_;
		ObjectsItem* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		GDateTime* _tmp21_;
		GDateTime* _tmp22_;
		GDateTime* _tmp23_;
		GDateTime* _tmp24_;
		GDateTime* _tmp25_;
		GDateTime* _tmp26_;
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (lbbefore, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
		before = _tmp6_;
		_tmp7_ = before;
		_tmp8_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = objects_item_get_completed_at (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = utils_datetime_get_date_from_string (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = utils_datetime_get_date_only (_tmp13_);
		_tmp15_ = _tmp14_;
		_g_date_time_unref0 (_tmp13_);
		comp_before = _tmp15_;
		_tmp16_ = row;
		_tmp17_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = objects_item_get_completed_at (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = utils_datetime_get_date_from_string (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = utils_datetime_get_date_only (_tmp22_);
		_tmp24_ = _tmp23_;
		_g_date_time_unref0 (_tmp22_);
		comp_after = _tmp24_;
		_tmp25_ = comp_before;
		_tmp26_ = comp_after;
		if (g_date_time_compare (_tmp25_, _tmp26_) == 0) {
			_g_date_time_unref0 (comp_after);
			_g_date_time_unref0 (comp_before);
			_g_object_unref0 (before);
			_g_object_unref0 (row);
			return;
		}
		_g_date_time_unref0 (comp_after);
		_g_date_time_unref0 (comp_before);
		_g_object_unref0 (before);
	}
	_tmp27_ = row;
	_tmp28_ = row;
	_tmp29_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = objects_item_get_completed_at (_tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = utils_datetime_get_date_from_string (_tmp32_);
	_tmp34_ = _tmp33_;
	_tmp35_ = utils_datetime_get_date_only (_tmp34_);
	_tmp36_ = _tmp35_;
	_tmp37_ = utils_datetime_get_relative_date_from_date (_tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = views_filter_get_header_box (self, _tmp38_);
	_tmp40_ = _tmp39_;
	gtk_list_box_row_set_header ((GtkListBoxRow*) _tmp27_, _tmp40_);
	_g_object_unref0 (_tmp40_);
	_g_free0 (_tmp38_);
	_g_date_time_unref0 (_tmp36_);
	_g_date_time_unref0 (_tmp34_);
	_g_object_unref0 (row);
}

static void
views_filter_header_project_function (ViewsFilter* self,
                                      GtkListBoxRow* lbrow,
                                      GtkListBoxRow* lbbefore)
{
	LayoutsItemRow* row = NULL;
	LayoutsItemRow* _tmp0_;
	gboolean _tmp1_ = FALSE;
	LayoutsItemRow* _tmp10_;
	LayoutsItemRow* _tmp11_;
	ObjectsItem* _tmp12_;
	ObjectsItem* _tmp13_;
	ObjectsProject* _tmp14_;
	ObjectsProject* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	GtkWidget* _tmp18_;
	GtkWidget* _tmp19_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (lbrow != NULL);
	if (!LAYOUTS_IS_ITEM_ROW (lbrow)) {
		return;
	}
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (lbrow, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
	row = _tmp0_;
	if (lbbefore != NULL) {
		_tmp1_ = LAYOUTS_IS_ITEM_ROW (lbbefore);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		LayoutsItemRow* before = NULL;
		LayoutsItemRow* _tmp2_;
		LayoutsItemRow* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		LayoutsItemRow* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (lbbefore, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
		before = _tmp2_;
		_tmp3_ = row;
		_tmp4_ = layouts_item_row_get_project_id (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = before;
		_tmp7_ = layouts_item_row_get_project_id (_tmp6_);
		_tmp8_ = _tmp7_;
		if (g_strcmp0 (_tmp5_, _tmp8_) == 0) {
			LayoutsItemRow* _tmp9_;
			_tmp9_ = row;
			gtk_list_box_row_set_header ((GtkListBoxRow*) _tmp9_, NULL);
			_g_object_unref0 (before);
			_g_object_unref0 (row);
			return;
		}
		_g_object_unref0 (before);
	}
	_tmp10_ = row;
	_tmp11_ = row;
	_tmp12_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = objects_item_get_project (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = views_filter_get_header_box (self, _tmp17_);
	_tmp19_ = _tmp18_;
	gtk_list_box_row_set_header ((GtkListBoxRow*) _tmp10_, _tmp19_);
	_g_object_unref0 (_tmp19_);
	_g_object_unref0 (row);
}

static void
views_filter_validate_placeholder (ViewsFilter* self)
{
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkStack* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp1_ = views_filter_get_has_items (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = "listbox";
	} else {
		_tmp0_ = "placeholder";
	}
	_tmp3_ = self->priv->listbox_stack;
	gtk_stack_set_visible_child_name (_tmp3_, _tmp0_);
	views_filter_invalidate_listbox (self);
}

static Block74Data*
block74_data_ref (Block74Data* _data74_)
{
	g_atomic_int_inc (&_data74_->_ref_count_);
	return _data74_;
}

static void
block74_data_unref (void * _userdata_)
{
	Block74Data* _data74_;
	_data74_ = (Block74Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data74_->_ref_count_)) {
		ViewsFilter* self;
		self = _data74_->self;
		_g_object_unref0 (_data74_->header_box);
		_g_object_unref0 (self);
		g_slice_free (Block74Data, _data74_);
	}
}

static Block75Data*
block75_data_ref (Block75Data* _data75_)
{
	g_atomic_int_inc (&_data75_->_ref_count_);
	return _data75_;
}

static void
block75_data_unref (void * _userdata_)
{
	Block75Data* _data75_;
	_data75_ = (Block75Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data75_->_ref_count_)) {
		ViewsFilter* self;
		self = _data75_->_data74_->self;
		block74_data_unref (_data75_->_data74_);
		_data75_->_data74_ = NULL;
		g_slice_free (Block75Data, _data75_);
	}
}

static void
___lambda876_ (Block75Data* _data75_,
               gboolean active,
               const gchar* focused_item_id)
{
	Block74Data* _data74_;
	ViewsFilter* self;
	GtkBox* _tmp0_;
	_data74_ = _data75_->_data74_;
	self = _data74_->self;
	g_return_if_fail (focused_item_id != NULL);
	_tmp0_ = _data74_->header_box;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, !active);
}

static void
____lambda876__services_event_bus_dim_content (ServicesEventBus* _sender,
                                               gboolean active,
                                               const gchar* focused_item_id,
                                               gpointer self)
{
	___lambda876_ (self, active, focused_item_id);
}

static void
___lambda877_ (Block75Data* _data75_)
{
	Block74Data* _data74_;
	ViewsFilter* self;
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	_data74_ = _data75_->_data74_;
	self = _data74_->self;
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	g_signal_handler_disconnect ((GObject*) _tmp1_, _data75_->handler_id);
	_g_object_unref0 (_tmp1_);
}

static void
____lambda877__gtk_widget_destroy (GtkWidget* _sender,
                                   gpointer self)
{
	___lambda877_ (self);
}

static GtkWidget*
views_filter_get_header_box (ViewsFilter* self,
                             const gchar* title)
{
	Block74Data* _data74_;
	GtkLabel* header_label = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	GtkLabel* _tmp2_ = NULL;
	GtkBox* _tmp3_ = NULL;
	GtkBox* _tmp4_;
	GtkLabel* _tmp5_;
	ServicesSettings* _tmp6_;
	ServicesSettings* _tmp7_;
	GSettings* _tmp8_;
	gboolean _tmp9_;
	GtkBox* _tmp15_;
	GtkWidget* _tmp16_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	_data74_ = g_slice_new0 (Block74Data);
	_data74_->_ref_count_ = 1;
	_data74_->self = g_object_ref (self);
	_tmp0_ = g_strdup ("font-bold");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = (GtkLabel*) gtk_label_new (title);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp2_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp2_);
	header_label = _tmp2_;
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp3_, 34);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 6);
	g_object_ref_sink (_tmp3_);
	_data74_->header_box = _tmp3_;
	_tmp4_ = _data74_->header_box;
	_tmp5_ = header_label;
	gtk_box_append (_tmp4_, (GtkWidget*) _tmp5_);
	_tmp6_ = services_settings_get_default ();
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_->settings;
	_tmp9_ = g_settings_get_boolean (_tmp8_, "attention-at-one");
	_g_object_unref0 (_tmp7_);
	if (_tmp9_) {
		Block75Data* _data75_;
		ServicesEventBus* _tmp10_;
		ServicesEventBus* _tmp11_;
		gulong _tmp12_;
		gulong _tmp13_;
		GtkBox* _tmp14_;
		_data75_ = g_slice_new0 (Block75Data);
		_data75_->_ref_count_ = 1;
		_data75_->_data74_ = block74_data_ref (_data74_);
		_tmp10_ = services_event_bus_get_default ();
		_tmp11_ = _tmp10_;
		_tmp12_ = g_signal_connect_data (_tmp11_, "dim-content", (GCallback) ____lambda876__services_event_bus_dim_content, block75_data_ref (_data75_), (GClosureNotify) block75_data_unref, 0);
		_tmp13_ = _tmp12_;
		_g_object_unref0 (_tmp11_);
		_data75_->handler_id = _tmp13_;
		_tmp14_ = _data74_->header_box;
		g_signal_connect_data ((GtkWidget*) _tmp14_, "destroy", (GCallback) ____lambda877__gtk_widget_destroy, block75_data_ref (_data75_), (GClosureNotify) block75_data_unref, 0);
		block75_data_unref (_data75_);
		_data75_ = NULL;
	}
	_tmp15_ = _data74_->header_box;
	_tmp16_ = _g_object_ref0 ((GtkWidget*) _tmp15_);
	result = _tmp16_;
	_g_object_unref0 (header_label);
	block74_data_unref (_data74_);
	_data74_ = NULL;
	return result;
}

static Block76Data*
block76_data_ref (Block76Data* _data76_)
{
	g_atomic_int_inc (&_data76_->_ref_count_);
	return _data76_;
}

static void
block76_data_unref (void * _userdata_)
{
	Block76Data* _data76_;
	_data76_ = (Block76Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data76_->_ref_count_)) {
		ViewsFilter* self;
		self = _data76_->self;
		_g_object_unref0 (_data76_->items_checked);
		_g_object_unref0 (self);
		g_slice_free (Block76Data, _data76_);
	}
}

static void
__lambda882_ (Block76Data* _data76_,
              const gchar* response)
{
	ViewsFilter* self;
	self = _data76_->self;
	g_return_if_fail (response != NULL);
	if (g_strcmp0 (response, "delete") == 0) {
		{
			GeeArrayList* _item_list = NULL;
			gint _item_size = 0;
			GeeArrayList* _tmp0_;
			gint _tmp1_;
			gint _tmp2_;
			gint _item_index = 0;
			_item_list = _data76_->items_checked;
			_tmp0_ = _item_list;
			_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
			_tmp2_ = _tmp1_;
			_item_size = _tmp2_;
			_item_index = -1;
			while (TRUE) {
				gint _tmp3_;
				gint _tmp4_;
				ObjectsItem* item = NULL;
				GeeArrayList* _tmp5_;
				gpointer _tmp6_;
				ObjectsItem* _tmp7_;
				_item_index = _item_index + 1;
				_tmp3_ = _item_index;
				_tmp4_ = _item_size;
				if (!(_tmp3_ < _tmp4_)) {
					break;
				}
				_tmp5_ = _item_list;
				_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, _item_index);
				item = (ObjectsItem*) _tmp6_;
				_tmp7_ = item;
				objects_item_delete_item (_tmp7_);
				_g_object_unref0 (item);
			}
		}
	}
}

static void
___lambda882__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                         const gchar* response,
                                         gpointer self)
{
	__lambda882_ (self, response);
}

static void
__lambda881_ (ViewsFilter* self)
{
	Block76Data* _data76_;
	ServicesStore* _tmp0_;
	GeeArrayList* _tmp1_;
	AdwAlertDialog* dialog = NULL;
	gint _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	AdwAlertDialog* _tmp10_;
	AdwAlertDialog* _tmp11_;
	Planify* _tmp12_;
	MainWindow* _tmp13_;
	_data76_ = g_slice_new0 (Block76Data);
	_data76_->_ref_count_ = 1;
	_data76_->self = g_object_ref (self);
	_tmp0_ = services_store_instance ();
	_tmp1_ = services_store_get_items_checked (_tmp0_);
	_data76_->items_checked = _tmp1_;
	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data76_->items_checked);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data76_->items_checked);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data76_->items_checked);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf (ngettext ("This will delete %d completed task and its subtasks", "This will delete %d completed tasks and their subtasks", (gulong) _tmp5_), _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = (AdwAlertDialog*) adw_alert_dialog_new (ngettext ("Delete Completed Task", "Delete Completed Tasks", (gulong) _tmp3_), _tmp9_);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	_g_free0 (_tmp9_);
	dialog = _tmp11_;
	adw_alert_dialog_set_body_use_markup (dialog, TRUE);
	adw_alert_dialog_add_response (dialog, "cancel", _ ("Cancel"));
	adw_alert_dialog_add_response (dialog, "delete", _ ("Delete"));
	adw_alert_dialog_set_response_appearance (dialog, "delete", ADW_RESPONSE_DESTRUCTIVE);
	_tmp12_ = planify__instance;
	_tmp13_ = _tmp12_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp13_);
	g_signal_connect_data (dialog, "response", (GCallback) ___lambda882__adw_alert_dialog_response, block76_data_ref (_data76_), (GClosureNotify) block76_data_unref, 0);
	_g_object_unref0 (dialog);
	block76_data_unref (_data76_);
	_data76_ = NULL;
}

static void
___lambda881__widgets_context_menu_menu_item_activate_item (WidgetsContextMenuMenuItem* _sender,
                                                            gpointer self)
{
	__lambda881_ ((ViewsFilter*) self);
}

static GtkPopover*
views_filter_build_view_setting_popover (ViewsFilter* self)
{
	WidgetsContextMenuMenuItem* delete_all_completed = NULL;
	WidgetsContextMenuMenuItem* _tmp0_;
	GtkBox* menu_box = NULL;
	GtkBox* _tmp1_;
	GtkPopover* popover = NULL;
	GtkWidget* _tmp2_;
	GtkPopover* _tmp3_ = NULL;
	GtkPopover* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = widgets_context_menu_menu_item_new (_ ("Delete All Completed Tasks"), "user-trash-symbolic");
	g_object_ref_sink (_tmp0_);
	delete_all_completed = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) delete_all_completed, "menu-item-danger");
	_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp1_);
	menu_box = _tmp1_;
	gtk_widget_set_margin_bottom ((GtkWidget*) menu_box, 3);
	gtk_widget_set_margin_top ((GtkWidget*) menu_box, 3);
	gtk_box_append (menu_box, (GtkWidget*) delete_all_completed);
	_tmp2_ = _g_object_ref0 ((GtkWidget*) menu_box);
	_tmp3_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp3_, FALSE);
	gtk_popover_set_position (_tmp3_, GTK_POS_BOTTOM);
	gtk_popover_set_child (_tmp3_, _tmp2_);
	_g_object_unref0 (_tmp2_);
	g_object_set ((GtkWidget*) _tmp3_, "width-request", 250, NULL);
	g_object_ref_sink (_tmp3_);
	popover = _tmp3_;
	g_signal_connect_object (delete_all_completed, "activate-item", (GCallback) ___lambda881__widgets_context_menu_menu_item_activate_item, self, 0);
	result = popover;
	_g_object_unref0 (menu_box);
	_g_object_unref0 (delete_all_completed);
	return result;
}

static void
views_filter_invalidate_listbox (ViewsFilter* self)
{
	GtkListBox* _tmp0_;
	GtkListBox* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listbox;
	gtk_list_box_invalidate_sort (_tmp0_);
	_tmp1_ = self->priv->listbox;
	gtk_list_box_invalidate_headers (_tmp1_);
}

static gint
views_filter_sort_completed_function (ViewsFilter* self,
                                      ObjectsItem* a,
                                      ObjectsItem* b)
{
	GDateTime* completed_a = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	GDateTime* _tmp4_;
	GDateTime* _tmp5_;
	GDateTime* completed_b = NULL;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GDateTime* _tmp8_;
	GDateTime* _tmp9_;
	GDateTime* _tmp10_;
	GDateTime* _tmp11_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (a != NULL, -1);
	g_return_val_if_fail (b != NULL, -1);
	_tmp0_ = objects_item_get_completed_at (a);
	_tmp1_ = _tmp0_;
	_tmp2_ = utils_datetime_get_date_from_string (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = utils_datetime_get_date_only (_tmp3_);
	_tmp5_ = _tmp4_;
	_g_date_time_unref0 (_tmp3_);
	completed_a = _tmp5_;
	_tmp6_ = objects_item_get_completed_at (b);
	_tmp7_ = _tmp6_;
	_tmp8_ = utils_datetime_get_date_from_string (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = utils_datetime_get_date_only (_tmp9_);
	_tmp11_ = _tmp10_;
	_g_date_time_unref0 (_tmp9_);
	completed_b = _tmp11_;
	result = g_date_time_compare (completed_b, completed_a);
	_g_date_time_unref0 (completed_b);
	_g_date_time_unref0 (completed_a);
	return result;
}

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

void
views_filter_clean_up (ViewsFilter* self)
{
	GtkListBox* _tmp0_;
	GtkListBox* _tmp1_;
	Util* _tmp2_;
	Util* _tmp3_;
	GtkListBox* _tmp4_;
	GList* _tmp5_;
	GList* _tmp6_;
	GeeHashMap* _tmp24_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listbox;
	gtk_list_box_set_sort_func (_tmp0_, NULL, NULL, NULL);
	_tmp1_ = self->priv->listbox;
	gtk_list_box_set_header_func (_tmp1_, NULL, NULL, NULL);
	_tmp2_ = util_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->listbox;
	_tmp5_ = util_get_children (_tmp3_, _tmp4_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp3_);
	{
		GList* row_collection = NULL;
		GList* row_it = NULL;
		row_collection = _tmp6_;
		for (row_it = row_collection; row_it != NULL; row_it = row_it->next) {
			GtkListBoxRow* _tmp7_;
			GtkListBoxRow* row = NULL;
			_tmp7_ = _g_object_ref0 ((GtkListBoxRow*) row_it->data);
			row = _tmp7_;
			{
				GtkListBoxRow* _tmp8_;
				_tmp8_ = row;
				layouts_item_base_clean_up ((LayoutsItemBase*) G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
				_g_object_unref0 (row);
			}
		}
		(row_collection == NULL) ? NULL : (row_collection = (_g_list_free__g_object_unref0_ (row_collection), NULL));
	}
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp9_;
		GeeSet* _tmp10_;
		GeeSet* _tmp11_;
		GeeSet* _tmp12_;
		GeeIterator* _tmp13_;
		GeeIterator* _tmp14_;
		_tmp9_ = self->priv->signal_map;
		_tmp10_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
		_tmp14_ = _tmp13_;
		_g_object_unref0 (_tmp12_);
		_entry_it = _tmp14_;
		while (TRUE) {
			GeeIterator* _tmp15_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp16_;
			gpointer _tmp17_;
			GeeMapEntry* _tmp18_;
			gconstpointer _tmp19_;
			gconstpointer _tmp20_;
			GeeMapEntry* _tmp21_;
			gconstpointer _tmp22_;
			gconstpointer _tmp23_;
			_tmp15_ = _entry_it;
			if (!gee_iterator_next (_tmp15_)) {
				break;
			}
			_tmp16_ = _entry_it;
			_tmp17_ = gee_iterator_get (_tmp16_);
			entry = (GeeMapEntry*) _tmp17_;
			_tmp18_ = entry;
			_tmp19_ = gee_map_entry_get_value (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = entry;
			_tmp22_ = gee_map_entry_get_key (_tmp21_);
			_tmp23_ = _tmp22_;
			g_signal_handler_disconnect ((GObject*) _tmp20_, (gulong) ((guintptr) _tmp23_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp24_ = self->priv->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp24_);
}

ObjectsBaseObject*
views_filter_get_filter (ViewsFilter* self)
{
	ObjectsBaseObject* result;
	ObjectsBaseObject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter;
	result = _tmp0_;
	return result;
}

static void
views_filter_set_filter (ViewsFilter* self,
                         ObjectsBaseObject* value)
{
	ObjectsBaseObject* old_value;
	g_return_if_fail (self != NULL);
	old_value = views_filter_get_filter (self);
	if (old_value != value) {
		ObjectsBaseObject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_filter);
		self->priv->_filter = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, views_filter_properties[VIEWS_FILTER_FILTER_PROPERTY]);
	}
}

static gboolean
views_filter_get_has_items (ViewsFilter* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	GeeArrayList* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->items_list;
	if (_tmp1_ != NULL) {
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->items_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ > 0;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static Block77Data*
block77_data_ref (Block77Data* _data77_)
{
	g_atomic_int_inc (&_data77_->_ref_count_);
	return _data77_;
}

static void
block77_data_unref (void * _userdata_)
{
	Block77Data* _data77_;
	_data77_ = (Block77Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data77_->_ref_count_)) {
		ViewsFilter* self;
		self = _data77_->self;
		_g_object_unref0 (_data77_->scrolled_window);
		_g_object_unref0 (_data77_->title_box);
		_g_object_unref0 (self);
		g_slice_free (Block77Data, _data77_);
	}
}

static gboolean
_views_filter___lambda883_ (ViewsFilter* self)
{
	gboolean result;
	views_filter_validate_placeholder (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
__views_filter___lambda883__gsource_func (gpointer self)
{
	gboolean result;
	result = _views_filter___lambda883_ ((ViewsFilter*) self);
	return result;
}

static void
_views_filter_valid_add_item_services_store_item_added (ServicesStore* _sender,
                                                        ObjectsItem* item,
                                                        gboolean insert,
                                                        gpointer self)
{
	views_filter_valid_add_item ((ViewsFilter*) self, item, insert);
}

static void
_views_filter_valid_delete_item_services_store_item_deleted (ServicesStore* _sender,
                                                             ObjectsItem* item,
                                                             gpointer self)
{
	views_filter_valid_delete_item ((ViewsFilter*) self, item);
}

static void
_views_filter_valid_update_item_services_store_item_updated (ServicesStore* _sender,
                                                             ObjectsItem* item,
                                                             const gchar* update_id,
                                                             gpointer self)
{
	views_filter_valid_update_item ((ViewsFilter*) self, item, update_id);
}

static void
_views_filter_valid_checked_item_services_event_bus_checked_toggled (ServicesEventBus* _sender,
                                                                     ObjectsItem* item,
                                                                     gboolean old_checked,
                                                                     gpointer self)
{
	views_filter_valid_checked_item ((ViewsFilter*) self, item, old_checked);
}

static void
_views_filter_valid_delete_item_services_store_item_archived (ServicesStore* _sender,
                                                              ObjectsItem* item,
                                                              gpointer self)
{
	views_filter_valid_delete_item ((ViewsFilter*) self, item);
}

static void
_views_filter___lambda884_ (ViewsFilter* self,
                            ObjectsItem* item)
{
	g_return_if_fail (item != NULL);
	views_filter_valid_add_item (self, item, TRUE);
}

static void
__views_filter___lambda884__services_store_item_unarchived (ServicesStore* _sender,
                                                            ObjectsItem* item,
                                                            gpointer self)
{
	_views_filter___lambda884_ ((ViewsFilter*) self, item);
}

static void
_views_filter___lambda885_ (ViewsFilter* self,
                            ObjectsItem* item)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->items;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gpointer _tmp6_;
		LayoutsItemRow* _tmp7_;
		_tmp3_ = self->priv->items;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (LayoutsItemRow*) _tmp6_;
		layouts_item_base_update_request ((LayoutsItemBase*) _tmp7_);
		_g_object_unref0 (_tmp7_);
	}
}

static void
__views_filter___lambda885__services_event_bus_item_moved (ServicesEventBus* _sender,
                                                           ObjectsItem* item,
                                                           const gchar* old_project_id,
                                                           const gchar* old_section_id,
                                                           const gchar* old_parent_id,
                                                           gpointer self)
{
	_views_filter___lambda885_ ((ViewsFilter*) self, item);
}

static void
_views_filter___lambda886_ (ViewsFilter* self)
{
	views_filter_prepare_new_item (self, "");
}

static void
__views_filter___lambda886__widgets_magic_button_clicked (WidgetsMagicButton* _sender,
                                                          gpointer self)
{
	_views_filter___lambda886_ ((ViewsFilter*) self);
}

static void
_views_filter___lambda887_ (ViewsFilter* self)
{
	views_filter_update_request (self);
}

static void
__views_filter___lambda887__services_event_bus_theme_changed (ServicesEventBus* _sender,
                                                              gpointer self)
{
	_views_filter___lambda887_ ((ViewsFilter*) self);
}

static void
_views_filter___lambda888_ (Block77Data* _data77_)
{
	ViewsFilter* self;
	LayoutsHeaderBar* _tmp0_;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	self = _data77_->self;
	_tmp0_ = self->priv->headerbar;
	_tmp1_ = _data77_->scrolled_window;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_adjustment_get_value (_tmp3_);
	_tmp5_ = _tmp4_;
	layouts_header_bar_revealer_title_box (_tmp0_, _tmp5_ >= ((gdouble) CONSTANTS_HEADERBAR_TITLE_SCROLL_THRESHOLD));
}

static void
__views_filter___lambda888__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                          gpointer self)
{
	_views_filter___lambda888_ (self);
}

static void
_views_filter___lambda889_ (ViewsFilter* self)
{
	views_filter_load_next_page (self);
}

static void
__views_filter___lambda889__gtk_button_clicked (GtkButton* _sender,
                                                gpointer self)
{
	_views_filter___lambda889_ ((ViewsFilter*) self);
}

static void
_views_filter___lambda890_ (Block77Data* _data77_,
                            gboolean active,
                            const gchar* focused_item_id)
{
	ViewsFilter* self;
	GtkBox* _tmp0_;
	self = _data77_->self;
	g_return_if_fail (focused_item_id != NULL);
	_tmp0_ = _data77_->title_box;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, !active);
}

static void
__views_filter___lambda890__services_event_bus_dim_content (ServicesEventBus* _sender,
                                                            gboolean active,
                                                            const gchar* focused_item_id,
                                                            gpointer self)
{
	_views_filter___lambda890_ (self, active, focused_item_id);
}

static GObject *
views_filter_constructor (GType type,
                          guint n_construct_properties,
                          GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ViewsFilter * self;
	Block77Data* _data77_;
	GtkImage* _tmp0_ = NULL;
	GtkImage* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	GtkLabel* _tmp5_ = NULL;
	GtkBox* _tmp6_ = NULL;
	GtkBox* _tmp7_;
	GtkImage* _tmp8_;
	GtkBox* _tmp9_;
	GtkLabel* _tmp10_;
	GtkMenuButton* view_setting_button = NULL;
	GtkPopover* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar** _tmp14_;
	gchar* _tmp15_;
	GtkMenuButton* _tmp16_ = NULL;
	GtkMenuButton* _tmp17_;
	GtkWidget* _tmp18_;
	GtkRevealer* _tmp19_ = NULL;
	LayoutsHeaderBar* _tmp20_;
	LayoutsHeaderBar* _tmp21_;
	GtkRevealer* _tmp22_;
	gchar* _tmp23_;
	gchar** _tmp24_;
	GtkListBox* _tmp25_ = NULL;
	GtkButton* _tmp26_ = NULL;
	GtkButton* _tmp27_;
	GtkButton* _tmp28_;
	GtkWidget* _tmp29_;
	GtkRevealer* _tmp30_ = NULL;
	GtkBox* listbox_box = NULL;
	GtkBox* _tmp31_ = NULL;
	GtkBox* _tmp32_;
	GtkListBox* _tmp33_;
	GtkBox* _tmp34_;
	GtkRevealer* _tmp35_;
	AdwStatusPage* listbox_placeholder = NULL;
	AdwStatusPage* _tmp36_;
	AdwStatusPage* _tmp37_;
	AdwStatusPage* _tmp38_;
	AdwStatusPage* _tmp39_;
	ObjectsBaseObject* _tmp40_;
	GtkStack* _tmp43_ = NULL;
	GtkStack* _tmp44_;
	GtkBox* _tmp45_;
	GtkStack* _tmp46_;
	AdwStatusPage* _tmp47_;
	GtkBox* content = NULL;
	GtkBox* _tmp48_ = NULL;
	GtkBox* _tmp49_;
	GtkBox* _tmp50_;
	GtkBox* _tmp51_;
	GtkStack* _tmp52_;
	AdwClamp* content_clamp = NULL;
	GtkBox* _tmp53_;
	GtkWidget* _tmp54_;
	AdwClamp* _tmp55_ = NULL;
	AdwClamp* _tmp56_;
	GtkWidget* _tmp57_;
	GtkScrolledWindow* _tmp58_ = NULL;
	WidgetsMagicButton* _tmp59_;
	GtkOverlay* content_overlay = NULL;
	GtkScrolledWindow* _tmp60_;
	GtkWidget* _tmp61_;
	GtkOverlay* _tmp62_ = NULL;
	GtkOverlay* _tmp63_;
	WidgetsMagicButton* _tmp64_;
	AdwToolbarView* toolbar_view = NULL;
	GtkOverlay* _tmp65_;
	GtkWidget* _tmp66_;
	AdwToolbarView* _tmp67_ = NULL;
	AdwToolbarView* _tmp68_;
	LayoutsHeaderBar* _tmp69_;
	AdwToolbarView* _tmp70_;
	GtkStack* _tmp71_;
	guint _tmp72_;
	guint _tmp73_;
	GeeHashMap* _tmp74_;
	ServicesStore* _tmp75_;
	gulong _tmp76_;
	ServicesStore* _tmp77_;
	GeeHashMap* _tmp78_;
	ServicesStore* _tmp79_;
	gulong _tmp80_;
	ServicesStore* _tmp81_;
	GeeHashMap* _tmp82_;
	ServicesStore* _tmp83_;
	gulong _tmp84_;
	ServicesStore* _tmp85_;
	GeeHashMap* _tmp86_;
	ServicesEventBus* _tmp87_;
	ServicesEventBus* _tmp88_;
	gulong _tmp89_;
	ServicesEventBus* _tmp90_;
	ServicesEventBus* _tmp91_;
	GeeHashMap* _tmp92_;
	ServicesStore* _tmp93_;
	gulong _tmp94_;
	ServicesStore* _tmp95_;
	GeeHashMap* _tmp96_;
	ServicesStore* _tmp97_;
	gulong _tmp98_;
	ServicesStore* _tmp99_;
	GeeHashMap* _tmp100_;
	ServicesEventBus* _tmp101_;
	ServicesEventBus* _tmp102_;
	gulong _tmp103_;
	ServicesEventBus* _tmp104_;
	ServicesEventBus* _tmp105_;
	GeeHashMap* _tmp106_;
	WidgetsMagicButton* _tmp107_;
	gulong _tmp108_;
	WidgetsMagicButton* _tmp109_;
	GeeHashMap* _tmp110_;
	ServicesEventBus* _tmp111_;
	ServicesEventBus* _tmp112_;
	gulong _tmp113_;
	ServicesEventBus* _tmp114_;
	ServicesEventBus* _tmp115_;
	GeeHashMap* _tmp116_;
	GtkScrolledWindow* _tmp117_;
	GtkAdjustment* _tmp118_;
	GtkAdjustment* _tmp119_;
	gulong _tmp120_;
	GtkScrolledWindow* _tmp121_;
	GtkAdjustment* _tmp122_;
	GtkAdjustment* _tmp123_;
	GeeHashMap* _tmp124_;
	GtkButton* _tmp125_;
	gulong _tmp126_;
	GtkButton* _tmp127_;
	GeeHashMap* _tmp128_;
	ServicesEventBus* _tmp129_;
	ServicesEventBus* _tmp130_;
	gulong _tmp131_;
	ServicesEventBus* _tmp132_;
	ServicesEventBus* _tmp133_;
	parent_class = G_OBJECT_CLASS (views_filter_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIEWS_TYPE_FILTER, ViewsFilter);
	_data77_ = g_slice_new0 (Block77Data);
	_data77_->_ref_count_ = 1;
	_data77_->self = g_object_ref (self);
	_tmp0_ = (GtkImage*) gtk_image_new ();
	gtk_image_set_pixel_size (_tmp0_, 16);
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->title_icon);
	self->priv->title_icon = _tmp0_;
	_tmp1_ = self->priv->title_icon;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "view-icon");
	_tmp2_ = g_strdup ("font-bold");
	_tmp3_ = g_strdup ("title-2");
	_tmp4_ = g_new0 (gchar*, 2 + 1);
	_tmp4_[0] = _tmp2_;
	_tmp4_[1] = _tmp3_;
	_tmp5_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp5_, _tmp4_);
	_tmp4_ = (_vala_array_free (_tmp4_, 2, (GDestroyNotify) g_free), NULL);
	gtk_label_set_ellipsize (_tmp5_, PANGO_ELLIPSIZE_END);
	gtk_widget_set_halign ((GtkWidget*) _tmp5_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->title_label);
	self->priv->title_label = _tmp5_;
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp6_, 30);
	g_object_ref_sink (_tmp6_);
	_data77_->title_box = _tmp6_;
	_tmp7_ = _data77_->title_box;
	_tmp8_ = self->priv->title_icon;
	gtk_box_append (_tmp7_, (GtkWidget*) _tmp8_);
	_tmp9_ = _data77_->title_box;
	_tmp10_ = self->priv->title_label;
	gtk_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = views_filter_build_view_setting_popover (self);
	_tmp12_ = g_strdup ("view-sort-descending-rtl-symbolic");
	_tmp13_ = g_strdup ("flat");
	_tmp14_ = g_new0 (gchar*, 1 + 1);
	_tmp14_[0] = _tmp13_;
	_tmp15_ = g_strdup (_ ("View Option Menu"));
	_tmp16_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp16_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp16_, GTK_ALIGN_CENTER);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp16_, 12);
	gtk_menu_button_set_popover (_tmp16_, _tmp11_);
	_g_object_unref0 (_tmp11_);
	gtk_menu_button_set_icon_name (_tmp16_, _tmp12_);
	_g_free0 (_tmp12_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp16_, _tmp14_);
	_tmp14_ = (_vala_array_free (_tmp14_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp16_, _tmp15_);
	_g_free0 (_tmp15_);
	g_object_ref_sink (_tmp16_);
	view_setting_button = _tmp16_;
	_tmp17_ = view_setting_button;
	_tmp18_ = _g_object_ref0 ((GtkWidget*) _tmp17_);
	_tmp19_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp19_, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE);
	gtk_revealer_set_child (_tmp19_, _tmp18_);
	_g_object_unref0 (_tmp18_);
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (self->priv->view_setting_revealer);
	self->priv->view_setting_revealer = _tmp19_;
	_tmp20_ = layouts_header_bar_new ();
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->headerbar);
	self->priv->headerbar = _tmp20_;
	_tmp21_ = self->priv->headerbar;
	_tmp22_ = self->priv->view_setting_revealer;
	layouts_header_bar_pack_end (_tmp21_, (GtkWidget*) _tmp22_);
	_tmp23_ = g_strdup ("listbox-background");
	_tmp24_ = g_new0 (gchar*, 1 + 1);
	_tmp24_[0] = _tmp23_;
	_tmp25_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp25_, GTK_ALIGN_START);
	gtk_list_box_set_selection_mode (_tmp25_, GTK_SELECTION_NONE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp25_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp25_, _tmp24_);
	_tmp24_ = (_vala_array_free (_tmp24_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->listbox);
	self->priv->listbox = _tmp25_;
	_tmp26_ = (GtkButton*) gtk_button_new_with_label (_ ("Load more"));
	gtk_widget_set_margin_start ((GtkWidget*) _tmp26_, 20);
	gtk_widget_set_halign ((GtkWidget*) _tmp26_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->priv->load_more_button);
	self->priv->load_more_button = _tmp26_;
	_tmp27_ = self->priv->load_more_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp27_, "flat");
	_tmp28_ = self->priv->load_more_button;
	_tmp29_ = _g_object_ref0 ((GtkWidget*) _tmp28_);
	_tmp30_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp30_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_reveal_child (_tmp30_, FALSE);
	gtk_revealer_set_child (_tmp30_, _tmp29_);
	_g_object_unref0 (_tmp29_);
	g_object_ref_sink (_tmp30_);
	_g_object_unref0 (self->priv->load_more_button_revealer);
	self->priv->load_more_button_revealer = _tmp30_;
	_tmp31_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp31_, 24);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp31_, 12);
	g_object_ref_sink (_tmp31_);
	listbox_box = _tmp31_;
	_tmp32_ = listbox_box;
	_tmp33_ = self->priv->listbox;
	gtk_box_append (_tmp32_, (GtkWidget*) _tmp33_);
	_tmp34_ = listbox_box;
	_tmp35_ = self->priv->load_more_button_revealer;
	gtk_box_append (_tmp34_, (GtkWidget*) _tmp35_);
	_tmp36_ = (AdwStatusPage*) adw_status_page_new ();
	g_object_ref_sink (_tmp36_);
	listbox_placeholder = _tmp36_;
	_tmp37_ = listbox_placeholder;
	adw_status_page_set_icon_name (_tmp37_, "check-round-outline-symbolic");
	_tmp38_ = listbox_placeholder;
	adw_status_page_set_title (_tmp38_, _ ("Add Some Tasks"));
	_tmp39_ = listbox_placeholder;
	adw_status_page_set_description (_tmp39_, _ ("Press 'a' to create a new task"));
	_tmp40_ = self->priv->_filter;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp40_, OBJECTS_FILTERS_TYPE_COMPLETED)) {
		AdwStatusPage* _tmp41_;
		AdwStatusPage* _tmp42_;
		_tmp41_ = listbox_placeholder;
		adw_status_page_set_title (_tmp41_, _ ("All tasks completed!"));
		_tmp42_ = listbox_placeholder;
		adw_status_page_set_description (_tmp42_, _ ("Great job, nothing left to do 🎉"));
	}
	_tmp43_ = (GtkStack*) gtk_stack_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp43_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp43_, TRUE);
	gtk_stack_set_transition_type (_tmp43_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp43_);
	_g_object_unref0 (self->priv->listbox_stack);
	self->priv->listbox_stack = _tmp43_;
	_tmp44_ = self->priv->listbox_stack;
	_tmp45_ = listbox_box;
	gtk_stack_add_named (_tmp44_, (GtkWidget*) _tmp45_, "listbox");
	_tmp46_ = self->priv->listbox_stack;
	_tmp47_ = listbox_placeholder;
	gtk_stack_add_named (_tmp46_, (GtkWidget*) _tmp47_, "placeholder");
	_tmp48_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp48_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp48_, TRUE);
	g_object_ref_sink (_tmp48_);
	content = _tmp48_;
	_tmp49_ = content;
	_tmp50_ = _data77_->title_box;
	gtk_box_append (_tmp49_, (GtkWidget*) _tmp50_);
	_tmp51_ = content;
	_tmp52_ = self->priv->listbox_stack;
	gtk_box_append (_tmp51_, (GtkWidget*) _tmp52_);
	_tmp53_ = content;
	_tmp54_ = _g_object_ref0 ((GtkWidget*) _tmp53_);
	_tmp55_ = (AdwClamp*) adw_clamp_new ();
	adw_clamp_set_maximum_size (_tmp55_, 864);
	adw_clamp_set_tightening_threshold (_tmp55_, 600);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp55_, 64);
	adw_clamp_set_child (_tmp55_, _tmp54_);
	_g_object_unref0 (_tmp54_);
	g_object_ref_sink (_tmp55_);
	content_clamp = _tmp55_;
	_tmp56_ = content_clamp;
	_tmp57_ = _g_object_ref0 ((GtkWidget*) _tmp56_);
	_tmp58_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_set (_tmp58_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp58_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp58_, TRUE);
	gtk_scrolled_window_set_child (_tmp58_, _tmp57_);
	_g_object_unref0 (_tmp57_);
	g_object_ref_sink (_tmp58_);
	_data77_->scrolled_window = _tmp58_;
	_tmp59_ = widgets_magic_button_new ();
	g_object_ref_sink (_tmp59_);
	_g_object_unref0 (self->priv->magic_button);
	self->priv->magic_button = _tmp59_;
	_tmp60_ = _data77_->scrolled_window;
	_tmp61_ = _g_object_ref0 ((GtkWidget*) _tmp60_);
	_tmp62_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp62_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp62_, TRUE);
	gtk_overlay_set_child (_tmp62_, _tmp61_);
	_g_object_unref0 (_tmp61_);
	g_object_ref_sink (_tmp62_);
	content_overlay = _tmp62_;
	_tmp63_ = content_overlay;
	_tmp64_ = self->priv->magic_button;
	gtk_overlay_add_overlay (_tmp63_, (GtkWidget*) _tmp64_);
	_tmp65_ = content_overlay;
	_tmp66_ = _g_object_ref0 ((GtkWidget*) _tmp65_);
	_tmp67_ = (AdwToolbarView*) adw_toolbar_view_new ();
	adw_toolbar_view_set_content (_tmp67_, _tmp66_);
	_g_object_unref0 (_tmp66_);
	g_object_ref_sink (_tmp67_);
	toolbar_view = _tmp67_;
	_tmp68_ = toolbar_view;
	_tmp69_ = self->priv->headerbar;
	adw_toolbar_view_add_top_bar (_tmp68_, (GtkWidget*) _tmp69_);
	_tmp70_ = toolbar_view;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp70_);
	views_filter_update_request (self);
	views_filter_add_items (self);
	_tmp71_ = self->priv->listbox_stack;
	_tmp72_ = gtk_stack_get_transition_duration (_tmp71_);
	_tmp73_ = _tmp72_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp73_, __views_filter___lambda883__gsource_func, g_object_ref (self), g_object_unref);
	_tmp74_ = self->priv->signal_map;
	_tmp75_ = services_store_instance ();
	_tmp76_ = g_signal_connect_object (_tmp75_, "item-added", (GCallback) _views_filter_valid_add_item_services_store_item_added, self, 0);
	_tmp77_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp74_, (gpointer) ((guintptr) _tmp76_), (GObject*) _tmp77_);
	_tmp78_ = self->priv->signal_map;
	_tmp79_ = services_store_instance ();
	_tmp80_ = g_signal_connect_object (_tmp79_, "item-deleted", (GCallback) _views_filter_valid_delete_item_services_store_item_deleted, self, 0);
	_tmp81_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp78_, (gpointer) ((guintptr) _tmp80_), (GObject*) _tmp81_);
	_tmp82_ = self->priv->signal_map;
	_tmp83_ = services_store_instance ();
	_tmp84_ = g_signal_connect_object (_tmp83_, "item-updated", (GCallback) _views_filter_valid_update_item_services_store_item_updated, self, 0);
	_tmp85_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp82_, (gpointer) ((guintptr) _tmp84_), (GObject*) _tmp85_);
	_tmp86_ = self->priv->signal_map;
	_tmp87_ = services_event_bus_get_default ();
	_tmp88_ = _tmp87_;
	_tmp89_ = g_signal_connect_object (_tmp88_, "checked-toggled", (GCallback) _views_filter_valid_checked_item_services_event_bus_checked_toggled, self, 0);
	_tmp90_ = services_event_bus_get_default ();
	_tmp91_ = _tmp90_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp86_, (gpointer) ((guintptr) _tmp89_), (GObject*) _tmp91_);
	_g_object_unref0 (_tmp91_);
	_g_object_unref0 (_tmp88_);
	_tmp92_ = self->priv->signal_map;
	_tmp93_ = services_store_instance ();
	_tmp94_ = g_signal_connect_object (_tmp93_, "item-archived", (GCallback) _views_filter_valid_delete_item_services_store_item_archived, self, 0);
	_tmp95_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp92_, (gpointer) ((guintptr) _tmp94_), (GObject*) _tmp95_);
	_tmp96_ = self->priv->signal_map;
	_tmp97_ = services_store_instance ();
	_tmp98_ = g_signal_connect_object (_tmp97_, "item-unarchived", (GCallback) __views_filter___lambda884__services_store_item_unarchived, self, 0);
	_tmp99_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp96_, (gpointer) ((guintptr) _tmp98_), (GObject*) _tmp99_);
	_tmp100_ = self->priv->signal_map;
	_tmp101_ = services_event_bus_get_default ();
	_tmp102_ = _tmp101_;
	_tmp103_ = g_signal_connect_object (_tmp102_, "item-moved", (GCallback) __views_filter___lambda885__services_event_bus_item_moved, self, 0);
	_tmp104_ = services_event_bus_get_default ();
	_tmp105_ = _tmp104_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp100_, (gpointer) ((guintptr) _tmp103_), (GObject*) _tmp105_);
	_g_object_unref0 (_tmp105_);
	_g_object_unref0 (_tmp102_);
	_tmp106_ = self->priv->signal_map;
	_tmp107_ = self->priv->magic_button;
	_tmp108_ = g_signal_connect_object (_tmp107_, "clicked", (GCallback) __views_filter___lambda886__widgets_magic_button_clicked, self, 0);
	_tmp109_ = self->priv->magic_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp106_, (gpointer) ((guintptr) _tmp108_), (GObject*) _tmp109_);
	_tmp110_ = self->priv->signal_map;
	_tmp111_ = services_event_bus_get_default ();
	_tmp112_ = _tmp111_;
	_tmp113_ = g_signal_connect_object (_tmp112_, "theme-changed", (GCallback) __views_filter___lambda887__services_event_bus_theme_changed, self, 0);
	_tmp114_ = services_event_bus_get_default ();
	_tmp115_ = _tmp114_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp110_, (gpointer) ((guintptr) _tmp113_), (GObject*) _tmp115_);
	_g_object_unref0 (_tmp115_);
	_g_object_unref0 (_tmp112_);
	_tmp116_ = self->priv->signal_map;
	_tmp117_ = _data77_->scrolled_window;
	_tmp118_ = gtk_scrolled_window_get_vadjustment (_tmp117_);
	_tmp119_ = _tmp118_;
	_tmp120_ = g_signal_connect_data (_tmp119_, "value-changed", (GCallback) __views_filter___lambda888__gtk_adjustment_value_changed, block77_data_ref (_data77_), (GClosureNotify) block77_data_unref, 0);
	_tmp121_ = _data77_->scrolled_window;
	_tmp122_ = gtk_scrolled_window_get_vadjustment (_tmp121_);
	_tmp123_ = _tmp122_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp116_, (gpointer) ((guintptr) _tmp120_), (GObject*) _tmp123_);
	_tmp124_ = self->priv->signal_map;
	_tmp125_ = self->priv->load_more_button;
	_tmp126_ = g_signal_connect_object (_tmp125_, "clicked", (GCallback) __views_filter___lambda889__gtk_button_clicked, self, 0);
	_tmp127_ = self->priv->load_more_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp124_, (gpointer) ((guintptr) _tmp126_), (GObject*) _tmp127_);
	_tmp128_ = self->priv->signal_map;
	_tmp129_ = services_event_bus_get_default ();
	_tmp130_ = _tmp129_;
	_tmp131_ = g_signal_connect_data (_tmp130_, "dim-content", (GCallback) __views_filter___lambda890__services_event_bus_dim_content, block77_data_ref (_data77_), (GClosureNotify) block77_data_unref, 0);
	_tmp132_ = services_event_bus_get_default ();
	_tmp133_ = _tmp132_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp128_, (gpointer) ((guintptr) _tmp131_), (GObject*) _tmp133_);
	_g_object_unref0 (_tmp133_);
	_g_object_unref0 (_tmp130_);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_overlay);
	_g_object_unref0 (content_clamp);
	_g_object_unref0 (content);
	_g_object_unref0 (listbox_placeholder);
	_g_object_unref0 (listbox_box);
	_g_object_unref0 (view_setting_button);
	block77_data_unref (_data77_);
	_data77_ = NULL;
	return obj;
}

static void
views_filter_class_init (ViewsFilterClass * klass,
                         gpointer klass_data)
{
	views_filter_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ViewsFilter_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_views_filter_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_views_filter_set_property;
	G_OBJECT_CLASS (klass)->constructor = views_filter_constructor;
	G_OBJECT_CLASS (klass)->finalize = views_filter_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), VIEWS_FILTER_FILTER_PROPERTY, views_filter_properties[VIEWS_FILTER_FILTER_PROPERTY] = g_param_spec_object ("filter", "filter", "filter", OBJECTS_TYPE_BASE_OBJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
views_filter_instance_init (ViewsFilter * self,
                            gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = views_filter_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, LAYOUTS_TYPE_ITEM_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->items = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signal_map = _tmp1_;
	self->priv->page_index = 0;
}

static void
views_filter_finalize (GObject * obj)
{
	ViewsFilter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIEWS_TYPE_FILTER, ViewsFilter);
	g_debug ("Filter.vala:55: Destroying - Views.Filter\n");
	_g_object_unref0 (self->priv->_filter);
	_g_object_unref0 (self->priv->headerbar);
	_g_object_unref0 (self->priv->title_icon);
	_g_object_unref0 (self->priv->title_label);
	_g_object_unref0 (self->priv->listbox);
	_g_object_unref0 (self->priv->listbox_stack);
	_g_object_unref0 (self->priv->magic_button);
	_g_object_unref0 (self->priv->view_setting_revealer);
	_g_object_unref0 (self->priv->load_more_button);
	_g_object_unref0 (self->priv->load_more_button_revealer);
	_g_object_unref0 (self->priv->items);
	_g_object_unref0 (self->priv->signal_map);
	_g_object_unref0 (self->priv->items_list);
	G_OBJECT_CLASS (views_filter_parent_class)->finalize (obj);
}

static GType
views_filter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ViewsFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) views_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ViewsFilter), 0, (GInstanceInitFunc) views_filter_instance_init, NULL };
	GType views_filter_type_id;
	views_filter_type_id = g_type_register_static (adw_bin_get_type (), "ViewsFilter", &g_define_type_info, 0);
	ViewsFilter_private_offset = g_type_add_instance_private (views_filter_type_id, sizeof (ViewsFilterPrivate));
	return views_filter_type_id;
}

GType
views_filter_get_type (void)
{
	static volatile gsize views_filter_type_id__once = 0;
	if (g_once_init_enter (&views_filter_type_id__once)) {
		GType views_filter_type_id;
		views_filter_type_id = views_filter_get_type_once ();
		g_once_init_leave (&views_filter_type_id__once, views_filter_type_id);
	}
	return views_filter_type_id__once;
}

static void
_vala_views_filter_get_property (GObject * object,
                                 guint property_id,
                                 GValue * value,
                                 GParamSpec * pspec)
{
	ViewsFilter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VIEWS_TYPE_FILTER, ViewsFilter);
	switch (property_id) {
		case VIEWS_FILTER_FILTER_PROPERTY:
		g_value_set_object (value, views_filter_get_filter (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_views_filter_set_property (GObject * object,
                                 guint property_id,
                                 const GValue * value,
                                 GParamSpec * pspec)
{
	ViewsFilter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VIEWS_TYPE_FILTER, ViewsFilter);
	switch (property_id) {
		case VIEWS_FILTER_FILTER_PROPERTY:
		views_filter_set_filter (self, g_value_get_object (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);
}

