/* Sidebar.c generated by valac 0.56.19, the Vala compiler
 * generated from Sidebar.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 <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include "planify.h"
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <gio/gio.h>

#define BUILD_VERSION "4.19.5"
#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 LAYOUTS_TYPE_SIDEBAR (layouts_sidebar_get_type ())
#define LAYOUTS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_SIDEBAR, LayoutsSidebar))
#define LAYOUTS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_SIDEBAR, LayoutsSidebarClass))
#define LAYOUTS_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_SIDEBAR))
#define LAYOUTS_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_SIDEBAR))
#define LAYOUTS_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_SIDEBAR, LayoutsSidebarClass))

typedef struct _LayoutsSidebar LayoutsSidebar;
typedef struct _LayoutsSidebarClass LayoutsSidebarClass;
typedef struct _LayoutsSidebarPrivate LayoutsSidebarPrivate;

#define LAYOUTS_TYPE_PROJECT_ROW (layouts_project_row_get_type ())
#define LAYOUTS_PROJECT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRow))
#define LAYOUTS_PROJECT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRowClass))
#define LAYOUTS_IS_PROJECT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_PROJECT_ROW))
#define LAYOUTS_IS_PROJECT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_PROJECT_ROW))
#define LAYOUTS_PROJECT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRowClass))

typedef struct _LayoutsProjectRow LayoutsProjectRow;
typedef struct _LayoutsProjectRowClass LayoutsProjectRowClass;

#define LAYOUTS_TYPE_SIDEBAR_SOURCE_ROW (layouts_sidebar_source_row_get_type ())
#define LAYOUTS_SIDEBAR_SOURCE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_SIDEBAR_SOURCE_ROW, LayoutsSidebarSourceRow))
#define LAYOUTS_SIDEBAR_SOURCE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_SIDEBAR_SOURCE_ROW, LayoutsSidebarSourceRowClass))
#define LAYOUTS_IS_SIDEBAR_SOURCE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_SIDEBAR_SOURCE_ROW))
#define LAYOUTS_IS_SIDEBAR_SOURCE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_SIDEBAR_SOURCE_ROW))
#define LAYOUTS_SIDEBAR_SOURCE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_SIDEBAR_SOURCE_ROW, LayoutsSidebarSourceRowClass))

typedef struct _LayoutsSidebarSourceRow LayoutsSidebarSourceRow;
typedef struct _LayoutsSidebarSourceRowClass LayoutsSidebarSourceRowClass;

#define WIDGETS_TYPE_NEW_VERSION_POPUP (widgets_new_version_popup_get_type ())
#define WIDGETS_NEW_VERSION_POPUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopup))
#define WIDGETS_NEW_VERSION_POPUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopupClass))
#define WIDGETS_IS_NEW_VERSION_POPUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_NEW_VERSION_POPUP))
#define WIDGETS_IS_NEW_VERSION_POPUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_NEW_VERSION_POPUP))
#define WIDGETS_NEW_VERSION_POPUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopupClass))

typedef struct _WidgetsNewVersionPopup WidgetsNewVersionPopup;
typedef struct _WidgetsNewVersionPopupClass WidgetsNewVersionPopupClass;
enum  {
	LAYOUTS_SIDEBAR_0_PROPERTY,
	LAYOUTS_SIDEBAR_NUM_PROPERTIES
};
static GParamSpec* layouts_sidebar_properties[LAYOUTS_SIDEBAR_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_PROJECT (dialogs_project_get_type ())
#define DIALOGS_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_PROJECT, DialogsProject))
#define DIALOGS_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_PROJECT, DialogsProjectClass))
#define DIALOGS_IS_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_PROJECT))
#define DIALOGS_IS_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_PROJECT))
#define DIALOGS_PROJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_PROJECT, DialogsProjectClass))

typedef struct _DialogsProject DialogsProject;
typedef struct _DialogsProjectClass DialogsProjectClass;

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

#define DIALOGS_PREFERENCES_TYPE_PREFERENCES_WINDOW (dialogs_preferences_preferences_window_get_type ())
#define DIALOGS_PREFERENCES_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_TYPE_PREFERENCES_WINDOW, DialogsPreferencesPreferencesWindow))
#define DIALOGS_PREFERENCES_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_TYPE_PREFERENCES_WINDOW, DialogsPreferencesPreferencesWindowClass))
#define DIALOGS_PREFERENCES_IS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_TYPE_PREFERENCES_WINDOW))
#define DIALOGS_PREFERENCES_IS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_TYPE_PREFERENCES_WINDOW))
#define DIALOGS_PREFERENCES_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_TYPE_PREFERENCES_WINDOW, DialogsPreferencesPreferencesWindowClass))

typedef struct _DialogsPreferencesPreferencesWindow DialogsPreferencesPreferencesWindow;
typedef struct _DialogsPreferencesPreferencesWindowClass DialogsPreferencesPreferencesWindowClass;

#define SERVICES_TYPE_API (services_api_get_type ())
#define SERVICES_API(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SERVICES_TYPE_API, ServicesApi))
#define SERVICES_API_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SERVICES_TYPE_API, ServicesApiClass))
#define SERVICES_IS_API(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SERVICES_TYPE_API))
#define SERVICES_IS_API_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SERVICES_TYPE_API))
#define SERVICES_API_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SERVICES_TYPE_API, ServicesApiClass))

typedef struct _ServicesApi ServicesApi;
typedef struct _ServicesApiClass ServicesApiClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _LayoutsSidebarCheckForUpdatesData LayoutsSidebarCheckForUpdatesData;

#define LAYOUTS_TYPE_FILTER_PANE_ROW (layouts_filter_pane_row_get_type ())
#define LAYOUTS_FILTER_PANE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_FILTER_PANE_ROW, LayoutsFilterPaneRow))
#define LAYOUTS_FILTER_PANE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_FILTER_PANE_ROW, LayoutsFilterPaneRowClass))
#define LAYOUTS_IS_FILTER_PANE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_FILTER_PANE_ROW))
#define LAYOUTS_IS_FILTER_PANE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_FILTER_PANE_ROW))
#define LAYOUTS_FILTER_PANE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_FILTER_PANE_ROW, LayoutsFilterPaneRowClass))

typedef struct _LayoutsFilterPaneRow LayoutsFilterPaneRow;
typedef struct _LayoutsFilterPaneRowClass LayoutsFilterPaneRowClass;

#define LAYOUTS_TYPE_FILTER_PANE_CHILD (layouts_filter_pane_child_get_type ())
#define LAYOUTS_FILTER_PANE_CHILD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_FILTER_PANE_CHILD, LayoutsFilterPaneChild))
#define LAYOUTS_FILTER_PANE_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_FILTER_PANE_CHILD, LayoutsFilterPaneChildClass))
#define LAYOUTS_IS_FILTER_PANE_CHILD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_FILTER_PANE_CHILD))
#define LAYOUTS_IS_FILTER_PANE_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_FILTER_PANE_CHILD))
#define LAYOUTS_FILTER_PANE_CHILD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_FILTER_PANE_CHILD, LayoutsFilterPaneChildClass))

typedef struct _LayoutsFilterPaneChild LayoutsFilterPaneChild;
typedef struct _LayoutsFilterPaneChildClass LayoutsFilterPaneChildClass;

#define WIDGETS_TYPE_SCROLLED_WINDOW (widgets_scrolled_window_get_type ())
#define WIDGETS_SCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_SCROLLED_WINDOW, WidgetsScrolledWindow))
#define WIDGETS_SCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_SCROLLED_WINDOW, WidgetsScrolledWindowClass))
#define WIDGETS_IS_SCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_SCROLLED_WINDOW))
#define WIDGETS_IS_SCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_SCROLLED_WINDOW))
#define WIDGETS_SCROLLED_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_SCROLLED_WINDOW, WidgetsScrolledWindowClass))

typedef struct _WidgetsScrolledWindow WidgetsScrolledWindow;
typedef struct _WidgetsScrolledWindowClass WidgetsScrolledWindowClass;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

struct _LayoutsSidebar {
	AdwBin parent_instance;
	LayoutsSidebarPrivate * priv;
	GeeHashMap* favorites_hashmap;
	GeeHashMap* sources_hashmap;
};

struct _LayoutsSidebarClass {
	AdwBinClass parent_class;
};

struct _LayoutsSidebarPrivate {
	GtkRevealer* filters_revealer;
	GtkListBox* sources_listbox;
	WidgetsNewVersionPopup* update_notification;
	GtkRevealer* update_notification_revealer;
	GtkPopover* context_menu;
	LayoutsHeaderItem* favorites_header;
};

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

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _LayoutsSidebarCheckForUpdatesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	LayoutsSidebar* self;
	ObjectsRelease* latest_release;
	ServicesApi* _tmp0_;
	ServicesApi* _tmp1_;
	ObjectsRelease* _tmp2_;
	ObjectsRelease* _tmp3_;
	gboolean _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* dismissed_version;
	ServicesSettings* _tmp7_;
	ServicesSettings* _tmp8_;
	GSettings* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	WidgetsNewVersionPopup* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* release_message;
	gchar* _tmp18_;
	const gchar* _tmp19_;
	WidgetsNewVersionPopup* _tmp20_;
	const gchar* _tmp21_;
	GtkRevealer* _tmp22_;
	GtkRevealer* _tmp23_;
	guint _tmp24_;
	guint _tmp25_;
	GError* e;
	GError* _tmp26_;
	const gchar* _tmp27_;
	GError* _inner_error0_;
};

static gint LayoutsSidebar_private_offset;
static gpointer layouts_sidebar_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;

VALA_EXTERN GType layouts_sidebar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsSidebar, g_object_unref)
VALA_EXTERN GType layouts_project_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsProjectRow, g_object_unref)
VALA_EXTERN GType layouts_sidebar_source_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsSidebarSourceRow, g_object_unref)
VALA_EXTERN GType widgets_new_version_popup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsNewVersionPopup, g_object_unref)
static void layouts_sidebar_create_context_menu (LayoutsSidebar* self);
static void __lambda464_ (LayoutsSidebar* self);
VALA_EXTERN GType dialogs_project_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsProject, g_object_unref)
VALA_EXTERN DialogsProject* dialogs_project_new_new (const gchar* source_id,
                                         gboolean backend_picker,
                                         const gchar* parent_id);
VALA_EXTERN DialogsProject* dialogs_project_construct_new (GType object_type,
                                               const gchar* source_id,
                                               gboolean backend_picker,
                                               const gchar* parent_id);
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 ___lambda464__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda465_ (LayoutsSidebar* self);
VALA_EXTERN GType dialogs_preferences_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPreferencesWindow, g_object_unref)
VALA_EXTERN DialogsPreferencesPreferencesWindow* dialogs_preferences_preferences_window_new (void);
VALA_EXTERN DialogsPreferencesPreferencesWindow* dialogs_preferences_preferences_window_construct (GType object_type);
VALA_EXTERN void dialogs_preferences_preferences_window_show_page (DialogsPreferencesPreferencesWindow* self,
                                                       const gchar* page_key);
static void ___lambda465__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda466_ (LayoutsSidebar* self);
static void ___lambda466__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void layouts_sidebar_on_right_click (LayoutsSidebar* self,
                                     gint n_press,
                                     gdouble x,
                                     gdouble y);
VALA_EXTERN void layouts_sidebar_select_project (LayoutsSidebar* self,
                                     ObjectsProject* project);
static void layouts_sidebar_check_for_updates_data_free (gpointer _data);
static void layouts_sidebar_check_for_updates (LayoutsSidebar* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
static void layouts_sidebar_check_for_updates_finish (LayoutsSidebar* self,
                                               GAsyncResult* _res_);
static gboolean layouts_sidebar_check_for_updates_co (LayoutsSidebarCheckForUpdatesData* _data_);
VALA_EXTERN GType services_api_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ServicesApi, g_object_unref)
VALA_EXTERN ServicesApi* services_api_get_default (void);
VALA_EXTERN void services_api_get_latest_release (ServicesApi* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
VALA_EXTERN ObjectsRelease* services_api_get_latest_release_finish (ServicesApi* self,
                                                        GAsyncResult* _res_,
                                                        GError** error);
static void layouts_sidebar_check_for_updates_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
VALA_EXTERN void widgets_new_version_popup_set_version (WidgetsNewVersionPopup* self,
                                            const gchar* value);
VALA_EXTERN void widgets_new_version_popup_set_description (WidgetsNewVersionPopup* self,
                                                const gchar* value);
static gboolean _____lambda468_ (LayoutsSidebar* self);
VALA_EXTERN void widgets_new_version_popup_show_with_animation (WidgetsNewVersionPopup* self);
static gboolean ______lambda468__gsource_func (gpointer self);
VALA_EXTERN void layouts_sidebar_init (LayoutsSidebar* self);
static void layouts_sidebar_add_source_row (LayoutsSidebar* self,
                                     ObjectsSource* source);
static void _layouts_sidebar_add_source_row_services_store_source_added (ServicesStore* _sender,
                                                                  ObjectsSource* source,
                                                                  gpointer self);
static void __lambda469_ (LayoutsSidebar* self,
                   ObjectsSource* source);
VALA_EXTERN void layouts_sidebar_source_row_hide_destroy (LayoutsSidebarSourceRow* self);
static void ___lambda469__services_store_source_deleted (ServicesStore* _sender,
                                                  ObjectsSource* source,
                                                  gpointer self);
static void __lambda470_ (LayoutsSidebar* self,
                   ObjectsProject* project);
VALA_EXTERN void layouts_project_row_hide_destroy (LayoutsProjectRow* self);
static void layouts_sidebar_add_row_favorite (LayoutsSidebar* self,
                                       ObjectsProject* project);
static void ___lambda470__services_event_bus_favorite_toggled (ServicesEventBus* _sender,
                                                        ObjectsProject* project,
                                                        gpointer self);
static void __lambda471_ (LayoutsSidebar* self,
                   ObjectsProject* project);
static void ___lambda471__services_store_project_added (ServicesStore* _sender,
                                                 ObjectsProject* project,
                                                 gpointer self);
static void layouts_sidebar_add_all_favorites (LayoutsSidebar* self);
VALA_EXTERN LayoutsSidebarSourceRow* layouts_sidebar_source_row_new (ObjectsSource* source);
VALA_EXTERN LayoutsSidebarSourceRow* layouts_sidebar_source_row_construct (GType object_type,
                                                               ObjectsSource* source);
VALA_EXTERN LayoutsProjectRow* layouts_project_row_new (ObjectsProject* project,
                                            gboolean show_subprojects,
                                            gboolean drag_n_drop);
VALA_EXTERN LayoutsProjectRow* layouts_project_row_construct (GType object_type,
                                                  ObjectsProject* project,
                                                  gboolean show_subprojects,
                                                  gboolean drag_n_drop);
static void layouts_sidebar_update_filter_view (LayoutsSidebar* self);
static gboolean __lambda472_ (LayoutsSidebar* self);
static void layouts_sidebar_destroy_current_filter_view (LayoutsSidebar* self);
static GtkWidget* layouts_sidebar_build_filters_listbox (LayoutsSidebar* self);
static GtkWidget* layouts_sidebar_build_filters_flowbox (LayoutsSidebar* self);
static gboolean ___lambda472__gsource_func (gpointer self);
VALA_EXTERN GType layouts_filter_pane_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsFilterPaneRow, g_object_unref)
VALA_EXTERN void layouts_filter_pane_row_clean_up (LayoutsFilterPaneRow* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
VALA_EXTERN LayoutsFilterPaneChild* layouts_filter_pane_child_new (ObjectsBaseObject* filter_type);
VALA_EXTERN LayoutsFilterPaneChild* layouts_filter_pane_child_construct (GType object_type,
                                                             ObjectsBaseObject* filter_type);
VALA_EXTERN GType layouts_filter_pane_child_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsFilterPaneChild, g_object_unref)
static void __lambda494_ (LayoutsSidebar* self,
                   GtkFlowBoxChild* child);
VALA_EXTERN ObjectsBaseObject* layouts_filter_pane_child_get_filter_type (LayoutsFilterPaneChild* self);
static void ___lambda494__gtk_flow_box_child_activated (GtkFlowBox* _sender,
                                                 GtkFlowBoxChild* child,
                                                 gpointer self);
static gint __lambda495_ (LayoutsSidebar* self,
                   GtkFlowBoxChild* child1,
                   GtkFlowBoxChild* child2);
VALA_EXTERN gint layouts_filter_pane_child_item_order (LayoutsFilterPaneChild* self);
static gint ___lambda495__gtk_flow_box_sort_func (GtkFlowBoxChild* child1,
                                           GtkFlowBoxChild* child2,
                                           gpointer self);
static gboolean __lambda496_ (LayoutsSidebar* self,
                       GtkFlowBoxChild* child);
VALA_EXTERN gboolean layouts_filter_pane_child_active (LayoutsFilterPaneChild* self);
static gboolean ___lambda496__gtk_flow_box_filter_func (GtkFlowBoxChild* child,
                                                 gpointer self);
VALA_EXTERN LayoutsFilterPaneRow* layouts_filter_pane_row_new (ObjectsBaseObject* filter_type);
VALA_EXTERN LayoutsFilterPaneRow* layouts_filter_pane_row_construct (GType object_type,
                                                         ObjectsBaseObject* filter_type);
static void __lambda482_ (LayoutsSidebar* self,
                   GtkListBoxRow* row);
VALA_EXTERN ObjectsBaseObject* layouts_filter_pane_row_get_filter_type (LayoutsFilterPaneRow* self);
static void ___lambda482__gtk_list_box_row_activated (GtkListBox* _sender,
                                               GtkListBoxRow* row,
                                               gpointer self);
static gint __lambda483_ (LayoutsSidebar* self,
                   GtkListBoxRow* row1,
                   GtkListBoxRow* row2);
VALA_EXTERN gint layouts_filter_pane_row_item_order (LayoutsFilterPaneRow* self);
static gint ___lambda483__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                           GtkListBoxRow* row2,
                                           gpointer self);
static gboolean __lambda484_ (LayoutsSidebar* self,
                       GtkListBoxRow* row);
VALA_EXTERN gboolean layouts_filter_pane_row_active (LayoutsFilterPaneRow* self);
static gboolean ___lambda484__gtk_list_box_filter_func (GtkListBoxRow* row,
                                                 gpointer self);
VALA_EXTERN LayoutsSidebar* layouts_sidebar_new (void);
VALA_EXTERN LayoutsSidebar* layouts_sidebar_construct (GType object_type);
static GObject * layouts_sidebar_constructor (GType type,
                                       guint n_construct_properties,
                                       GObjectConstructParam * construct_properties);
VALA_EXTERN GType widgets_scrolled_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsScrolledWindow, g_object_unref)
VALA_EXTERN WidgetsScrolledWindow* widgets_scrolled_window_new (GtkWidget* widget,
                                                    GtkOrientation orientation);
VALA_EXTERN WidgetsScrolledWindow* widgets_scrolled_window_construct (GType object_type,
                                                          GtkWidget* widget,
                                                          GtkOrientation orientation);
VALA_EXTERN WidgetsNewVersionPopup* widgets_new_version_popup_new (void);
VALA_EXTERN WidgetsNewVersionPopup* widgets_new_version_popup_construct (GType object_type);
static void _layouts_sidebar_on_right_click_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                gint n_press,
                                                                gdouble x,
                                                                gdouble y,
                                                                gpointer self);
static void _layouts_sidebar___lambda497_ (LayoutsSidebar* self);
VALA_EXTERN const gchar* widgets_new_version_popup_get_version (WidgetsNewVersionPopup* self);
static void __layouts_sidebar___lambda497__widgets_new_version_popup_dismissed (WidgetsNewVersionPopup* _sender,
                                                                         gpointer self);
static gint _layouts_sidebar___lambda498_ (LayoutsSidebar* self,
                                    GtkListBoxRow* child1,
                                    GtkListBoxRow* child2);
VALA_EXTERN ObjectsSource* layouts_sidebar_source_row_get_source (LayoutsSidebarSourceRow* self);
static gint __layouts_sidebar___lambda498__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                            GtkListBoxRow* row2,
                                                            gpointer self);
static void _layouts_sidebar___lambda499_ (LayoutsSidebar* self);
static void __layouts_sidebar___lambda499__g_settings_changed (GSettings* _sender,
                                                        const gchar* key,
                                                        gpointer self);
static void _layouts_sidebar___lambda500_ (LayoutsSidebar* self);
static void __layouts_sidebar___lambda500__services_event_bus_update_sources_position (ServicesEventBus* _sender,
                                                                                gpointer self);
static void _layouts_sidebar_update_filter_view_g_settings_changed (GSettings* _sender,
                                                             const gchar* key,
                                                             gpointer self);
static void layouts_sidebar_finalize (GObject * obj);
static GType layouts_sidebar_get_type_once (void);
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
layouts_sidebar_get_instance_private (LayoutsSidebar* self)
{
	return G_STRUCT_MEMBER_P (self, LayoutsSidebar_private_offset);
}

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

static void
__lambda464_ (LayoutsSidebar* self)
{
	ObjectsSource* default_source = NULL;
	ServicesStore* _tmp0_;
	ObjectsSource* _tmp1_;
	gchar* _tmp2_ = NULL;
	ObjectsSource* _tmp3_;
	gchar* source_id = NULL;
	gchar* _tmp9_;
	DialogsProject* dialog = NULL;
	DialogsProject* _tmp10_;
	Planify* _tmp11_;
	MainWindow* _tmp12_;
	GtkPopover* _tmp13_;
	_tmp0_ = services_store_instance ();
	_tmp1_ = services_store_get_default_source (_tmp0_);
	default_source = _tmp1_;
	_tmp3_ = default_source;
	if (_tmp3_ != NULL) {
		ObjectsSource* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = default_source;
		_tmp5_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup (_tmp6_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp7_;
	} else {
		gchar* _tmp8_;
		_tmp8_ = source_type_to_string (SOURCE_TYPE_LOCAL);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp8_;
	}
	_tmp9_ = _tmp2_;
	_tmp2_ = NULL;
	source_id = _tmp9_;
	_tmp10_ = dialogs_project_new_new (source_id, TRUE, "");
	g_object_ref_sink (_tmp10_);
	dialog = _tmp10_;
	_tmp11_ = planify__instance;
	_tmp12_ = _tmp11_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp12_);
	_tmp13_ = self->priv->context_menu;
	gtk_popover_popdown (_tmp13_);
	_g_object_unref0 (dialog);
	_g_free0 (source_id);
	_g_free0 (_tmp2_);
	_g_object_unref0 (default_source);
}

static void
___lambda464__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda464_ ((LayoutsSidebar*) self);
}

static void
__lambda465_ (LayoutsSidebar* self)
{
	DialogsPreferencesPreferencesWindow* preferences_dialog = NULL;
	DialogsPreferencesPreferencesWindow* _tmp0_;
	Planify* _tmp1_;
	MainWindow* _tmp2_;
	_tmp0_ = dialogs_preferences_preferences_window_new ();
	g_object_ref_sink (_tmp0_);
	preferences_dialog = _tmp0_;
	dialogs_preferences_preferences_window_show_page (preferences_dialog, "accounts");
	_tmp1_ = planify__instance;
	_tmp2_ = _tmp1_->main_window;
	adw_dialog_present ((AdwDialog*) preferences_dialog, (GtkWidget*) _tmp2_);
	_g_object_unref0 (preferences_dialog);
}

static void
___lambda465__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda465_ ((LayoutsSidebar*) self);
}

static void
__lambda466_ (LayoutsSidebar* self)
{
	DialogsPreferencesPreferencesWindow* preferences_dialog = NULL;
	DialogsPreferencesPreferencesWindow* _tmp0_;
	Planify* _tmp1_;
	MainWindow* _tmp2_;
	_tmp0_ = dialogs_preferences_preferences_window_new ();
	g_object_ref_sink (_tmp0_);
	preferences_dialog = _tmp0_;
	dialogs_preferences_preferences_window_show_page (preferences_dialog, "sidebar-page");
	_tmp1_ = planify__instance;
	_tmp2_ = _tmp1_->main_window;
	adw_dialog_present ((AdwDialog*) preferences_dialog, (GtkWidget*) _tmp2_);
	_g_object_unref0 (preferences_dialog);
}

static void
___lambda466__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda466_ ((LayoutsSidebar*) self);
}

static void
layouts_sidebar_create_context_menu (LayoutsSidebar* self)
{
	WidgetsContextMenuMenuItem* add_project_item = NULL;
	WidgetsContextMenuMenuItem* _tmp0_;
	WidgetsContextMenuMenuItem* add_source_item = NULL;
	WidgetsContextMenuMenuItem* _tmp1_;
	WidgetsContextMenuMenuItem* customize_item = NULL;
	WidgetsContextMenuMenuItem* _tmp2_;
	GtkBox* menu_box = NULL;
	GtkBox* _tmp3_;
	WidgetsContextMenuMenuSeparator* _tmp4_;
	WidgetsContextMenuMenuSeparator* _tmp5_;
	GtkWidget* _tmp6_;
	GtkPopover* _tmp7_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_context_menu_menu_item_new (_ ("New Project"), "plus-large-symbolic");
	g_object_ref_sink (_tmp0_);
	add_project_item = _tmp0_;
	_tmp1_ = widgets_context_menu_menu_item_new (_ ("Add Account"), "cloud-outline-thick-symbolic");
	g_object_ref_sink (_tmp1_);
	add_source_item = _tmp1_;
	_tmp2_ = widgets_context_menu_menu_item_new (_ ("Customize Sidebar"), "dock-left-symbolic");
	g_object_ref_sink (_tmp2_);
	customize_item = _tmp2_;
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp3_);
	menu_box = _tmp3_;
	gtk_widget_set_margin_bottom ((GtkWidget*) menu_box, 3);
	gtk_widget_set_margin_top ((GtkWidget*) menu_box, 3);
	gtk_box_append (menu_box, (GtkWidget*) add_project_item);
	gtk_box_append (menu_box, (GtkWidget*) add_source_item);
	_tmp4_ = widgets_context_menu_menu_separator_new ();
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	gtk_box_append (menu_box, (GtkWidget*) _tmp5_);
	_g_object_unref0 (_tmp5_);
	gtk_box_append (menu_box, (GtkWidget*) customize_item);
	_tmp6_ = _g_object_ref0 ((GtkWidget*) menu_box);
	_tmp7_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp7_, FALSE);
	gtk_popover_set_child (_tmp7_, _tmp6_);
	_g_object_unref0 (_tmp6_);
	gtk_popover_set_position (_tmp7_, GTK_POS_BOTTOM);
	g_object_set ((GtkWidget*) _tmp7_, "width-request", 250, NULL);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->context_menu);
	self->priv->context_menu = _tmp7_;
	g_signal_connect_object ((GtkButton*) add_project_item, "clicked", (GCallback) ___lambda464__gtk_button_clicked, self, 0);
	g_signal_connect_object ((GtkButton*) add_source_item, "clicked", (GCallback) ___lambda465__gtk_button_clicked, self, 0);
	g_signal_connect_object ((GtkButton*) customize_item, "clicked", (GCallback) ___lambda466__gtk_button_clicked, self, 0);
	_g_object_unref0 (menu_box);
	_g_object_unref0 (customize_item);
	_g_object_unref0 (add_source_item);
	_g_object_unref0 (add_project_item);
}

static void
layouts_sidebar_on_right_click (LayoutsSidebar* self,
                                gint n_press,
                                gdouble x,
                                gdouble y)
{
	GdkRectangle rect = {0};
	GdkRectangle _tmp0_ = {0};
	GtkPopover* _tmp1_;
	GtkPopover* _tmp2_;
	GdkRectangle _tmp3_;
	GtkPopover* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_.x = (gint) x;
	_tmp0_.y = (gint) y;
	_tmp0_.width = 250;
	_tmp0_.height = 1;
	rect = _tmp0_;
	_tmp1_ = self->priv->context_menu;
	gtk_widget_set_parent ((GtkWidget*) _tmp1_, (GtkWidget*) self);
	_tmp2_ = self->priv->context_menu;
	_tmp3_ = rect;
	gtk_popover_set_pointing_to (_tmp2_, &_tmp3_);
	_tmp4_ = self->priv->context_menu;
	gtk_popover_popup (_tmp4_);
}

void
layouts_sidebar_select_project (LayoutsSidebar* self,
                                ObjectsProject* project)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (project != NULL);
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
	_tmp3_ = _tmp2_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_PROJECT, _tmp3_);
	_g_object_unref0 (_tmp1_);
}

static void
layouts_sidebar_check_for_updates_data_free (gpointer _data)
{
	LayoutsSidebarCheckForUpdatesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (LayoutsSidebarCheckForUpdatesData, _data_);
}

static void
layouts_sidebar_check_for_updates (LayoutsSidebar* self,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	LayoutsSidebarCheckForUpdatesData* _data_;
	LayoutsSidebar* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (LayoutsSidebarCheckForUpdatesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, layouts_sidebar_check_for_updates_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	layouts_sidebar_check_for_updates_co (_data_);
}

static void
layouts_sidebar_check_for_updates_finish (LayoutsSidebar* self,
                                          GAsyncResult* _res_)
{
	LayoutsSidebarCheckForUpdatesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
layouts_sidebar_check_for_updates_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	LayoutsSidebarCheckForUpdatesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	layouts_sidebar_check_for_updates_co (_data_);
}

static gboolean
_____lambda468_ (LayoutsSidebar* self)
{
	WidgetsNewVersionPopup* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->update_notification;
	widgets_new_version_popup_show_with_animation (_tmp0_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
______lambda468__gsource_func (gpointer self)
{
	gboolean result;
	result = _____lambda468_ ((LayoutsSidebar*) self);
	return result;
}

static gboolean
layouts_sidebar_check_for_updates_co (LayoutsSidebarCheckForUpdatesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = services_api_get_default ();
		_data_->_tmp1_ = _data_->_tmp0_;
		_data_->_state_ = 1;
		services_api_get_latest_release (_data_->_tmp1_, layouts_sidebar_check_for_updates_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp2_ = services_api_get_latest_release_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp3_ = _data_->_tmp2_;
		_g_object_unref0 (_data_->_tmp1_);
		_data_->latest_release = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		if (_data_->latest_release != NULL) {
			_data_->_tmp5_ = objects_release_get_version (_data_->latest_release);
			_data_->_tmp6_ = _data_->_tmp5_;
			_data_->_tmp4_ = g_strcmp0 (_data_->_tmp6_, BUILD_VERSION) != 0;
		} else {
			_data_->_tmp4_ = FALSE;
		}
		if (_data_->_tmp4_) {
			_data_->_tmp7_ = services_settings_get_default ();
			_data_->_tmp8_ = _data_->_tmp7_;
			_data_->_tmp9_ = _data_->_tmp8_->settings;
			_data_->_tmp10_ = g_settings_get_string (_data_->_tmp9_, "dismissed-update-version");
			_data_->_tmp11_ = _data_->_tmp10_;
			_g_object_unref0 (_data_->_tmp8_);
			_data_->dismissed_version = _data_->_tmp11_;
			_data_->_tmp12_ = _data_->dismissed_version;
			_data_->_tmp13_ = objects_release_get_version (_data_->latest_release);
			_data_->_tmp14_ = _data_->_tmp13_;
			if (g_strcmp0 (_data_->_tmp12_, _data_->_tmp14_) != 0) {
				_data_->_tmp15_ = _data_->self->priv->update_notification;
				_data_->_tmp16_ = objects_release_get_version (_data_->latest_release);
				_data_->_tmp17_ = _data_->_tmp16_;
				widgets_new_version_popup_set_version (_data_->_tmp15_, _data_->_tmp17_);
				_data_->_tmp18_ = objects_release_get_release_message (_data_->latest_release);
				_data_->release_message = _data_->_tmp18_;
				_data_->_tmp19_ = _data_->release_message;
				if (_data_->_tmp19_ != NULL) {
					_data_->_tmp20_ = _data_->self->priv->update_notification;
					_data_->_tmp21_ = _data_->release_message;
					widgets_new_version_popup_set_description (_data_->_tmp20_, _data_->_tmp21_);
				}
				_data_->_tmp22_ = _data_->self->priv->update_notification_revealer;
				gtk_revealer_set_reveal_child (_data_->_tmp22_, TRUE);
				_data_->_tmp23_ = _data_->self->priv->update_notification_revealer;
				_data_->_tmp24_ = gtk_revealer_get_transition_duration (_data_->_tmp23_);
				_data_->_tmp25_ = _data_->_tmp24_;
				g_timeout_add_full (G_PRIORITY_DEFAULT, _data_->_tmp25_, ______lambda468__gsource_func, g_object_ref (_data_->self), g_object_unref);
				_g_free0 (_data_->release_message);
			}
			_g_free0 (_data_->dismissed_version);
		}
		_g_object_unref0 (_data_->latest_release);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp26_ = _data_->e;
		_data_->_tmp27_ = _data_->_tmp26_->message;
		g_warning ("Sidebar.vala:197: Error fetching latest release: %s", _data_->_tmp27_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_layouts_sidebar_add_source_row_services_store_source_added (ServicesStore* _sender,
                                                             ObjectsSource* source,
                                                             gpointer self)
{
	layouts_sidebar_add_source_row ((LayoutsSidebar*) self, source);
}

static void
__lambda469_ (LayoutsSidebar* self,
              ObjectsSource* source)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (source != NULL);
	_tmp0_ = self->sources_hashmap;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gpointer _tmp6_;
		LayoutsSidebarSourceRow* _tmp7_;
		_tmp3_ = self->sources_hashmap;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (LayoutsSidebarSourceRow*) _tmp6_;
		layouts_sidebar_source_row_hide_destroy (_tmp7_);
		_g_object_unref0 (_tmp7_);
	}
}

static void
___lambda469__services_store_source_deleted (ServicesStore* _sender,
                                             ObjectsSource* source,
                                             gpointer self)
{
	__lambda469_ ((LayoutsSidebar*) self, source);
}

static void
__lambda470_ (LayoutsSidebar* self,
              ObjectsProject* project)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	LayoutsHeaderItem* _tmp11_;
	GeeHashMap* _tmp12_;
	gint _tmp13_;
	gint _tmp14_;
	g_return_if_fail (project != NULL);
	_tmp0_ = self->favorites_hashmap;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gpointer _tmp6_;
		LayoutsProjectRow* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp3_ = self->favorites_hashmap;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (LayoutsProjectRow*) _tmp6_;
		layouts_project_row_hide_destroy (_tmp7_);
		_g_object_unref0 (_tmp7_);
		_tmp8_ = self->favorites_hashmap;
		_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
		_tmp10_ = _tmp9_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp8_, _tmp10_, NULL);
	} else {
		layouts_sidebar_add_row_favorite (self, project);
	}
	_tmp11_ = self->priv->favorites_header;
	_tmp12_ = self->favorites_hashmap;
	_tmp13_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp12_);
	_tmp14_ = _tmp13_;
	layouts_header_item_set_reveal (_tmp11_, _tmp14_ > 0);
}

static void
___lambda470__services_event_bus_favorite_toggled (ServicesEventBus* _sender,
                                                   ObjectsProject* project,
                                                   gpointer self)
{
	__lambda470_ ((LayoutsSidebar*) self, project);
}

static void
__lambda471_ (LayoutsSidebar* self,
              ObjectsProject* project)
{
	g_return_if_fail (project != NULL);
	layouts_sidebar_add_row_favorite (self, project);
}

static void
___lambda471__services_store_project_added (ServicesStore* _sender,
                                            ObjectsProject* project,
                                            gpointer self)
{
	__lambda471_ ((LayoutsSidebar*) self, project);
}

void
layouts_sidebar_init (LayoutsSidebar* self)
{
	ServicesStore* _tmp0_;
	ServicesStore* _tmp1_;
	ServicesEventBus* _tmp2_;
	ServicesEventBus* _tmp3_;
	ServicesStore* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = services_store_instance ();
	g_signal_connect_object (_tmp0_, "source-added", (GCallback) _layouts_sidebar_add_source_row_services_store_source_added, self, 0);
	_tmp1_ = services_store_instance ();
	g_signal_connect_object (_tmp1_, "source-deleted", (GCallback) ___lambda469__services_store_source_deleted, self, 0);
	_tmp2_ = services_event_bus_get_default ();
	_tmp3_ = _tmp2_;
	g_signal_connect_object (_tmp3_, "favorite-toggled", (GCallback) ___lambda470__services_event_bus_favorite_toggled, self, 0);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = services_store_instance ();
	g_signal_connect_object (_tmp4_, "project-added", (GCallback) ___lambda471__services_store_project_added, self, 0);
	layouts_sidebar_add_all_favorites (self);
	{
		GeeArrayList* _source_list = NULL;
		ServicesStore* _tmp5_;
		GeeArrayList* _tmp6_;
		GeeArrayList* _tmp7_;
		gint _source_size = 0;
		GeeArrayList* _tmp8_;
		gint _tmp9_;
		gint _tmp10_;
		gint _source_index = 0;
		_tmp5_ = services_store_instance ();
		_tmp6_ = services_store_get_sources (_tmp5_);
		_tmp7_ = _tmp6_;
		_source_list = _tmp7_;
		_tmp8_ = _source_list;
		_tmp9_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp8_);
		_tmp10_ = _tmp9_;
		_source_size = _tmp10_;
		_source_index = -1;
		while (TRUE) {
			gint _tmp11_;
			gint _tmp12_;
			ObjectsSource* source = NULL;
			GeeArrayList* _tmp13_;
			gpointer _tmp14_;
			ObjectsSource* _tmp15_;
			_source_index = _source_index + 1;
			_tmp11_ = _source_index;
			_tmp12_ = _source_size;
			if (!(_tmp11_ < _tmp12_)) {
				break;
			}
			_tmp13_ = _source_list;
			_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, _source_index);
			source = (ObjectsSource*) _tmp14_;
			_tmp15_ = source;
			layouts_sidebar_add_source_row (self, _tmp15_);
			_g_object_unref0 (source);
		}
	}
	layouts_sidebar_check_for_updates (self, NULL, NULL);
}

static void
layouts_sidebar_add_source_row (LayoutsSidebar* self,
                                ObjectsSource* source)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (source != NULL);
	_tmp0_ = self->sources_hashmap;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
	_tmp2_ = _tmp1_;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		LayoutsSidebarSourceRow* _tmp6_;
		LayoutsSidebarSourceRow* _tmp7_;
		GtkListBox* _tmp8_;
		GeeHashMap* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gpointer _tmp12_;
		LayoutsSidebarSourceRow* _tmp13_;
		_tmp3_ = self->sources_hashmap;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
		_tmp5_ = _tmp4_;
		_tmp6_ = layouts_sidebar_source_row_new (source);
		g_object_ref_sink (_tmp6_);
		_tmp7_ = _tmp6_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp5_, _tmp7_);
		_g_object_unref0 (_tmp7_);
		_tmp8_ = self->priv->sources_listbox;
		_tmp9_ = self->sources_hashmap;
		_tmp10_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
		_tmp11_ = _tmp10_;
		_tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp9_, _tmp11_);
		_tmp13_ = (LayoutsSidebarSourceRow*) _tmp12_;
		gtk_list_box_append (_tmp8_, (GtkWidget*) _tmp13_);
		_g_object_unref0 (_tmp13_);
	}
}

static void
layouts_sidebar_add_all_favorites (LayoutsSidebar* self)
{
	LayoutsHeaderItem* _tmp11_;
	GeeHashMap* _tmp12_;
	gint _tmp13_;
	gint _tmp14_;
	g_return_if_fail (self != NULL);
	{
		GeeArrayList* _project_list = NULL;
		ServicesStore* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _project_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _project_index = 0;
		_tmp0_ = services_store_instance ();
		_tmp1_ = services_store_get_projects (_tmp0_);
		_tmp2_ = _tmp1_;
		_project_list = _tmp2_;
		_tmp3_ = _project_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_project_size = _tmp5_;
		_project_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ObjectsProject* project = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			ObjectsProject* _tmp10_;
			_project_index = _project_index + 1;
			_tmp6_ = _project_index;
			_tmp7_ = _project_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _project_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _project_index);
			project = (ObjectsProject*) _tmp9_;
			_tmp10_ = project;
			layouts_sidebar_add_row_favorite (self, _tmp10_);
			_g_object_unref0 (project);
		}
	}
	_tmp11_ = self->priv->favorites_header;
	_tmp12_ = self->favorites_hashmap;
	_tmp13_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp12_);
	_tmp14_ = _tmp13_;
	layouts_header_item_set_reveal (_tmp11_, _tmp14_ > 0);
}

static void
layouts_sidebar_add_row_favorite (LayoutsSidebar* self,
                                  ObjectsProject* project)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GeeHashMap* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GeeHashMap* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	LayoutsProjectRow* _tmp8_;
	LayoutsProjectRow* _tmp9_;
	LayoutsHeaderItem* _tmp10_;
	GeeHashMap* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gpointer _tmp14_;
	LayoutsProjectRow* _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (project != NULL);
	_tmp0_ = objects_project_get_is_favorite (project);
	_tmp1_ = _tmp0_;
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = self->favorites_hashmap;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
	_tmp4_ = _tmp3_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, _tmp4_)) {
		return;
	}
	_tmp5_ = self->favorites_hashmap;
	_tmp6_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
	_tmp7_ = _tmp6_;
	_tmp8_ = layouts_project_row_new (project, FALSE, FALSE);
	g_object_ref_sink (_tmp8_);
	_tmp9_ = _tmp8_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, _tmp7_, _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = self->priv->favorites_header;
	_tmp11_ = self->favorites_hashmap;
	_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
	_tmp13_ = _tmp12_;
	_tmp14_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp13_);
	_tmp15_ = (LayoutsProjectRow*) _tmp14_;
	layouts_header_item_add_child (_tmp10_, (GtkWidget*) _tmp15_);
	_g_object_unref0 (_tmp15_);
}

static gboolean
__lambda472_ (LayoutsSidebar* self)
{
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	gboolean _tmp3_;
	GtkRevealer* _tmp10_;
	gboolean result;
	layouts_sidebar_destroy_current_filter_view (self);
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = g_settings_get_boolean (_tmp2_, "filters-list-view");
	_g_object_unref0 (_tmp1_);
	if (_tmp3_) {
		GtkRevealer* _tmp4_;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp6_;
		_tmp4_ = self->priv->filters_revealer;
		_tmp5_ = layouts_sidebar_build_filters_listbox (self);
		_tmp6_ = _tmp5_;
		gtk_revealer_set_child (_tmp4_, _tmp6_);
		_g_object_unref0 (_tmp6_);
	} else {
		GtkRevealer* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		_tmp7_ = self->priv->filters_revealer;
		_tmp8_ = layouts_sidebar_build_filters_flowbox (self);
		_tmp9_ = _tmp8_;
		gtk_revealer_set_child (_tmp7_, _tmp9_);
		_g_object_unref0 (_tmp9_);
	}
	_tmp10_ = self->priv->filters_revealer;
	gtk_revealer_set_reveal_child (_tmp10_, TRUE);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda472__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda472_ ((LayoutsSidebar*) self);
	return result;
}

static void
layouts_sidebar_update_filter_view (LayoutsSidebar* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->filters_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->priv->filters_revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda472__gsource_func, g_object_ref (self), g_object_unref);
}

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

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

static void
layouts_sidebar_destroy_current_filter_view (LayoutsSidebar* self)
{
	GtkRevealer* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkRevealer* _tmp23_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->filters_revealer;
	_tmp1_ = gtk_revealer_get_child (_tmp0_);
	_tmp2_ = _tmp1_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_flow_box_get_type ())) {
		GtkFlowBox* filters_flowbox = NULL;
		GtkRevealer* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		GtkFlowBox* _tmp6_;
		GtkFlowBox* _tmp7_;
		_tmp3_ = self->priv->filters_revealer;
		_tmp4_ = gtk_revealer_get_child (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_flow_box_get_type (), GtkFlowBox));
		filters_flowbox = _tmp6_;
		_tmp7_ = filters_flowbox;
		if (_tmp7_ != NULL) {
		}
		_g_object_unref0 (filters_flowbox);
	} else {
		GtkRevealer* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp8_ = self->priv->filters_revealer;
		_tmp9_ = gtk_revealer_get_child (_tmp8_);
		_tmp10_ = _tmp9_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, gtk_list_box_get_type ())) {
			GtkListBox* filters_listbox = NULL;
			GtkRevealer* _tmp11_;
			GtkWidget* _tmp12_;
			GtkWidget* _tmp13_;
			GtkListBox* _tmp14_;
			GtkListBox* _tmp15_;
			_tmp11_ = self->priv->filters_revealer;
			_tmp12_ = gtk_revealer_get_child (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_list_box_get_type (), GtkListBox));
			filters_listbox = _tmp14_;
			_tmp15_ = filters_listbox;
			if (_tmp15_ != NULL) {
				Util* _tmp16_;
				Util* _tmp17_;
				GtkListBox* _tmp18_;
				GList* _tmp19_;
				GList* _tmp20_;
				_tmp16_ = util_get_default ();
				_tmp17_ = _tmp16_;
				_tmp18_ = filters_listbox;
				_tmp19_ = util_get_children (_tmp17_, _tmp18_);
				_tmp20_ = _tmp19_;
				_g_object_unref0 (_tmp17_);
				{
					GList* row_collection = NULL;
					GList* row_it = NULL;
					row_collection = _tmp20_;
					for (row_it = row_collection; row_it != NULL; row_it = row_it->next) {
						GtkListBoxRow* _tmp21_;
						GtkListBoxRow* row = NULL;
						_tmp21_ = _g_object_ref0 ((GtkListBoxRow*) row_it->data);
						row = _tmp21_;
						{
							GtkListBoxRow* _tmp22_;
							_tmp22_ = row;
							layouts_filter_pane_row_clean_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, LAYOUTS_TYPE_FILTER_PANE_ROW, LayoutsFilterPaneRow));
							_g_object_unref0 (row);
						}
					}
					(row_collection == NULL) ? NULL : (row_collection = (_g_list_free__g_object_unref0_ (row_collection), NULL));
				}
			}
			_g_object_unref0 (filters_listbox);
		}
	}
	_tmp23_ = self->priv->filters_revealer;
	gtk_revealer_set_child (_tmp23_, NULL);
}

static void
__lambda494_ (LayoutsSidebar* self,
              GtkFlowBoxChild* child)
{
	LayoutsFilterPaneChild* filter = NULL;
	LayoutsFilterPaneChild* _tmp0_;
	ServicesEventBus* _tmp1_;
	ServicesEventBus* _tmp2_;
	ObjectsBaseObject* _tmp3_;
	ObjectsBaseObject* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	g_return_if_fail (child != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (child, LAYOUTS_TYPE_FILTER_PANE_CHILD, LayoutsFilterPaneChild));
	filter = _tmp0_;
	_tmp1_ = services_event_bus_get_default ();
	_tmp2_ = _tmp1_;
	_tmp3_ = layouts_filter_pane_child_get_filter_type (filter);
	_tmp4_ = _tmp3_;
	_tmp5_ = objects_base_object_get_view_id (_tmp4_);
	_tmp6_ = _tmp5_;
	g_signal_emit_by_name (_tmp2_, "pane-selected", PANE_TYPE_FILTER, _tmp6_);
	_g_object_unref0 (_tmp2_);
	_g_object_unref0 (filter);
}

static void
___lambda494__gtk_flow_box_child_activated (GtkFlowBox* _sender,
                                            GtkFlowBoxChild* child,
                                            gpointer self)
{
	__lambda494_ ((LayoutsSidebar*) self, child);
}

static gint
__lambda495_ (LayoutsSidebar* self,
              GtkFlowBoxChild* child1,
              GtkFlowBoxChild* child2)
{
	gint item1 = 0;
	gint item2 = 0;
	gint result;
	g_return_val_if_fail (child1 != NULL, -1);
	g_return_val_if_fail (child2 != NULL, -1);
	item1 = layouts_filter_pane_child_item_order (G_TYPE_CHECK_INSTANCE_CAST (child1, LAYOUTS_TYPE_FILTER_PANE_CHILD, LayoutsFilterPaneChild));
	item2 = layouts_filter_pane_child_item_order (G_TYPE_CHECK_INSTANCE_CAST (child2, LAYOUTS_TYPE_FILTER_PANE_CHILD, LayoutsFilterPaneChild));
	result = item1 - item2;
	return result;
}

static gint
___lambda495__gtk_flow_box_sort_func (GtkFlowBoxChild* child1,
                                      GtkFlowBoxChild* child2,
                                      gpointer self)
{
	gint result;
	result = __lambda495_ ((LayoutsSidebar*) self, child1, child2);
	return result;
}

static gboolean
__lambda496_ (LayoutsSidebar* self,
              GtkFlowBoxChild* child)
{
	gboolean result;
	g_return_val_if_fail (child != NULL, FALSE);
	result = layouts_filter_pane_child_active (G_TYPE_CHECK_INSTANCE_CAST (child, LAYOUTS_TYPE_FILTER_PANE_CHILD, LayoutsFilterPaneChild));
	return result;
}

static gboolean
___lambda496__gtk_flow_box_filter_func (GtkFlowBoxChild* child,
                                        gpointer self)
{
	gboolean result;
	result = __lambda496_ ((LayoutsSidebar*) self, child);
	return result;
}

static GtkWidget*
layouts_sidebar_build_filters_flowbox (LayoutsSidebar* self)
{
	GtkFlowBox* flowbox = NULL;
	GtkFlowBox* _tmp0_ = NULL;
	ObjectsFiltersInbox* _tmp1_;
	ObjectsFiltersInbox* _tmp2_;
	LayoutsFilterPaneChild* _tmp3_;
	LayoutsFilterPaneChild* _tmp4_;
	ObjectsFiltersToday* _tmp5_;
	ObjectsFiltersToday* _tmp6_;
	Util* _tmp7_;
	Util* _tmp8_;
	gchar* _tmp9_;
	LayoutsFilterPaneChild* _tmp10_ = NULL;
	LayoutsFilterPaneChild* _tmp11_;
	ObjectsFiltersScheduled* _tmp12_;
	ObjectsFiltersScheduled* _tmp13_;
	Util* _tmp14_;
	Util* _tmp15_;
	gchar* _tmp16_;
	LayoutsFilterPaneChild* _tmp17_ = NULL;
	LayoutsFilterPaneChild* _tmp18_;
	ObjectsFiltersLabels* _tmp19_;
	ObjectsFiltersLabels* _tmp20_;
	Util* _tmp21_;
	Util* _tmp22_;
	gchar* _tmp23_;
	LayoutsFilterPaneChild* _tmp24_ = NULL;
	LayoutsFilterPaneChild* _tmp25_;
	ObjectsFiltersPinboard* _tmp26_;
	ObjectsFiltersPinboard* _tmp27_;
	Util* _tmp28_;
	Util* _tmp29_;
	gchar* _tmp30_;
	LayoutsFilterPaneChild* _tmp31_ = NULL;
	LayoutsFilterPaneChild* _tmp32_;
	ObjectsFiltersCompleted* _tmp33_;
	ObjectsFiltersCompleted* _tmp34_;
	LayoutsFilterPaneChild* _tmp35_;
	LayoutsFilterPaneChild* _tmp36_;
	ObjectsFiltersTomorrow* _tmp37_;
	ObjectsFiltersTomorrow* _tmp38_;
	LayoutsFilterPaneChild* _tmp39_;
	LayoutsFilterPaneChild* _tmp40_;
	ObjectsFiltersAnytime* _tmp41_;
	ObjectsFiltersAnytime* _tmp42_;
	LayoutsFilterPaneChild* _tmp43_;
	LayoutsFilterPaneChild* _tmp44_;
	ObjectsFiltersRepeating* _tmp45_;
	ObjectsFiltersRepeating* _tmp46_;
	LayoutsFilterPaneChild* _tmp47_;
	LayoutsFilterPaneChild* _tmp48_;
	ObjectsFiltersUnlabeled* _tmp49_;
	ObjectsFiltersUnlabeled* _tmp50_;
	LayoutsFilterPaneChild* _tmp51_;
	LayoutsFilterPaneChild* _tmp52_;
	ObjectsFiltersAllItems* _tmp53_;
	ObjectsFiltersAllItems* _tmp54_;
	LayoutsFilterPaneChild* _tmp55_;
	LayoutsFilterPaneChild* _tmp56_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkFlowBox*) gtk_flow_box_new ();
	gtk_flow_box_set_homogeneous (_tmp0_, TRUE);
	gtk_flow_box_set_row_spacing (_tmp0_, (guint) 9);
	gtk_flow_box_set_column_spacing (_tmp0_, (guint) 9);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp0_, 3);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp0_, 3);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp0_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp0_, 3);
	gtk_flow_box_set_min_children_per_line (_tmp0_, (guint) 2);
	gtk_flow_box_set_max_children_per_line (_tmp0_, (guint) 2);
	g_object_ref_sink (_tmp0_);
	flowbox = _tmp0_;
	_tmp1_ = objects_filters_inbox_get_default ();
	_tmp2_ = _tmp1_;
	_tmp3_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp2_);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp4_);
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (_tmp2_);
	_tmp5_ = objects_filters_today_get_default ();
	_tmp6_ = _tmp5_;
	_tmp7_ = util_get_default ();
	_tmp8_ = _tmp7_;
	_tmp9_ = util_markup_accel_tooltip (_tmp8_, _ ("Go to Today"), "Ctrl+T");
	_tmp10_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp6_);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp10_, _tmp9_);
	_g_free0 (_tmp9_);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp11_);
	_g_object_unref0 (_tmp11_);
	_g_object_unref0 (_tmp8_);
	_g_object_unref0 (_tmp6_);
	_tmp12_ = objects_filters_scheduled_get_default ();
	_tmp13_ = _tmp12_;
	_tmp14_ = util_get_default ();
	_tmp15_ = _tmp14_;
	_tmp16_ = util_markup_accel_tooltip (_tmp15_, _ ("Go to Scheduled"), "Ctrl+U");
	_tmp17_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp13_);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp17_, _tmp16_);
	_g_free0 (_tmp16_);
	g_object_ref_sink (_tmp17_);
	_tmp18_ = _tmp17_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp18_);
	_g_object_unref0 (_tmp18_);
	_g_object_unref0 (_tmp15_);
	_g_object_unref0 (_tmp13_);
	_tmp19_ = objects_filters_labels_get_default ();
	_tmp20_ = _tmp19_;
	_tmp21_ = util_get_default ();
	_tmp22_ = _tmp21_;
	_tmp23_ = util_markup_accel_tooltip (_tmp22_, _ ("Go to Labels"), "Ctrl+L");
	_tmp24_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp20_);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp24_, _tmp23_);
	_g_free0 (_tmp23_);
	g_object_ref_sink (_tmp24_);
	_tmp25_ = _tmp24_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp25_);
	_g_object_unref0 (_tmp25_);
	_g_object_unref0 (_tmp22_);
	_g_object_unref0 (_tmp20_);
	_tmp26_ = objects_filters_pinboard_get_default ();
	_tmp27_ = _tmp26_;
	_tmp28_ = util_get_default ();
	_tmp29_ = _tmp28_;
	_tmp30_ = util_markup_accel_tooltip (_tmp29_, _ ("Go to Pinboard"), "Ctrl+P");
	_tmp31_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp27_);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp31_, _tmp30_);
	_g_free0 (_tmp30_);
	g_object_ref_sink (_tmp31_);
	_tmp32_ = _tmp31_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp32_);
	_g_object_unref0 (_tmp32_);
	_g_object_unref0 (_tmp29_);
	_g_object_unref0 (_tmp27_);
	_tmp33_ = objects_filters_completed_get_default ();
	_tmp34_ = _tmp33_;
	_tmp35_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp34_);
	g_object_ref_sink (_tmp35_);
	_tmp36_ = _tmp35_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp36_);
	_g_object_unref0 (_tmp36_);
	_g_object_unref0 (_tmp34_);
	_tmp37_ = objects_filters_tomorrow_get_default ();
	_tmp38_ = _tmp37_;
	_tmp39_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp38_);
	g_object_ref_sink (_tmp39_);
	_tmp40_ = _tmp39_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp40_);
	_g_object_unref0 (_tmp40_);
	_g_object_unref0 (_tmp38_);
	_tmp41_ = objects_filters_anytime_get_default ();
	_tmp42_ = _tmp41_;
	_tmp43_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp42_);
	g_object_ref_sink (_tmp43_);
	_tmp44_ = _tmp43_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp44_);
	_g_object_unref0 (_tmp44_);
	_g_object_unref0 (_tmp42_);
	_tmp45_ = objects_filters_repeating_get_default ();
	_tmp46_ = _tmp45_;
	_tmp47_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp46_);
	g_object_ref_sink (_tmp47_);
	_tmp48_ = _tmp47_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp48_);
	_g_object_unref0 (_tmp48_);
	_g_object_unref0 (_tmp46_);
	_tmp49_ = objects_filters_unlabeled_get_default ();
	_tmp50_ = _tmp49_;
	_tmp51_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp50_);
	g_object_ref_sink (_tmp51_);
	_tmp52_ = _tmp51_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp52_);
	_g_object_unref0 (_tmp52_);
	_g_object_unref0 (_tmp50_);
	_tmp53_ = objects_filters_all_items_get_default ();
	_tmp54_ = _tmp53_;
	_tmp55_ = layouts_filter_pane_child_new ((ObjectsBaseObject*) _tmp54_);
	g_object_ref_sink (_tmp55_);
	_tmp56_ = _tmp55_;
	gtk_flow_box_append (flowbox, (GtkWidget*) _tmp56_);
	_g_object_unref0 (_tmp56_);
	_g_object_unref0 (_tmp54_);
	g_signal_connect_object (flowbox, "child-activated", (GCallback) ___lambda494__gtk_flow_box_child_activated, self, 0);
	gtk_flow_box_set_sort_func (flowbox, ___lambda495__gtk_flow_box_sort_func, g_object_ref (self), g_object_unref);
	gtk_flow_box_set_filter_func (flowbox, ___lambda496__gtk_flow_box_filter_func, g_object_ref (self), g_object_unref);
	result = (GtkWidget*) flowbox;
	return result;
}

static void
__lambda482_ (LayoutsSidebar* self,
              GtkListBoxRow* row)
{
	LayoutsFilterPaneRow* filter = NULL;
	LayoutsFilterPaneRow* _tmp0_;
	ServicesEventBus* _tmp1_;
	ServicesEventBus* _tmp2_;
	ObjectsBaseObject* _tmp3_;
	ObjectsBaseObject* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	g_return_if_fail (row != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (row, LAYOUTS_TYPE_FILTER_PANE_ROW, LayoutsFilterPaneRow));
	filter = _tmp0_;
	_tmp1_ = services_event_bus_get_default ();
	_tmp2_ = _tmp1_;
	_tmp3_ = layouts_filter_pane_row_get_filter_type (filter);
	_tmp4_ = _tmp3_;
	_tmp5_ = objects_base_object_get_view_id (_tmp4_);
	_tmp6_ = _tmp5_;
	g_signal_emit_by_name (_tmp2_, "pane-selected", PANE_TYPE_FILTER, _tmp6_);
	_g_object_unref0 (_tmp2_);
	_g_object_unref0 (filter);
}

static void
___lambda482__gtk_list_box_row_activated (GtkListBox* _sender,
                                          GtkListBoxRow* row,
                                          gpointer self)
{
	__lambda482_ ((LayoutsSidebar*) self, row);
}

static gint
__lambda483_ (LayoutsSidebar* self,
              GtkListBoxRow* row1,
              GtkListBoxRow* row2)
{
	gint item1 = 0;
	gint item2 = 0;
	gint result;
	g_return_val_if_fail (row1 != NULL, -1);
	g_return_val_if_fail (row2 != NULL, -1);
	item1 = layouts_filter_pane_row_item_order (G_TYPE_CHECK_INSTANCE_CAST (row1, LAYOUTS_TYPE_FILTER_PANE_ROW, LayoutsFilterPaneRow));
	item2 = layouts_filter_pane_row_item_order (G_TYPE_CHECK_INSTANCE_CAST (row2, LAYOUTS_TYPE_FILTER_PANE_ROW, LayoutsFilterPaneRow));
	result = item1 - item2;
	return result;
}

static gint
___lambda483__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                      GtkListBoxRow* row2,
                                      gpointer self)
{
	gint result;
	result = __lambda483_ ((LayoutsSidebar*) self, row1, row2);
	return result;
}

static gboolean
__lambda484_ (LayoutsSidebar* self,
              GtkListBoxRow* row)
{
	gboolean result;
	g_return_val_if_fail (row != NULL, FALSE);
	result = layouts_filter_pane_row_active (G_TYPE_CHECK_INSTANCE_CAST (row, LAYOUTS_TYPE_FILTER_PANE_ROW, LayoutsFilterPaneRow));
	return result;
}

static gboolean
___lambda484__gtk_list_box_filter_func (GtkListBoxRow* row,
                                        gpointer self)
{
	gboolean result;
	result = __lambda484_ ((LayoutsSidebar*) self, row);
	return result;
}

static GtkWidget*
layouts_sidebar_build_filters_listbox (LayoutsSidebar* self)
{
	GtkListBox* listbox = NULL;
	GtkListBox* _tmp0_ = NULL;
	ObjectsFiltersInbox* _tmp1_;
	ObjectsFiltersInbox* _tmp2_;
	LayoutsFilterPaneRow* _tmp3_;
	LayoutsFilterPaneRow* _tmp4_;
	ObjectsFiltersToday* _tmp5_;
	ObjectsFiltersToday* _tmp6_;
	Util* _tmp7_;
	Util* _tmp8_;
	gchar* _tmp9_;
	LayoutsFilterPaneRow* _tmp10_ = NULL;
	LayoutsFilterPaneRow* _tmp11_;
	ObjectsFiltersScheduled* _tmp12_;
	ObjectsFiltersScheduled* _tmp13_;
	Util* _tmp14_;
	Util* _tmp15_;
	gchar* _tmp16_;
	LayoutsFilterPaneRow* _tmp17_ = NULL;
	LayoutsFilterPaneRow* _tmp18_;
	ObjectsFiltersLabels* _tmp19_;
	ObjectsFiltersLabels* _tmp20_;
	Util* _tmp21_;
	Util* _tmp22_;
	gchar* _tmp23_;
	LayoutsFilterPaneRow* _tmp24_ = NULL;
	LayoutsFilterPaneRow* _tmp25_;
	ObjectsFiltersPinboard* _tmp26_;
	ObjectsFiltersPinboard* _tmp27_;
	Util* _tmp28_;
	Util* _tmp29_;
	gchar* _tmp30_;
	LayoutsFilterPaneRow* _tmp31_ = NULL;
	LayoutsFilterPaneRow* _tmp32_;
	ObjectsFiltersCompleted* _tmp33_;
	ObjectsFiltersCompleted* _tmp34_;
	LayoutsFilterPaneRow* _tmp35_;
	LayoutsFilterPaneRow* _tmp36_;
	ObjectsFiltersTomorrow* _tmp37_;
	ObjectsFiltersTomorrow* _tmp38_;
	LayoutsFilterPaneRow* _tmp39_;
	LayoutsFilterPaneRow* _tmp40_;
	ObjectsFiltersAnytime* _tmp41_;
	ObjectsFiltersAnytime* _tmp42_;
	LayoutsFilterPaneRow* _tmp43_;
	LayoutsFilterPaneRow* _tmp44_;
	ObjectsFiltersRepeating* _tmp45_;
	ObjectsFiltersRepeating* _tmp46_;
	LayoutsFilterPaneRow* _tmp47_;
	LayoutsFilterPaneRow* _tmp48_;
	ObjectsFiltersUnlabeled* _tmp49_;
	ObjectsFiltersUnlabeled* _tmp50_;
	LayoutsFilterPaneRow* _tmp51_;
	LayoutsFilterPaneRow* _tmp52_;
	ObjectsFiltersAllItems* _tmp53_;
	ObjectsFiltersAllItems* _tmp54_;
	LayoutsFilterPaneRow* _tmp55_;
	LayoutsFilterPaneRow* _tmp56_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp0_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp0_, 3);
	g_object_ref_sink (_tmp0_);
	listbox = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) listbox, "bg-transparent");
	gtk_widget_add_css_class ((GtkWidget*) listbox, "listbox-separator-3");
	_tmp1_ = objects_filters_inbox_get_default ();
	_tmp2_ = _tmp1_;
	_tmp3_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp2_);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp4_);
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (_tmp2_);
	_tmp5_ = objects_filters_today_get_default ();
	_tmp6_ = _tmp5_;
	_tmp7_ = util_get_default ();
	_tmp8_ = _tmp7_;
	_tmp9_ = util_markup_accel_tooltip (_tmp8_, _ ("Go to Today"), "Ctrl+T");
	_tmp10_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp6_);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp10_, _tmp9_);
	_g_free0 (_tmp9_);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp11_);
	_g_object_unref0 (_tmp11_);
	_g_object_unref0 (_tmp8_);
	_g_object_unref0 (_tmp6_);
	_tmp12_ = objects_filters_scheduled_get_default ();
	_tmp13_ = _tmp12_;
	_tmp14_ = util_get_default ();
	_tmp15_ = _tmp14_;
	_tmp16_ = util_markup_accel_tooltip (_tmp15_, _ ("Go to Scheduled"), "Ctrl+U");
	_tmp17_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp13_);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp17_, _tmp16_);
	_g_free0 (_tmp16_);
	g_object_ref_sink (_tmp17_);
	_tmp18_ = _tmp17_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp18_);
	_g_object_unref0 (_tmp18_);
	_g_object_unref0 (_tmp15_);
	_g_object_unref0 (_tmp13_);
	_tmp19_ = objects_filters_labels_get_default ();
	_tmp20_ = _tmp19_;
	_tmp21_ = util_get_default ();
	_tmp22_ = _tmp21_;
	_tmp23_ = util_markup_accel_tooltip (_tmp22_, _ ("Go to Labels"), "Ctrl+L");
	_tmp24_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp20_);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp24_, _tmp23_);
	_g_free0 (_tmp23_);
	g_object_ref_sink (_tmp24_);
	_tmp25_ = _tmp24_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp25_);
	_g_object_unref0 (_tmp25_);
	_g_object_unref0 (_tmp22_);
	_g_object_unref0 (_tmp20_);
	_tmp26_ = objects_filters_pinboard_get_default ();
	_tmp27_ = _tmp26_;
	_tmp28_ = util_get_default ();
	_tmp29_ = _tmp28_;
	_tmp30_ = util_markup_accel_tooltip (_tmp29_, _ ("Go to Pinboard"), "Ctrl+P");
	_tmp31_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp27_);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp31_, _tmp30_);
	_g_free0 (_tmp30_);
	g_object_ref_sink (_tmp31_);
	_tmp32_ = _tmp31_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp32_);
	_g_object_unref0 (_tmp32_);
	_g_object_unref0 (_tmp29_);
	_g_object_unref0 (_tmp27_);
	_tmp33_ = objects_filters_completed_get_default ();
	_tmp34_ = _tmp33_;
	_tmp35_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp34_);
	g_object_ref_sink (_tmp35_);
	_tmp36_ = _tmp35_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp36_);
	_g_object_unref0 (_tmp36_);
	_g_object_unref0 (_tmp34_);
	_tmp37_ = objects_filters_tomorrow_get_default ();
	_tmp38_ = _tmp37_;
	_tmp39_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp38_);
	g_object_ref_sink (_tmp39_);
	_tmp40_ = _tmp39_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp40_);
	_g_object_unref0 (_tmp40_);
	_g_object_unref0 (_tmp38_);
	_tmp41_ = objects_filters_anytime_get_default ();
	_tmp42_ = _tmp41_;
	_tmp43_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp42_);
	g_object_ref_sink (_tmp43_);
	_tmp44_ = _tmp43_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp44_);
	_g_object_unref0 (_tmp44_);
	_g_object_unref0 (_tmp42_);
	_tmp45_ = objects_filters_repeating_get_default ();
	_tmp46_ = _tmp45_;
	_tmp47_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp46_);
	g_object_ref_sink (_tmp47_);
	_tmp48_ = _tmp47_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp48_);
	_g_object_unref0 (_tmp48_);
	_g_object_unref0 (_tmp46_);
	_tmp49_ = objects_filters_unlabeled_get_default ();
	_tmp50_ = _tmp49_;
	_tmp51_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp50_);
	g_object_ref_sink (_tmp51_);
	_tmp52_ = _tmp51_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp52_);
	_g_object_unref0 (_tmp52_);
	_g_object_unref0 (_tmp50_);
	_tmp53_ = objects_filters_all_items_get_default ();
	_tmp54_ = _tmp53_;
	_tmp55_ = layouts_filter_pane_row_new ((ObjectsBaseObject*) _tmp54_);
	g_object_ref_sink (_tmp55_);
	_tmp56_ = _tmp55_;
	gtk_list_box_append (listbox, (GtkWidget*) _tmp56_);
	_g_object_unref0 (_tmp56_);
	_g_object_unref0 (_tmp54_);
	g_signal_connect_object (listbox, "row-activated", (GCallback) ___lambda482__gtk_list_box_row_activated, self, 0);
	gtk_list_box_set_sort_func (listbox, ___lambda483__gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	gtk_list_box_set_filter_func (listbox, ___lambda484__gtk_list_box_filter_func, g_object_ref (self), g_object_unref);
	result = (GtkWidget*) listbox;
	return result;
}

LayoutsSidebar*
layouts_sidebar_construct (GType object_type)
{
	LayoutsSidebar * self = NULL;
	self = (LayoutsSidebar*) g_object_new (object_type, NULL);
	return self;
}

LayoutsSidebar*
layouts_sidebar_new (void)
{
	return layouts_sidebar_construct (LAYOUTS_TYPE_SIDEBAR);
}

static void
_layouts_sidebar_on_right_click_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                           gint n_press,
                                                           gdouble x,
                                                           gdouble y,
                                                           gpointer self)
{
	layouts_sidebar_on_right_click ((LayoutsSidebar*) self, n_press, x, y);
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static void
_layouts_sidebar___lambda497_ (LayoutsSidebar* self)
{
	GtkRevealer* _tmp0_;
	gchar* current_version = NULL;
	WidgetsNewVersionPopup* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	_tmp0_ = self->priv->update_notification_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->priv->update_notification;
	_tmp2_ = widgets_new_version_popup_get_version (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	current_version = _tmp4_;
	_tmp5_ = current_version;
	if (_tmp5_ != NULL) {
		ServicesSettings* _tmp6_;
		ServicesSettings* _tmp7_;
		GSettings* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp6_ = services_settings_get_default ();
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_->settings;
		_tmp9_ = current_version;
		_tmp10_ = string_replace (_tmp9_, "v", "");
		_tmp11_ = _tmp10_;
		g_settings_set_string (_tmp8_, "dismissed-update-version", _tmp11_);
		_g_free0 (_tmp11_);
		_g_object_unref0 (_tmp7_);
	}
	_g_free0 (current_version);
}

static void
__layouts_sidebar___lambda497__widgets_new_version_popup_dismissed (WidgetsNewVersionPopup* _sender,
                                                                    gpointer self)
{
	_layouts_sidebar___lambda497_ ((LayoutsSidebar*) self);
}

static gint
_layouts_sidebar___lambda498_ (LayoutsSidebar* self,
                               GtkListBoxRow* child1,
                               GtkListBoxRow* child2)
{
	gint item1 = 0;
	ObjectsSource* _tmp0_;
	ObjectsSource* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint item2 = 0;
	ObjectsSource* _tmp4_;
	ObjectsSource* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint result;
	g_return_val_if_fail (child1 != NULL, -1);
	g_return_val_if_fail (child2 != NULL, -1);
	_tmp0_ = layouts_sidebar_source_row_get_source (G_TYPE_CHECK_INSTANCE_CAST (child1, LAYOUTS_TYPE_SIDEBAR_SOURCE_ROW, LayoutsSidebarSourceRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_source_get_child_order (_tmp1_);
	_tmp3_ = _tmp2_;
	item1 = _tmp3_;
	_tmp4_ = layouts_sidebar_source_row_get_source (G_TYPE_CHECK_INSTANCE_CAST (child2, LAYOUTS_TYPE_SIDEBAR_SOURCE_ROW, LayoutsSidebarSourceRow));
	_tmp5_ = _tmp4_;
	_tmp6_ = objects_source_get_child_order (_tmp5_);
	_tmp7_ = _tmp6_;
	item2 = _tmp7_;
	result = item1 - item2;
	return result;
}

static gint
__layouts_sidebar___lambda498__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                       GtkListBoxRow* row2,
                                                       gpointer self)
{
	gint result;
	result = _layouts_sidebar___lambda498_ ((LayoutsSidebar*) self, row1, row2);
	return result;
}

static void
_layouts_sidebar___lambda499_ (LayoutsSidebar* self)
{
	GtkRevealer* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	_tmp0_ = self->priv->filters_revealer;
	_tmp1_ = gtk_revealer_get_child (_tmp0_);
	_tmp2_ = _tmp1_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_flow_box_get_type ())) {
		GtkRevealer* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		GtkRevealer* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		_tmp3_ = self->priv->filters_revealer;
		_tmp4_ = gtk_revealer_get_child (_tmp3_);
		_tmp5_ = _tmp4_;
		gtk_flow_box_invalidate_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_flow_box_get_type (), GtkFlowBox));
		_tmp6_ = self->priv->filters_revealer;
		_tmp7_ = gtk_revealer_get_child (_tmp6_);
		_tmp8_ = _tmp7_;
		gtk_flow_box_invalidate_filter (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_flow_box_get_type (), GtkFlowBox));
	} else {
		GtkRevealer* _tmp9_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		_tmp9_ = self->priv->filters_revealer;
		_tmp10_ = gtk_revealer_get_child (_tmp9_);
		_tmp11_ = _tmp10_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, gtk_list_box_get_type ())) {
			GtkRevealer* _tmp12_;
			GtkWidget* _tmp13_;
			GtkWidget* _tmp14_;
			GtkRevealer* _tmp15_;
			GtkWidget* _tmp16_;
			GtkWidget* _tmp17_;
			_tmp12_ = self->priv->filters_revealer;
			_tmp13_ = gtk_revealer_get_child (_tmp12_);
			_tmp14_ = _tmp13_;
			gtk_list_box_invalidate_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_list_box_get_type (), GtkListBox));
			_tmp15_ = self->priv->filters_revealer;
			_tmp16_ = gtk_revealer_get_child (_tmp15_);
			_tmp17_ = _tmp16_;
			gtk_list_box_invalidate_filter (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_list_box_get_type (), GtkListBox));
		}
	}
}

static void
__layouts_sidebar___lambda499__g_settings_changed (GSettings* _sender,
                                                   const gchar* key,
                                                   gpointer self)
{
	_layouts_sidebar___lambda499_ ((LayoutsSidebar*) self);
}

static void
_layouts_sidebar___lambda500_ (LayoutsSidebar* self)
{
	GtkListBox* _tmp0_;
	_tmp0_ = self->priv->sources_listbox;
	gtk_list_box_invalidate_sort (_tmp0_);
}

static void
__layouts_sidebar___lambda500__services_event_bus_update_sources_position (ServicesEventBus* _sender,
                                                                           gpointer self)
{
	_layouts_sidebar___lambda500_ ((LayoutsSidebar*) self);
}

static void
_layouts_sidebar_update_filter_view_g_settings_changed (GSettings* _sender,
                                                        const gchar* key,
                                                        gpointer self)
{
	layouts_sidebar_update_filter_view ((LayoutsSidebar*) self);
}

static GObject *
layouts_sidebar_constructor (GType type,
                             guint n_construct_properties,
                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	LayoutsSidebar * self;
	GtkRevealer* _tmp0_ = NULL;
	gchar* _tmp1_;
	LayoutsHeaderItem* _tmp2_ = NULL;
	gchar* _tmp3_;
	gchar** _tmp4_;
	GtkListBox* _tmp5_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp6_ = NULL;
	GtkBox* _tmp7_;
	GtkRevealer* _tmp8_;
	GtkBox* _tmp9_;
	LayoutsHeaderItem* _tmp10_;
	GtkBox* _tmp11_;
	GtkListBox* _tmp12_;
	WidgetsScrolledWindow* scrolled_window = NULL;
	GtkBox* _tmp13_;
	WidgetsScrolledWindow* _tmp14_;
	WidgetsNewVersionPopup* _tmp15_;
	WidgetsNewVersionPopup* _tmp16_;
	GtkWidget* _tmp17_;
	GtkRevealer* _tmp18_ = NULL;
	GtkOverlay* overlay = NULL;
	WidgetsScrolledWindow* _tmp19_;
	GtkWidget* _tmp20_;
	GtkOverlay* _tmp21_ = NULL;
	GtkOverlay* _tmp22_;
	GtkRevealer* _tmp23_;
	GtkOverlay* _tmp24_;
	GtkGestureClick* right_click = NULL;
	GtkGestureClick* _tmp25_ = NULL;
	GtkGestureClick* _tmp26_;
	GtkEventController* _tmp27_;
	GtkGestureClick* _tmp28_;
	WidgetsNewVersionPopup* _tmp29_;
	GtkListBox* _tmp30_;
	ServicesSettings* _tmp31_;
	ServicesSettings* _tmp32_;
	GSettings* _tmp33_;
	ServicesEventBus* _tmp34_;
	ServicesEventBus* _tmp35_;
	ServicesSettings* _tmp36_;
	ServicesSettings* _tmp37_;
	GSettings* _tmp38_;
	parent_class = G_OBJECT_CLASS (layouts_sidebar_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_SIDEBAR, LayoutsSidebar);
	_tmp0_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_revealer_set_transition_type (_tmp0_, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->filters_revealer);
	self->priv->filters_revealer = _tmp0_;
	_tmp1_ = g_strdup (_ ("No favorites available. Create one by clicking on the '+' button"));
	_tmp2_ = layouts_header_item_new (_ ("Favorites"));
	gtk_widget_set_margin_top ((GtkWidget*) _tmp2_, 6);
	layouts_header_item_set_placeholder_message (_tmp2_, _tmp1_);
	_g_free0 (_tmp1_);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->favorites_header);
	self->priv->favorites_header = _tmp2_;
	_tmp3_ = g_strdup ("listbox-background");
	_tmp4_ = g_new0 (gchar*, 1 + 1);
	_tmp4_[0] = _tmp3_;
	_tmp5_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp5_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp5_, _tmp4_);
	_tmp4_ = (_vala_array_free (_tmp4_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->sources_listbox);
	self->priv->sources_listbox = _tmp5_;
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp6_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp6_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp6_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp6_, 6);
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp6_);
	content_box = _tmp6_;
	_tmp7_ = content_box;
	_tmp8_ = self->priv->filters_revealer;
	gtk_box_append (_tmp7_, (GtkWidget*) _tmp8_);
	_tmp9_ = content_box;
	_tmp10_ = self->priv->favorites_header;
	gtk_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = content_box;
	_tmp12_ = self->priv->sources_listbox;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = content_box;
	_tmp14_ = widgets_scrolled_window_new ((GtkWidget*) _tmp13_, GTK_ORIENTATION_VERTICAL);
	g_object_ref_sink (_tmp14_);
	scrolled_window = _tmp14_;
	_tmp15_ = widgets_new_version_popup_new ();
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->update_notification);
	self->priv->update_notification = _tmp15_;
	_tmp16_ = self->priv->update_notification;
	_tmp17_ = _g_object_ref0 ((GtkWidget*) _tmp16_);
	_tmp18_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp18_, _tmp17_);
	_g_object_unref0 (_tmp17_);
	gtk_widget_set_valign ((GtkWidget*) _tmp18_, GTK_ALIGN_END);
	gtk_revealer_set_transition_type (_tmp18_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->update_notification_revealer);
	self->priv->update_notification_revealer = _tmp18_;
	_tmp19_ = scrolled_window;
	_tmp20_ = _g_object_ref0 ((GtkWidget*) _tmp19_);
	_tmp21_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_overlay_set_child (_tmp21_, _tmp20_);
	_g_object_unref0 (_tmp20_);
	g_object_ref_sink (_tmp21_);
	overlay = _tmp21_;
	_tmp22_ = overlay;
	_tmp23_ = self->priv->update_notification_revealer;
	gtk_overlay_add_overlay (_tmp22_, (GtkWidget*) _tmp23_);
	_tmp24_ = overlay;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp24_);
	layouts_sidebar_update_filter_view (self);
	layouts_sidebar_create_context_menu (self);
	_tmp25_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp25_, (guint) GDK_BUTTON_SECONDARY);
	right_click = _tmp25_;
	_tmp26_ = right_click;
	_tmp27_ = _g_object_ref0 ((GtkEventController*) _tmp26_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp27_);
	_tmp28_ = right_click;
	g_signal_connect_object (_tmp28_, "pressed", (GCallback) _layouts_sidebar_on_right_click_gtk_gesture_click_pressed, self, 0);
	_tmp29_ = self->priv->update_notification;
	g_signal_connect_object (_tmp29_, "dismissed", (GCallback) __layouts_sidebar___lambda497__widgets_new_version_popup_dismissed, self, 0);
	_tmp30_ = self->priv->sources_listbox;
	gtk_list_box_set_sort_func (_tmp30_, __layouts_sidebar___lambda498__gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	_tmp31_ = services_settings_get_default ();
	_tmp32_ = _tmp31_;
	_tmp33_ = _tmp32_->settings;
	g_signal_connect_object (_tmp33_, "changed::views-order-visible", (GCallback) __layouts_sidebar___lambda499__g_settings_changed, self, 0);
	_g_object_unref0 (_tmp32_);
	_tmp34_ = services_event_bus_get_default ();
	_tmp35_ = _tmp34_;
	g_signal_connect_object (_tmp35_, "update-sources-position", (GCallback) __layouts_sidebar___lambda500__services_event_bus_update_sources_position, self, 0);
	_g_object_unref0 (_tmp35_);
	_tmp36_ = services_settings_get_default ();
	_tmp37_ = _tmp36_;
	_tmp38_ = _tmp37_->settings;
	g_signal_connect_object (_tmp38_, "changed::filters-list-view", (GCallback) _layouts_sidebar_update_filter_view_g_settings_changed, self, 0);
	_g_object_unref0 (_tmp37_);
	_g_object_unref0 (right_click);
	_g_object_unref0 (overlay);
	_g_object_unref0 (scrolled_window);
	_g_object_unref0 (content_box);
	return obj;
}

static void
layouts_sidebar_class_init (LayoutsSidebarClass * klass,
                            gpointer klass_data)
{
	layouts_sidebar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &LayoutsSidebar_private_offset);
	G_OBJECT_CLASS (klass)->constructor = layouts_sidebar_constructor;
	G_OBJECT_CLASS (klass)->finalize = layouts_sidebar_finalize;
}

static void
layouts_sidebar_instance_init (LayoutsSidebar * self,
                               gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = layouts_sidebar_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, LAYOUTS_TYPE_PROJECT_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->favorites_hashmap = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, LAYOUTS_TYPE_SIDEBAR_SOURCE_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->sources_hashmap = _tmp1_;
}

static void
layouts_sidebar_finalize (GObject * obj)
{
	LayoutsSidebar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_SIDEBAR, LayoutsSidebar);
	_g_object_unref0 (self->priv->filters_revealer);
	_g_object_unref0 (self->priv->sources_listbox);
	_g_object_unref0 (self->priv->update_notification);
	_g_object_unref0 (self->priv->update_notification_revealer);
	_g_object_unref0 (self->priv->context_menu);
	_g_object_unref0 (self->priv->favorites_header);
	_g_object_unref0 (self->favorites_hashmap);
	_g_object_unref0 (self->sources_hashmap);
	G_OBJECT_CLASS (layouts_sidebar_parent_class)->finalize (obj);
}

static GType
layouts_sidebar_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LayoutsSidebarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) layouts_sidebar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LayoutsSidebar), 0, (GInstanceInitFunc) layouts_sidebar_instance_init, NULL };
	GType layouts_sidebar_type_id;
	layouts_sidebar_type_id = g_type_register_static (adw_bin_get_type (), "LayoutsSidebar", &g_define_type_info, 0);
	LayoutsSidebar_private_offset = g_type_add_instance_private (layouts_sidebar_type_id, sizeof (LayoutsSidebarPrivate));
	return layouts_sidebar_type_id;
}

GType
layouts_sidebar_get_type (void)
{
	static volatile gsize layouts_sidebar_type_id__once = 0;
	if (g_once_init_enter (&layouts_sidebar_type_id__once)) {
		GType layouts_sidebar_type_id;
		layouts_sidebar_type_id = layouts_sidebar_get_type_once ();
		g_once_init_leave (&layouts_sidebar_type_id__once, layouts_sidebar_type_id);
	}
	return layouts_sidebar_type_id__once;
}

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

