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

/*
* Copyright (c) 2019 Felipe Escoto (https://github.com/Philip-Scott/Notes-up)
*
* 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 2 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authored by: Felipe Escoto <felescoto95@hotmail.com>
*/

#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <granite.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include <gee.h>

#define ENOTES_PAGE_INFO_EDITOR_NB_STYLE "* { color: %s}"
#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 ENOTES_TYPE_PAGE_INFO_EDITOR (enotes_page_info_editor_get_type ())
#define ENOTES_PAGE_INFO_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_PAGE_INFO_EDITOR, ENotesPageInfoEditor))
#define ENOTES_PAGE_INFO_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_PAGE_INFO_EDITOR, ENotesPageInfoEditorClass))
#define ENOTES_IS_PAGE_INFO_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_PAGE_INFO_EDITOR))
#define ENOTES_IS_PAGE_INFO_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_PAGE_INFO_EDITOR))
#define ENOTES_PAGE_INFO_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_PAGE_INFO_EDITOR, ENotesPageInfoEditorClass))

typedef struct _ENotesPageInfoEditor ENotesPageInfoEditor;
typedef struct _ENotesPageInfoEditorClass ENotesPageInfoEditorClass;
typedef struct _ENotesPageInfoEditorPrivate ENotesPageInfoEditorPrivate;

#define ENOTES_TYPE_BUTTON_ENTRY (enotes_button_entry_get_type ())
#define ENOTES_BUTTON_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_BUTTON_ENTRY, ENotesButtonEntry))
#define ENOTES_BUTTON_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_BUTTON_ENTRY, ENotesButtonEntryClass))
#define ENOTES_IS_BUTTON_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_BUTTON_ENTRY))
#define ENOTES_IS_BUTTON_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_BUTTON_ENTRY))
#define ENOTES_BUTTON_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_BUTTON_ENTRY, ENotesButtonEntryClass))

typedef struct _ENotesButtonEntry ENotesButtonEntry;
typedef struct _ENotesButtonEntryClass ENotesButtonEntryClass;

#define ENOTES_TYPE_PAGE (enotes_page_get_type ())
#define ENOTES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_PAGE, ENotesPage))
#define ENOTES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_PAGE, ENotesPageClass))
#define ENOTES_IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_PAGE))
#define ENOTES_IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_PAGE))
#define ENOTES_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_PAGE, ENotesPageClass))

typedef struct _ENotesPage ENotesPage;
typedef struct _ENotesPageClass ENotesPageClass;

#define ENOTES_TYPE_NOTEBOOK (enotes_notebook_get_type ())
#define ENOTES_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_NOTEBOOK, ENotesNotebook))
#define ENOTES_NOTEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_NOTEBOOK, ENotesNotebookClass))
#define ENOTES_IS_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_NOTEBOOK))
#define ENOTES_IS_NOTEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_NOTEBOOK))
#define ENOTES_NOTEBOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_NOTEBOOK, ENotesNotebookClass))

typedef struct _ENotesNotebook ENotesNotebook;
typedef struct _ENotesNotebookClass ENotesNotebookClass;
enum  {
	ENOTES_PAGE_INFO_EDITOR_0_PROPERTY,
	ENOTES_PAGE_INFO_EDITOR_NUM_PROPERTIES
};
static GParamSpec* enotes_page_info_editor_properties[ENOTES_PAGE_INFO_EDITOR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _ENotesPagePrivate ENotesPagePrivate;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _ENotesNotebookPrivate ENotesNotebookPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define ENOTES_PAGE_INFO_EDITOR_TYPE_TAGS_BOX (enotes_page_info_editor_tags_box_get_type ())
#define ENOTES_PAGE_INFO_EDITOR_TAGS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_PAGE_INFO_EDITOR_TYPE_TAGS_BOX, ENotesPageInfoEditorTagsBox))
#define ENOTES_PAGE_INFO_EDITOR_TAGS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_PAGE_INFO_EDITOR_TYPE_TAGS_BOX, ENotesPageInfoEditorTagsBoxClass))
#define ENOTES_PAGE_INFO_EDITOR_IS_TAGS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_PAGE_INFO_EDITOR_TYPE_TAGS_BOX))
#define ENOTES_PAGE_INFO_EDITOR_IS_TAGS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_PAGE_INFO_EDITOR_TYPE_TAGS_BOX))
#define ENOTES_PAGE_INFO_EDITOR_TAGS_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_PAGE_INFO_EDITOR_TYPE_TAGS_BOX, ENotesPageInfoEditorTagsBoxClass))

typedef struct _ENotesPageInfoEditorTagsBox ENotesPageInfoEditorTagsBox;
typedef struct _ENotesPageInfoEditorTagsBoxClass ENotesPageInfoEditorTagsBoxClass;
typedef struct _ENotesPageInfoEditorTagsBoxPrivate ENotesPageInfoEditorTagsBoxPrivate;
enum  {
	ENOTES_PAGE_INFO_EDITOR_TAGS_BOX_0_PROPERTY,
	ENOTES_PAGE_INFO_EDITOR_TAGS_BOX_NUM_PROPERTIES
};
static GParamSpec* enotes_page_info_editor_tags_box_properties[ENOTES_PAGE_INFO_EDITOR_TAGS_BOX_NUM_PROPERTIES];

#define ENOTES_TYPE_TAG (enotes_tag_get_type ())
#define ENOTES_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_TAG, ENotesTag))
#define ENOTES_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_TAG, ENotesTagClass))
#define ENOTES_IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_TAG))
#define ENOTES_IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_TAG))
#define ENOTES_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_TAG, ENotesTagClass))

typedef struct _ENotesTag ENotesTag;
typedef struct _ENotesTagClass ENotesTagClass;

#define TYPE_DATABASE_TABLE (database_table_get_type ())
#define DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_TABLE, DatabaseTable))
#define DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_TABLE, DatabaseTableClass))
#define IS_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_TABLE))
#define IS_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_TABLE))
#define DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_TABLE, DatabaseTableClass))

typedef struct _DatabaseTable DatabaseTable;
typedef struct _DatabaseTableClass DatabaseTableClass;

#define ENOTES_TYPE_TAGS_TABLE (enotes_tags_table_get_type ())
#define ENOTES_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_TAGS_TABLE, ENotesTagsTable))
#define ENOTES_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_TAGS_TABLE, ENotesTagsTableClass))
#define ENOTES_IS_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_TAGS_TABLE))
#define ENOTES_IS_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_TAGS_TABLE))
#define ENOTES_TAGS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_TAGS_TABLE, ENotesTagsTableClass))

typedef struct _ENotesTagsTable ENotesTagsTable;
typedef struct _ENotesTagsTableClass ENotesTagsTableClass;
#define _database_table_unref0(var) ((var == NULL) ? NULL : (var = (database_table_unref (var), NULL)))
typedef struct _ENotesTagPrivate ENotesTagPrivate;
typedef struct _Block6Data Block6Data;

#define ENOTES_TYPE_APPLICATION (enotes_application_get_type ())
#define ENOTES_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_APPLICATION, ENotesApplication))
#define ENOTES_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_APPLICATION, ENotesApplicationClass))
#define ENOTES_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_APPLICATION))
#define ENOTES_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_APPLICATION))
#define ENOTES_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_APPLICATION, ENotesApplicationClass))

typedef struct _ENotesApplication ENotesApplication;
typedef struct _ENotesApplicationClass ENotesApplicationClass;
typedef struct _ENotesApplicationPrivate ENotesApplicationPrivate;

#define ENOTES_APPLICATION_TYPE_STATE (enotes_application_state_get_type ())
#define ENOTES_APPLICATION_STATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_APPLICATION_TYPE_STATE, ENotesApplicationState))
#define ENOTES_APPLICATION_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_APPLICATION_TYPE_STATE, ENotesApplicationStateClass))
#define ENOTES_APPLICATION_IS_STATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_APPLICATION_TYPE_STATE))
#define ENOTES_APPLICATION_IS_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_APPLICATION_TYPE_STATE))
#define ENOTES_APPLICATION_STATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_APPLICATION_TYPE_STATE, ENotesApplicationStateClass))

typedef struct _ENotesApplicationState ENotesApplicationState;
typedef struct _ENotesApplicationStateClass ENotesApplicationStateClass;

#define ENOTES_TYPE_NOTEBOOK_LIST_DIALOG (enotes_notebook_list_dialog_get_type ())
#define ENOTES_NOTEBOOK_LIST_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_NOTEBOOK_LIST_DIALOG, ENotesNotebookListDialog))
#define ENOTES_NOTEBOOK_LIST_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_NOTEBOOK_LIST_DIALOG, ENotesNotebookListDialogClass))
#define ENOTES_IS_NOTEBOOK_LIST_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_NOTEBOOK_LIST_DIALOG))
#define ENOTES_IS_NOTEBOOK_LIST_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_NOTEBOOK_LIST_DIALOG))
#define ENOTES_NOTEBOOK_LIST_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_NOTEBOOK_LIST_DIALOG, ENotesNotebookListDialogClass))

typedef struct _ENotesNotebookListDialog ENotesNotebookListDialog;
typedef struct _ENotesNotebookListDialogClass ENotesNotebookListDialogClass;

#define ENOTES_TYPE_WINDOW (enotes_window_get_type ())
#define ENOTES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_WINDOW, ENotesWindow))
#define ENOTES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_WINDOW, ENotesWindowClass))
#define ENOTES_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_WINDOW))
#define ENOTES_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_WINDOW))
#define ENOTES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_WINDOW, ENotesWindowClass))

typedef struct _ENotesWindow ENotesWindow;
typedef struct _ENotesWindowClass ENotesWindowClass;

struct _ENotesPageInfoEditor {
	GtkRevealer parent_instance;
	ENotesPageInfoEditorPrivate * priv;
};

struct _ENotesPageInfoEditorClass {
	GtkRevealerClass parent_class;
};

struct _ENotesPageInfoEditorPrivate {
	GtkCssProvider* notebook_css_provider;
	GtkButton* current_notebook_button;
	GtkLabel* current_notebook;
	GtkLabel* created_date_label;
	GtkLabel* updated_date_label;
	GtkGrid* grid;
	ENotesButtonEntry* page_title;
	GtkToggleButton* toggle_button;
	ENotesPage* _page;
	ENotesNotebook* _notebook;
};

struct _ENotesPage {
	GObject parent_instance;
	ENotesPagePrivate * priv;
	gint64 id;
	gint64 notebook_id;
	gchar* name;
	gchar* data;
	gchar* subtitle;
	gchar* html_cache;
	gint64 creation_date;
	gint64 modification_date;
	gboolean new_page;
	gboolean cache_changed;
	gchar* full_path;
};

struct _ENotesPageClass {
	GObjectClass parent_class;
};

struct _ENotesNotebook {
	GObject parent_instance;
	ENotesNotebookPrivate * priv;
	gint64 id;
	gint64* parent_id;
	GdkRGBA rgb;
	gchar* name;
	gchar* css;
	gchar* stylesheet;
};

struct _ENotesNotebookClass {
	GObjectClass parent_class;
};

struct _ENotesPageInfoEditorTagsBox {
	GtkScrolledWindow parent_instance;
	ENotesPageInfoEditorTagsBoxPrivate * priv;
};

struct _ENotesPageInfoEditorTagsBoxClass {
	GtkScrolledWindowClass parent_class;
};

struct _ENotesPageInfoEditorTagsBoxPrivate {
	ENotesPage* page;
	GtkGrid* grid;
	GeeArrayList* tag_widgets;
	GtkEntryCompletion* completion;
	ENotesButtonEntry* new_tag_entry;
};

struct _ENotesTag {
	GObject parent_instance;
	ENotesTagPrivate * priv;
	gint64 id;
	gchar* name;
	gchar* data;
};

struct _ENotesTagClass {
	GObjectClass parent_class;
};

struct _Block6Data {
	int _ref_count_;
	ENotesPageInfoEditorTagsBox* self;
	ENotesTag* tag;
	GtkButton* tag_button;
};

struct _ENotesApplication {
	GraniteApplication parent_instance;
	ENotesApplicationPrivate * priv;
	gboolean running;
	ENotesApplicationState* state;
};

struct _ENotesApplicationClass {
	GraniteApplicationClass parent_class;
};

static gint ENotesPageInfoEditor_private_offset;
static gpointer enotes_page_info_editor_parent_class = NULL;
static gint ENotesPageInfoEditorTagsBox_private_offset;
static gpointer enotes_page_info_editor_tags_box_parent_class = NULL;
VALA_EXTERN ENotesApplication* enotes_app;

VALA_EXTERN GType enotes_page_info_editor_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesPageInfoEditor, g_object_unref)
VALA_EXTERN GType enotes_button_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesButtonEntry, g_object_unref)
VALA_EXTERN GType enotes_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesPage, g_object_unref)
VALA_EXTERN GType enotes_notebook_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesNotebook, g_object_unref)
VALA_EXTERN ENotesPageInfoEditor* enotes_page_info_editor_new (void);
VALA_EXTERN ENotesPageInfoEditor* enotes_page_info_editor_construct (GType object_type);
static void enotes_page_info_editor_set_visibility (ENotesPageInfoEditor* self,
                                             gboolean value);
VALA_EXTERN GtkToggleButton* enotes_page_info_editor_get_toggle_button (ENotesPageInfoEditor* self);
static ENotesPage* enotes_page_info_editor_get_page (ENotesPageInfoEditor* self);
static void enotes_page_info_editor_set_page (ENotesPageInfoEditor* self,
                                       ENotesPage* value);
static void enotes_page_info_editor_set_creation_date (ENotesPageInfoEditor* self,
                                                GDateTime* value);
static void enotes_page_info_editor_set_modification_date (ENotesPageInfoEditor* self,
                                                    GDateTime* value);
VALA_EXTERN void enotes_button_entry_set_text (ENotesButtonEntry* self,
                                   const gchar* value);
static ENotesNotebook* enotes_page_info_editor_get_notebook (ENotesPageInfoEditor* self);
static void enotes_page_info_editor_set_notebook (ENotesPageInfoEditor* self,
                                           ENotesNotebook* value);
VALA_EXTERN GType enotes_page_info_editor_tags_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesPageInfoEditorTagsBox, g_object_unref)
static void enotes_page_info_editor_tags_box_refresh_completion (ENotesPageInfoEditorTagsBox* self);
VALA_EXTERN GType enotes_tag_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesTag, g_object_unref)
VALA_EXTERN gpointer database_table_ref (gpointer instance);
VALA_EXTERN void database_table_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_database_table (const gchar* name,
                                       const gchar* nick,
                                       const gchar* blurb,
                                       GType object_type,
                                       GParamFlags flags);
VALA_EXTERN void value_set_database_table (GValue* value,
                               gpointer v_object);
VALA_EXTERN void value_take_database_table (GValue* value,
                                gpointer v_object);
VALA_EXTERN gpointer value_get_database_table (const GValue* value);
VALA_EXTERN GType database_table_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DatabaseTable, database_table_unref)
VALA_EXTERN GType enotes_tags_table_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesTagsTable, database_table_unref)
VALA_EXTERN ENotesTagsTable* enotes_tags_table_get_instance (void);
VALA_EXTERN GeeArrayList* enotes_tags_table_get_tags (ENotesTagsTable* self);
static void enotes_page_info_editor_tags_box_update_tags (ENotesPageInfoEditorTagsBox* self,
                                                   ENotesPage* page);
VALA_EXTERN GeeArrayList* enotes_tags_table_get_tags_for_page (ENotesTagsTable* self,
                                                   gint64 page_id);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static gboolean ____lambda87_ (Block6Data* _data6_);
static void __lambda88_ (Block6Data* _data6_);
VALA_EXTERN void enotes_tags_table_remove_tag_from_page (ENotesTagsTable* self,
                                             gint64 tag_id,
                                             gint64 page_id);
VALA_EXTERN GType enotes_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesApplication, g_object_unref)
VALA_EXTERN GType enotes_application_state_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesApplicationState, g_object_unref)
static void ___lambda88__gtk_menu_item_activate (GtkMenuItem* _sender,
                                          gpointer self);
static gboolean _____lambda87__gtk_widget_button_release_event (GtkWidget* _sender,
                                                         GdkEventButton* event,
                                                         gpointer self);
VALA_EXTERN void enotes_button_entry_hide_entry (ENotesButtonEntry* self);
VALA_EXTERN GtkEntry* enotes_button_entry_get_entry (ENotesButtonEntry* self);
VALA_EXTERN ENotesPageInfoEditorTagsBox* enotes_page_info_editor_tags_box_new (void);
VALA_EXTERN ENotesPageInfoEditorTagsBox* enotes_page_info_editor_tags_box_construct (GType object_type);
static GObject * enotes_page_info_editor_tags_box_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties);
VALA_EXTERN ENotesButtonEntry* enotes_button_entry_new_for_tags (const gchar* tag_text);
VALA_EXTERN ENotesButtonEntry* enotes_button_entry_construct_for_tags (GType object_type,
                                                           const gchar* tag_text);
static void _enotes_page_info_editor_tags_box___lambda89_ (ENotesPageInfoEditorTagsBox* self);
VALA_EXTERN void enotes_tags_table_create_tag (ENotesTagsTable* self,
                                   const gchar* name,
                                   ENotesPage* page);
VALA_EXTERN const gchar* enotes_button_entry_get_text (ENotesButtonEntry* self);
static void __enotes_page_info_editor_tags_box___lambda89__enotes_button_entry_activated (ENotesButtonEntry* _sender,
                                                                                   gpointer self);
static void _enotes_page_info_editor_tags_box___lambda90_ (ENotesPageInfoEditorTagsBox* self);
VALA_EXTERN ENotesPage* enotes_application_state_get_opened_page (ENotesApplicationState* self);
static void __enotes_page_info_editor_tags_box___lambda90__g_object_notify (GObject* _sender,
                                                                     GParamSpec* pspec,
                                                                     gpointer self);
static void _enotes_page_info_editor_tags_box___lambda91_ (ENotesPageInfoEditorTagsBox* self);
static void __enotes_page_info_editor_tags_box___lambda91__enotes_application_state_tags_changed (ENotesApplicationState* _sender,
                                                                                           gpointer self);
static void enotes_page_info_editor_tags_box_finalize (GObject * obj);
static GType enotes_page_info_editor_tags_box_get_type_once (void);
static GObject * enotes_page_info_editor_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
VALA_EXTERN ENotesButtonEntry* enotes_button_entry_new_for_page_title (void);
VALA_EXTERN ENotesButtonEntry* enotes_button_entry_construct_for_page_title (GType object_type);
static void _enotes_page_info_editor___lambda92_ (ENotesPageInfoEditor* self);
static void __enotes_page_info_editor___lambda92__g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self);
static void _enotes_page_info_editor___lambda93_ (ENotesPageInfoEditor* self);
VALA_EXTERN ENotesNotebook* enotes_application_state_get_opened_page_notebook (ENotesApplicationState* self);
static void __enotes_page_info_editor___lambda93__g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self);
static void _enotes_page_info_editor___lambda94_ (ENotesPageInfoEditor* self);
VALA_EXTERN gboolean enotes_application_state_get_show_page_info (ENotesApplicationState* self);
static void __enotes_page_info_editor___lambda94__g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self);
static void _enotes_page_info_editor___lambda95_ (ENotesPageInfoEditor* self);
VALA_EXTERN void enotes_application_state_set_show_page_info (ENotesApplicationState* self,
                                                  gboolean value);
static void __enotes_page_info_editor___lambda95__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                      gpointer self);
static void _enotes_page_info_editor___lambda96_ (ENotesPageInfoEditor* self);
VALA_EXTERN ENotesNotebookListDialog* enotes_notebook_list_dialog_new_to_move_page (ENotesPage* page_to_move);
VALA_EXTERN ENotesNotebookListDialog* enotes_notebook_list_dialog_construct_to_move_page (GType object_type,
                                                                              ENotesPage* page_to_move);
VALA_EXTERN GType enotes_notebook_list_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesNotebookListDialog, g_object_unref)
static void __enotes_page_info_editor___lambda96__gtk_button_clicked (GtkButton* _sender,
                                                               gpointer self);
static void _enotes_page_info_editor___lambda97_ (ENotesPageInfoEditor* self);
VALA_EXTERN GType enotes_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesWindow, g_object_unref)
VALA_EXTERN ENotesWindow* enotes_application_get_app_window (ENotesApplication* self);
static void __enotes_page_info_editor___lambda97__gtk_button_clicked (GtkButton* _sender,
                                                               gpointer self);
static void _enotes_page_info_editor___lambda98_ (ENotesPageInfoEditor* self);
VALA_EXTERN void enotes_application_state_save_opened_page (ENotesApplicationState* self);
static void __enotes_page_info_editor___lambda98__enotes_button_entry_activated (ENotesButtonEntry* _sender,
                                                                          gpointer self);
static void _enotes_page_info_editor___lambda99_ (ENotesPageInfoEditor* self);
static void __enotes_page_info_editor___lambda99__enotes_application_state_update_page_title (ENotesApplicationState* _sender,
                                                                                       gpointer self);
static void _enotes_page_info_editor___lambda100_ (ENotesPageInfoEditor* self);
static void __enotes_page_info_editor___lambda100__enotes_application_state_opened_notebook_updated (ENotesApplicationState* _sender,
                                                                                              gpointer self);
static void enotes_page_info_editor_finalize (GObject * obj);
static GType enotes_page_info_editor_get_type_once (void);
static void _vala_enotes_page_info_editor_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_enotes_page_info_editor_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
enotes_page_info_editor_get_instance_private (ENotesPageInfoEditor* self)
{
	return G_STRUCT_MEMBER_P (self, ENotesPageInfoEditor_private_offset);
}

ENotesPageInfoEditor*
enotes_page_info_editor_construct (GType object_type)
{
	ENotesPageInfoEditor * self = NULL;
	self = (ENotesPageInfoEditor*) g_object_new (object_type, NULL);
	enotes_page_info_editor_set_visibility (self, FALSE);
	return self;
}

ENotesPageInfoEditor*
enotes_page_info_editor_new (void)
{
	return enotes_page_info_editor_construct (ENOTES_TYPE_PAGE_INFO_EDITOR);
}

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

GtkToggleButton*
enotes_page_info_editor_get_toggle_button (ENotesPageInfoEditor* self)
{
	GtkToggleButton* _tmp0_;
	GtkToggleButton* _tmp1_;
	GtkToggleButton* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->toggle_button;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static ENotesPage*
enotes_page_info_editor_get_page (ENotesPageInfoEditor* self)
{
	ENotesPage* result;
	ENotesPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_page;
	result = _tmp0_;
	return result;
}

static void
enotes_page_info_editor_set_page (ENotesPageInfoEditor* self,
                                  ENotesPage* value)
{
	ENotesPage* _tmp6_;
	g_return_if_fail (self != NULL);
	if (value != NULL) {
		GDateTime* _tmp0_;
		GDateTime* _tmp1_;
		GDateTime* _tmp2_;
		GDateTime* _tmp3_;
		ENotesButtonEntry* _tmp4_;
		const gchar* _tmp5_;
		enotes_page_info_editor_set_visibility (self, TRUE);
		_tmp0_ = g_date_time_new_from_unix_local (value->creation_date);
		_tmp1_ = _tmp0_;
		enotes_page_info_editor_set_creation_date (self, _tmp1_);
		_g_date_time_unref0 (_tmp1_);
		_tmp2_ = g_date_time_new_from_unix_local (value->modification_date);
		_tmp3_ = _tmp2_;
		enotes_page_info_editor_set_modification_date (self, _tmp3_);
		_g_date_time_unref0 (_tmp3_);
		_tmp4_ = self->priv->page_title;
		_tmp5_ = value->name;
		enotes_button_entry_set_text (_tmp4_, _tmp5_);
	} else {
		enotes_page_info_editor_set_visibility (self, FALSE);
	}
	_tmp6_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_page);
	self->priv->_page = _tmp6_;
}

static void
enotes_page_info_editor_set_visibility (ENotesPageInfoEditor* self,
                                        gboolean value)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GtkToggleButton* _tmp2_;
	GtkToggleButton* _tmp3_;
	GtkToggleButton* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_widget_get_visible ((GtkWidget*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == value) {
		return;
	}
	gtk_widget_set_visible ((GtkWidget*) self, value);
	gtk_widget_set_no_show_all ((GtkWidget*) self, !value);
	_tmp2_ = self->priv->toggle_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, value);
	_tmp3_ = self->priv->toggle_button;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp3_, !value);
	_tmp4_ = self->priv->toggle_button;
	gtk_widget_show_all ((GtkWidget*) _tmp4_);
	gtk_widget_show_all ((GtkWidget*) self);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static void
enotes_page_info_editor_set_creation_date (ENotesPageInfoEditor* self,
                                           GDateTime* value)
{
	gchar* date = NULL;
	gchar* _tmp0_;
	GtkLabel* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = granite_date_time_get_relative_datetime (value);
	date = _tmp0_;
	_tmp1_ = self->priv->created_date_label;
	_tmp2_ = string_to_string (date);
	_tmp3_ = g_strdup_printf (_ ("Created: %s"), _tmp2_);
	_tmp4_ = _tmp3_;
	gtk_label_set_label (_tmp1_, _tmp4_);
	_g_free0 (_tmp4_);
	_g_free0 (date);
}

static void
enotes_page_info_editor_set_modification_date (ENotesPageInfoEditor* self,
                                               GDateTime* value)
{
	gchar* date = NULL;
	gchar* _tmp0_;
	GtkLabel* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = granite_date_time_get_relative_datetime (value);
	date = _tmp0_;
	_tmp1_ = self->priv->updated_date_label;
	_tmp2_ = string_to_string (date);
	_tmp3_ = g_strdup_printf (_ ("Updated: %s"), _tmp2_);
	_tmp4_ = _tmp3_;
	gtk_label_set_label (_tmp1_, _tmp4_);
	_g_free0 (_tmp4_);
	_g_free0 (date);
}

static ENotesNotebook*
enotes_page_info_editor_get_notebook (ENotesPageInfoEditor* self)
{
	ENotesNotebook* result;
	ENotesNotebook* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_notebook;
	result = _tmp0_;
	return result;
}

static void
enotes_page_info_editor_set_notebook (ENotesPageInfoEditor* self,
                                      ENotesNotebook* value)
{
	ENotesNotebook* _tmp26_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	if (value != NULL) {
		GtkLabel* _tmp0_;
		const gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp0_ = self->priv->current_notebook;
		_tmp1_ = value->name;
		_tmp2_ = g_markup_printf_escaped ("%s<span color=\"#444\" size=\"x-large\">\342\214\204</span>", _tmp1_);
		_tmp3_ = _tmp2_;
		gtk_label_set_label (_tmp0_, _tmp3_);
		_g_free0 (_tmp3_);
		{
			gchar* style = NULL;
			gchar* _tmp4_;
			gchar* _tmp5_;
			gchar* _tmp6_;
			gchar* _tmp7_;
			GtkCssProvider* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			value->rgb.alpha = (gdouble) 1;
			_tmp4_ = gdk_rgba_to_string (&value->rgb);
			_tmp5_ = _tmp4_;
			_tmp6_ = g_strdup_printf (ENOTES_PAGE_INFO_EDITOR_NB_STYLE, _tmp5_);
			_tmp7_ = _tmp6_;
			_g_free0 (_tmp5_);
			style = _tmp7_;
			_tmp8_ = self->priv->notebook_css_provider;
			_tmp9_ = style;
			_tmp10_ = style;
			_tmp11_ = strlen (_tmp10_);
			_tmp12_ = _tmp11_;
			gtk_css_provider_load_from_data (_tmp8_, _tmp9_, (gssize) _tmp12_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (style);
				goto __catch0_g_error;
			}
			_g_free0 (style);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp13_;
			const gchar* _tmp14_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp13_ = e;
			_tmp14_ = _tmp13_->message;
			g_warning ("PageInfoEditor.vala:96: Style error: %s", _tmp14_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	} else {
		{
			GtkLabel* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* style = NULL;
			gchar* _tmp18_;
			GtkCssProvider* _tmp19_;
			const gchar* _tmp20_;
			const gchar* _tmp21_;
			gint _tmp22_;
			gint _tmp23_;
			_tmp15_ = self->priv->current_notebook;
			_tmp16_ = g_markup_printf_escaped ("%s<span color=\"#444\" size=\"x-large\">\342\214\204</span>", _ ("Not in Notebook"));
			_tmp17_ = _tmp16_;
			gtk_label_set_label (_tmp15_, _tmp17_);
			_g_free0 (_tmp17_);
			_tmp18_ = g_strdup_printf (ENOTES_PAGE_INFO_EDITOR_NB_STYLE, "#000");
			style = _tmp18_;
			_tmp19_ = self->priv->notebook_css_provider;
			_tmp20_ = style;
			_tmp21_ = style;
			_tmp22_ = strlen (_tmp21_);
			_tmp23_ = _tmp22_;
			gtk_css_provider_load_from_data (_tmp19_, _tmp20_, (gssize) _tmp23_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (style);
				goto __catch1_g_error;
			}
			_g_free0 (style);
		}
		goto __finally1;
		__catch1_g_error:
		{
			GError* e = NULL;
			GError* _tmp24_;
			const gchar* _tmp25_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp24_ = e;
			_tmp25_ = _tmp24_->message;
			g_warning ("PageInfoEditor.vala:104: Style error: %s", _tmp25_);
			_g_error_free0 (e);
		}
		__finally1:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
	_tmp26_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_notebook);
	self->priv->_notebook = _tmp26_;
}

static inline gpointer
enotes_page_info_editor_tags_box_get_instance_private (ENotesPageInfoEditorTagsBox* self)
{
	return G_STRUCT_MEMBER_P (self, ENotesPageInfoEditorTagsBox_private_offset);
}

static void
enotes_page_info_editor_tags_box_refresh_completion (ENotesPageInfoEditorTagsBox* self)
{
	GtkListStore* list_store = NULL;
	GtkListStore* _tmp0_;
	GtkEntryCompletion* _tmp1_;
	GtkListStore* _tmp2_;
	GtkTreeIter iter = {0};
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_list_store_new (1, G_TYPE_STRING, -1);
	list_store = _tmp0_;
	_tmp1_ = self->priv->completion;
	_tmp2_ = list_store;
	gtk_entry_completion_set_model (_tmp1_, (GtkTreeModel*) _tmp2_);
	{
		GeeArrayList* _tag_list = NULL;
		ENotesTagsTable* _tmp3_;
		ENotesTagsTable* _tmp4_;
		GeeArrayList* _tmp5_;
		GeeArrayList* _tmp6_;
		gint _tag_size = 0;
		GeeArrayList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _tag_index = 0;
		_tmp3_ = enotes_tags_table_get_instance ();
		_tmp4_ = _tmp3_;
		_tmp5_ = enotes_tags_table_get_tags (_tmp4_);
		_tmp6_ = _tmp5_;
		_database_table_unref0 (_tmp4_);
		_tag_list = _tmp6_;
		_tmp7_ = _tag_list;
		_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
		_tmp9_ = _tmp8_;
		_tag_size = _tmp9_;
		_tag_index = -1;
		while (TRUE) {
			gint _tmp10_;
			gint _tmp11_;
			ENotesTag* tag = NULL;
			GeeArrayList* _tmp12_;
			gpointer _tmp13_;
			GtkListStore* _tmp14_;
			GtkTreeIter _tmp15_ = {0};
			GtkListStore* _tmp16_;
			GtkTreeIter _tmp17_;
			ENotesTag* _tmp18_;
			const gchar* _tmp19_;
			_tag_index = _tag_index + 1;
			_tmp10_ = _tag_index;
			_tmp11_ = _tag_size;
			if (!(_tmp10_ < _tmp11_)) {
				break;
			}
			_tmp12_ = _tag_list;
			_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _tag_index);
			tag = (ENotesTag*) _tmp13_;
			_tmp14_ = list_store;
			gtk_list_store_append (_tmp14_, &_tmp15_);
			iter = _tmp15_;
			_tmp16_ = list_store;
			_tmp17_ = iter;
			_tmp18_ = tag;
			_tmp19_ = _tmp18_->name;
			gtk_list_store_set (_tmp16_, &_tmp17_, 0, _tmp19_, -1);
			_g_object_unref0 (tag);
		}
		_g_object_unref0 (_tag_list);
	}
	_g_object_unref0 (list_store);
}

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

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

static void
__lambda88_ (Block6Data* _data6_)
{
	ENotesPageInfoEditorTagsBox* self;
	ENotesTagsTable* _tmp0_;
	ENotesTagsTable* _tmp1_;
	ENotesTag* _tmp2_;
	ENotesPage* _tmp3_;
	ENotesApplication* _tmp4_;
	ENotesApplicationState* _tmp5_;
	self = _data6_->self;
	_tmp0_ = enotes_tags_table_get_instance ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _data6_->tag;
	_tmp3_ = self->priv->page;
	enotes_tags_table_remove_tag_from_page (_tmp1_, _tmp2_->id, _tmp3_->id);
	_database_table_unref0 (_tmp1_);
	_tmp4_ = enotes_app;
	_tmp5_ = _tmp4_->state;
	g_signal_emit_by_name (_tmp5_, "tags-changed");
}

static void
___lambda88__gtk_menu_item_activate (GtkMenuItem* _sender,
                                     gpointer self)
{
	__lambda88_ (self);
}

static gboolean
____lambda87_ (Block6Data* _data6_)
{
	ENotesPageInfoEditorTagsBox* self;
	GtkMenu* menu = NULL;
	GtkMenu* _tmp0_;
	GtkButton* _tmp1_;
	GtkMenuItem* remove = NULL;
	GtkMenuItem* _tmp2_;
	GtkButton* _tmp3_;
	gboolean result;
	self = _data6_->self;
	_tmp0_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp0_);
	menu = _tmp0_;
	_tmp1_ = _data6_->tag_button;
	g_object_set (menu, "attach-widget", (GtkWidget*) _tmp1_, NULL);
	_tmp2_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_ ("Remove tag"));
	g_object_ref_sink (_tmp2_);
	remove = _tmp2_;
	gtk_container_add ((GtkContainer*) menu, (GtkWidget*) remove);
	gtk_widget_show_all ((GtkWidget*) menu);
	_tmp3_ = _data6_->tag_button;
	gtk_menu_popup_at_widget (menu, (GtkWidget*) _tmp3_, GDK_GRAVITY_SOUTH, GDK_GRAVITY_NORTH, NULL);
	g_signal_connect_data (remove, "activate", (GCallback) ___lambda88__gtk_menu_item_activate, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	result = TRUE;
	_g_object_unref0 (remove);
	_g_object_unref0 (menu);
	return result;
}

static gboolean
_____lambda87__gtk_widget_button_release_event (GtkWidget* _sender,
                                                GdkEventButton* event,
                                                gpointer self)
{
	gboolean result;
	result = ____lambda87_ (self);
	return result;
}

static void
enotes_page_info_editor_tags_box_update_tags (ENotesPageInfoEditorTagsBox* self,
                                              ENotesPage* page)
{
	GtkGrid* _tmp0_;
	ENotesButtonEntry* _tmp1_;
	GeeArrayList* tags = NULL;
	ENotesTagsTable* _tmp11_;
	ENotesTagsTable* _tmp12_;
	GeeArrayList* _tmp13_;
	GeeArrayList* _tmp14_;
	ENotesButtonEntry* _tmp33_;
	ENotesButtonEntry* _tmp34_;
	GtkEntry* _tmp35_;
	GtkEntry* _tmp36_;
	ENotesButtonEntry* _tmp37_;
	GtkEntry* _tmp38_;
	GtkEntry* _tmp39_;
	GtkEntryCompletion* _tmp40_;
	GtkGrid* _tmp41_;
	ENotesButtonEntry* _tmp42_;
	GtkGrid* _tmp43_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->grid;
	_tmp1_ = self->priv->new_tag_entry;
	gtk_container_remove ((GtkContainer*) _tmp0_, (GtkWidget*) _tmp1_);
	{
		GeeArrayList* _child_list = NULL;
		GeeArrayList* _tmp2_;
		gint _child_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _child_index = 0;
		_tmp2_ = self->priv->tag_widgets;
		_child_list = _tmp2_;
		_tmp3_ = _child_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_child_size = _tmp5_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			GtkWidget* child = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			GtkWidget* _tmp10_;
			_child_index = _child_index + 1;
			_tmp6_ = _child_index;
			_tmp7_ = _child_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _child_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _child_index);
			child = (GtkWidget*) _tmp9_;
			_tmp10_ = child;
			gtk_widget_destroy (_tmp10_);
			_g_object_unref0 (child);
		}
	}
	if (page == NULL) {
		return;
	}
	_tmp11_ = enotes_tags_table_get_instance ();
	_tmp12_ = _tmp11_;
	_tmp13_ = enotes_tags_table_get_tags_for_page (_tmp12_, page->id);
	_tmp14_ = _tmp13_;
	_database_table_unref0 (_tmp12_);
	tags = _tmp14_;
	{
		GeeArrayList* _tag_list = NULL;
		GeeArrayList* _tmp15_;
		gint _tag_size = 0;
		GeeArrayList* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		gint _tag_index = 0;
		_tmp15_ = tags;
		_tag_list = _tmp15_;
		_tmp16_ = _tag_list;
		_tmp17_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tag_size = _tmp18_;
		_tag_index = -1;
		while (TRUE) {
			Block6Data* _data6_;
			gint _tmp19_;
			gint _tmp20_;
			GeeArrayList* _tmp21_;
			gpointer _tmp22_;
			ENotesTag* _tmp23_;
			const gchar* _tmp24_;
			GtkButton* _tmp25_;
			GtkButton* _tmp26_;
			GtkStyleContext* _tmp27_;
			GtkGrid* _tmp28_;
			GtkButton* _tmp29_;
			GeeArrayList* _tmp30_;
			GtkButton* _tmp31_;
			GtkButton* _tmp32_;
			_data6_ = g_slice_new0 (Block6Data);
			_data6_->_ref_count_ = 1;
			_data6_->self = g_object_ref (self);
			_tag_index = _tag_index + 1;
			_tmp19_ = _tag_index;
			_tmp20_ = _tag_size;
			if (!(_tmp19_ < _tmp20_)) {
				block6_data_unref (_data6_);
				_data6_ = NULL;
				break;
			}
			_tmp21_ = _tag_list;
			_tmp22_ = gee_abstract_list_get ((GeeAbstractList*) _tmp21_, _tag_index);
			_data6_->tag = (ENotesTag*) _tmp22_;
			_tmp23_ = _data6_->tag;
			_tmp24_ = _tmp23_->name;
			_tmp25_ = (GtkButton*) gtk_button_new_with_label (_tmp24_);
			g_object_ref_sink (_tmp25_);
			_data6_->tag_button = _tmp25_;
			_tmp26_ = _data6_->tag_button;
			_tmp27_ = gtk_widget_get_style_context ((GtkWidget*) _tmp26_);
			gtk_style_context_add_class (_tmp27_, "flat");
			_tmp28_ = self->priv->grid;
			_tmp29_ = _data6_->tag_button;
			gtk_container_add ((GtkContainer*) _tmp28_, (GtkWidget*) _tmp29_);
			_tmp30_ = self->priv->tag_widgets;
			_tmp31_ = _data6_->tag_button;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp30_, (GtkWidget*) _tmp31_);
			_tmp32_ = _data6_->tag_button;
			g_signal_connect_data ((GtkWidget*) _tmp32_, "button-release-event", (GCallback) _____lambda87__gtk_widget_button_release_event, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
			block6_data_unref (_data6_);
			_data6_ = NULL;
		}
	}
	_tmp33_ = self->priv->new_tag_entry;
	enotes_button_entry_hide_entry (_tmp33_);
	_tmp34_ = self->priv->new_tag_entry;
	_tmp35_ = enotes_button_entry_get_entry (_tmp34_);
	_tmp36_ = _tmp35_;
	gtk_entry_set_text (_tmp36_, "");
	_tmp37_ = self->priv->new_tag_entry;
	_tmp38_ = enotes_button_entry_get_entry (_tmp37_);
	_tmp39_ = _tmp38_;
	_tmp40_ = self->priv->completion;
	gtk_entry_set_completion (_tmp39_, _tmp40_);
	_tmp41_ = self->priv->grid;
	_tmp42_ = self->priv->new_tag_entry;
	gtk_container_add ((GtkContainer*) _tmp41_, (GtkWidget*) _tmp42_);
	_tmp43_ = self->priv->grid;
	gtk_widget_show_all ((GtkWidget*) _tmp43_);
	_g_object_unref0 (tags);
}

ENotesPageInfoEditorTagsBox*
enotes_page_info_editor_tags_box_construct (GType object_type)
{
	ENotesPageInfoEditorTagsBox * self = NULL;
	self = (ENotesPageInfoEditorTagsBox*) g_object_new (object_type, NULL);
	return self;
}

ENotesPageInfoEditorTagsBox*
enotes_page_info_editor_tags_box_new (void)
{
	return enotes_page_info_editor_tags_box_construct (ENOTES_PAGE_INFO_EDITOR_TYPE_TAGS_BOX);
}

static void
_enotes_page_info_editor_tags_box___lambda89_ (ENotesPageInfoEditorTagsBox* self)
{
	ENotesTagsTable* _tmp0_;
	ENotesTagsTable* _tmp1_;
	ENotesButtonEntry* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	ENotesPage* _tmp5_;
	ENotesApplication* _tmp6_;
	ENotesApplicationState* _tmp7_;
	_tmp0_ = enotes_tags_table_get_instance ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->new_tag_entry;
	_tmp3_ = enotes_button_entry_get_text (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->page;
	enotes_tags_table_create_tag (_tmp1_, _tmp4_, _tmp5_);
	_database_table_unref0 (_tmp1_);
	_tmp6_ = enotes_app;
	_tmp7_ = _tmp6_->state;
	g_signal_emit_by_name (_tmp7_, "tags-changed");
}

static void
__enotes_page_info_editor_tags_box___lambda89__enotes_button_entry_activated (ENotesButtonEntry* _sender,
                                                                              gpointer self)
{
	_enotes_page_info_editor_tags_box___lambda89_ ((ENotesPageInfoEditorTagsBox*) self);
}

static void
_enotes_page_info_editor_tags_box___lambda90_ (ENotesPageInfoEditorTagsBox* self)
{
	ENotesApplication* _tmp0_;
	ENotesApplicationState* _tmp1_;
	ENotesPage* _tmp2_;
	ENotesPage* _tmp3_;
	ENotesPage* _tmp4_;
	ENotesPage* _tmp5_;
	_tmp0_ = enotes_app;
	_tmp1_ = _tmp0_->state;
	_tmp2_ = enotes_application_state_get_opened_page (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (self->priv->page);
	self->priv->page = _tmp4_;
	_tmp5_ = self->priv->page;
	enotes_page_info_editor_tags_box_update_tags (self, _tmp5_);
}

static void
__enotes_page_info_editor_tags_box___lambda90__g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self)
{
	_enotes_page_info_editor_tags_box___lambda90_ ((ENotesPageInfoEditorTagsBox*) self);
}

static void
_enotes_page_info_editor_tags_box___lambda91_ (ENotesPageInfoEditorTagsBox* self)
{
	ENotesPage* _tmp0_;
	_tmp0_ = self->priv->page;
	enotes_page_info_editor_tags_box_update_tags (self, _tmp0_);
	enotes_page_info_editor_tags_box_refresh_completion (self);
}

static void
__enotes_page_info_editor_tags_box___lambda91__enotes_application_state_tags_changed (ENotesApplicationState* _sender,
                                                                                      gpointer self)
{
	_enotes_page_info_editor_tags_box___lambda91_ ((ENotesPageInfoEditorTagsBox*) self);
}

static GObject *
enotes_page_info_editor_tags_box_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ENotesPageInfoEditorTagsBox * self;
	GeeArrayList* _tmp0_;
	ENotesButtonEntry* _tmp1_;
	ENotesButtonEntry* _tmp2_;
	GtkEntryCompletion* _tmp3_;
	GtkEntryCompletion* _tmp4_;
	GtkGrid* _tmp5_;
	GtkGrid* _tmp6_;
	GtkGrid* _tmp7_;
	GtkGrid* _tmp8_;
	GtkGrid* _tmp9_;
	GtkImage* _tmp10_;
	GtkImage* _tmp11_;
	GtkGrid* _tmp12_;
	ENotesButtonEntry* _tmp13_;
	GtkGrid* _tmp14_;
	ENotesApplication* _tmp15_;
	ENotesApplicationState* _tmp16_;
	ENotesApplication* _tmp17_;
	ENotesApplicationState* _tmp18_;
	parent_class = G_OBJECT_CLASS (enotes_page_info_editor_tags_box_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ENOTES_PAGE_INFO_EDITOR_TYPE_TAGS_BOX, ENotesPageInfoEditorTagsBox);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	gtk_widget_set_valign ((GtkWidget*) self, GTK_ALIGN_CENTER);
	_tmp0_ = gee_array_list_new (gtk_widget_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->tag_widgets);
	self->priv->tag_widgets = _tmp0_;
	_tmp1_ = enotes_button_entry_new_for_tags (_ ("Click to add tag…"));
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->new_tag_entry);
	self->priv->new_tag_entry = _tmp1_;
	_tmp2_ = self->priv->new_tag_entry;
	g_signal_connect_object (_tmp2_, "activated", (GCallback) __enotes_page_info_editor_tags_box___lambda89__enotes_button_entry_activated, self, 0);
	_tmp3_ = gtk_entry_completion_new ();
	_g_object_unref0 (self->priv->completion);
	self->priv->completion = _tmp3_;
	_tmp4_ = self->priv->completion;
	gtk_entry_completion_set_text_column (_tmp4_, 0);
	_tmp5_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->grid);
	self->priv->grid = _tmp5_;
	_tmp6_ = self->priv->grid;
	gtk_orientable_set_orientation ((GtkOrientable*) _tmp6_, GTK_ORIENTATION_HORIZONTAL);
	_tmp7_ = self->priv->grid;
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	_tmp8_ = self->priv->grid;
	gtk_grid_set_column_spacing (_tmp8_, 3);
	_tmp9_ = self->priv->grid;
	_tmp10_ = (GtkImage*) gtk_image_new_from_icon_name ("tag-symbolic", (GtkIconSize) GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	gtk_container_add ((GtkContainer*) _tmp9_, (GtkWidget*) _tmp11_);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = self->priv->grid;
	_tmp13_ = self->priv->new_tag_entry;
	gtk_container_add ((GtkContainer*) _tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = self->priv->grid;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp14_);
	gtk_widget_show_all ((GtkWidget*) self);
	_tmp15_ = enotes_app;
	_tmp16_ = _tmp15_->state;
	g_signal_connect_object ((GObject*) _tmp16_, "notify::opened-page", (GCallback) __enotes_page_info_editor_tags_box___lambda90__g_object_notify, self, 0);
	_tmp17_ = enotes_app;
	_tmp18_ = _tmp17_->state;
	g_signal_connect_object (_tmp18_, "tags-changed", (GCallback) __enotes_page_info_editor_tags_box___lambda91__enotes_application_state_tags_changed, self, 0);
	enotes_page_info_editor_tags_box_refresh_completion (self);
	return obj;
}

static void
enotes_page_info_editor_tags_box_class_init (ENotesPageInfoEditorTagsBoxClass * klass,
                                             gpointer klass_data)
{
	enotes_page_info_editor_tags_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ENotesPageInfoEditorTagsBox_private_offset);
	G_OBJECT_CLASS (klass)->constructor = enotes_page_info_editor_tags_box_constructor;
	G_OBJECT_CLASS (klass)->finalize = enotes_page_info_editor_tags_box_finalize;
}

static void
enotes_page_info_editor_tags_box_instance_init (ENotesPageInfoEditorTagsBox * self,
                                                gpointer klass)
{
	self->priv = enotes_page_info_editor_tags_box_get_instance_private (self);
}

static void
enotes_page_info_editor_tags_box_finalize (GObject * obj)
{
	ENotesPageInfoEditorTagsBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ENOTES_PAGE_INFO_EDITOR_TYPE_TAGS_BOX, ENotesPageInfoEditorTagsBox);
	_g_object_unref0 (self->priv->page);
	_g_object_unref0 (self->priv->grid);
	_g_object_unref0 (self->priv->tag_widgets);
	_g_object_unref0 (self->priv->completion);
	_g_object_unref0 (self->priv->new_tag_entry);
	G_OBJECT_CLASS (enotes_page_info_editor_tags_box_parent_class)->finalize (obj);
}

static GType
enotes_page_info_editor_tags_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ENotesPageInfoEditorTagsBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) enotes_page_info_editor_tags_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ENotesPageInfoEditorTagsBox), 0, (GInstanceInitFunc) enotes_page_info_editor_tags_box_instance_init, NULL };
	GType enotes_page_info_editor_tags_box_type_id;
	enotes_page_info_editor_tags_box_type_id = g_type_register_static (gtk_scrolled_window_get_type (), "ENotesPageInfoEditorTagsBox", &g_define_type_info, 0);
	ENotesPageInfoEditorTagsBox_private_offset = g_type_add_instance_private (enotes_page_info_editor_tags_box_type_id, sizeof (ENotesPageInfoEditorTagsBoxPrivate));
	return enotes_page_info_editor_tags_box_type_id;
}

GType
enotes_page_info_editor_tags_box_get_type (void)
{
	static volatile gsize enotes_page_info_editor_tags_box_type_id__once = 0;
	if (g_once_init_enter (&enotes_page_info_editor_tags_box_type_id__once)) {
		GType enotes_page_info_editor_tags_box_type_id;
		enotes_page_info_editor_tags_box_type_id = enotes_page_info_editor_tags_box_get_type_once ();
		g_once_init_leave (&enotes_page_info_editor_tags_box_type_id__once, enotes_page_info_editor_tags_box_type_id);
	}
	return enotes_page_info_editor_tags_box_type_id__once;
}

static void
_enotes_page_info_editor___lambda92_ (ENotesPageInfoEditor* self)
{
	ENotesApplication* _tmp0_;
	ENotesApplicationState* _tmp1_;
	ENotesPage* _tmp2_;
	ENotesPage* _tmp3_;
	_tmp0_ = enotes_app;
	_tmp1_ = _tmp0_->state;
	_tmp2_ = enotes_application_state_get_opened_page (_tmp1_);
	_tmp3_ = _tmp2_;
	enotes_page_info_editor_set_page (self, _tmp3_);
}

static void
__enotes_page_info_editor___lambda92__g_object_notify (GObject* _sender,
                                                       GParamSpec* pspec,
                                                       gpointer self)
{
	_enotes_page_info_editor___lambda92_ ((ENotesPageInfoEditor*) self);
}

static void
_enotes_page_info_editor___lambda93_ (ENotesPageInfoEditor* self)
{
	ENotesApplication* _tmp0_;
	ENotesApplicationState* _tmp1_;
	ENotesNotebook* _tmp2_;
	ENotesNotebook* _tmp3_;
	_tmp0_ = enotes_app;
	_tmp1_ = _tmp0_->state;
	_tmp2_ = enotes_application_state_get_opened_page_notebook (_tmp1_);
	_tmp3_ = _tmp2_;
	enotes_page_info_editor_set_notebook (self, _tmp3_);
}

static void
__enotes_page_info_editor___lambda93__g_object_notify (GObject* _sender,
                                                       GParamSpec* pspec,
                                                       gpointer self)
{
	_enotes_page_info_editor___lambda93_ ((ENotesPageInfoEditor*) self);
}

static void
_enotes_page_info_editor___lambda94_ (ENotesPageInfoEditor* self)
{
	ENotesApplication* _tmp0_;
	ENotesApplicationState* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GtkToggleButton* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	_tmp0_ = enotes_app;
	_tmp1_ = _tmp0_->state;
	_tmp2_ = enotes_application_state_get_show_page_info (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_revealer_set_reveal_child ((GtkRevealer*) self, _tmp3_);
	_tmp4_ = self->priv->toggle_button;
	_tmp5_ = gtk_revealer_get_reveal_child ((GtkRevealer*) self);
	_tmp6_ = _tmp5_;
	if (gtk_toggle_button_get_active (_tmp4_) != _tmp6_) {
		GtkToggleButton* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp7_ = self->priv->toggle_button;
		_tmp8_ = gtk_revealer_get_reveal_child ((GtkRevealer*) self);
		_tmp9_ = _tmp8_;
		gtk_toggle_button_set_active (_tmp7_, _tmp9_);
	}
}

static void
__enotes_page_info_editor___lambda94__g_object_notify (GObject* _sender,
                                                       GParamSpec* pspec,
                                                       gpointer self)
{
	_enotes_page_info_editor___lambda94_ ((ENotesPageInfoEditor*) self);
}

static void
_enotes_page_info_editor___lambda95_ (ENotesPageInfoEditor* self)
{
	ENotesApplication* _tmp0_;
	ENotesApplicationState* _tmp1_;
	GtkToggleButton* _tmp2_;
	_tmp0_ = enotes_app;
	_tmp1_ = _tmp0_->state;
	_tmp2_ = self->priv->toggle_button;
	enotes_application_state_set_show_page_info (_tmp1_, gtk_toggle_button_get_active (_tmp2_));
}

static void
__enotes_page_info_editor___lambda95__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                 gpointer self)
{
	_enotes_page_info_editor___lambda95_ ((ENotesPageInfoEditor*) self);
}

static void
_enotes_page_info_editor___lambda96_ (ENotesPageInfoEditor* self)
{
	ENotesPage* _tmp0_;
	ENotesPage* _tmp1_;
	ENotesNotebookListDialog* _tmp2_;
	ENotesNotebookListDialog* _tmp3_;
	_tmp0_ = enotes_page_info_editor_get_page (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = enotes_notebook_list_dialog_new_to_move_page (_tmp1_);
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp3_);
}

static void
__enotes_page_info_editor___lambda96__gtk_button_clicked (GtkButton* _sender,
                                                          gpointer self)
{
	_enotes_page_info_editor___lambda96_ ((ENotesPageInfoEditor*) self);
}

static void
_enotes_page_info_editor___lambda97_ (ENotesPageInfoEditor* self)
{
	GtkClipboard* clipboard = NULL;
	ENotesApplication* _tmp0_;
	ENotesWindow* _tmp1_;
	ENotesWindow* _tmp2_;
	GdkDisplay* _tmp3_;
	GtkClipboard* _tmp4_;
	GtkClipboard* _tmp5_;
	GtkClipboard* _tmp6_;
	ENotesPage* p = NULL;
	ENotesPage* _tmp7_;
	ENotesPage* _tmp8_;
	ENotesPage* _tmp9_;
	gchar* link_text = NULL;
	ENotesPage* _tmp10_;
	ENotesPage* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	GtkClipboard* _tmp14_;
	const gchar* _tmp15_;
	_tmp0_ = enotes_app;
	_tmp1_ = enotes_application_get_app_window (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_widget_get_display ((GtkWidget*) _tmp2_);
	_tmp4_ = gtk_clipboard_get_default (_tmp3_);
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp2_);
	clipboard = _tmp6_;
	_tmp7_ = enotes_page_info_editor_get_page (self);
	_tmp8_ = _tmp7_;
	_tmp9_ = _g_object_ref0 (_tmp8_);
	p = _tmp9_;
	_tmp10_ = p;
	_tmp11_ = p;
	_tmp12_ = _tmp11_->name;
	_tmp13_ = g_strdup_printf ("<page %lld %s %s>", _tmp10_->id, _ ("Link to: "), _tmp12_);
	link_text = _tmp13_;
	_tmp14_ = clipboard;
	_tmp15_ = link_text;
	gtk_clipboard_set_text (_tmp14_, _tmp15_, -1);
	_g_free0 (link_text);
	_g_object_unref0 (p);
	_g_object_unref0 (clipboard);
}

static void
__enotes_page_info_editor___lambda97__gtk_button_clicked (GtkButton* _sender,
                                                          gpointer self)
{
	_enotes_page_info_editor___lambda97_ ((ENotesPageInfoEditor*) self);
}

static void
_enotes_page_info_editor___lambda98_ (ENotesPageInfoEditor* self)
{
	ENotesApplication* _tmp0_;
	ENotesApplicationState* _tmp1_;
	ENotesPage* _tmp2_;
	ENotesPage* _tmp3_;
	ENotesButtonEntry* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	ENotesApplication* _tmp8_;
	ENotesApplicationState* _tmp9_;
	_tmp0_ = enotes_app;
	_tmp1_ = _tmp0_->state;
	_tmp2_ = enotes_application_state_get_opened_page (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->page_title;
	_tmp5_ = enotes_button_entry_get_text (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 (_tmp3_->name);
	_tmp3_->name = _tmp7_;
	_tmp8_ = enotes_app;
	_tmp9_ = _tmp8_->state;
	enotes_application_state_save_opened_page (_tmp9_);
}

static void
__enotes_page_info_editor___lambda98__enotes_button_entry_activated (ENotesButtonEntry* _sender,
                                                                     gpointer self)
{
	_enotes_page_info_editor___lambda98_ ((ENotesPageInfoEditor*) self);
}

static void
_enotes_page_info_editor___lambda99_ (ENotesPageInfoEditor* self)
{
	ENotesApplication* _tmp0_;
	ENotesApplicationState* _tmp1_;
	ENotesPage* _tmp2_;
	ENotesPage* _tmp3_;
	_tmp0_ = enotes_app;
	_tmp1_ = _tmp0_->state;
	_tmp2_ = enotes_application_state_get_opened_page (_tmp1_);
	_tmp3_ = _tmp2_;
	enotes_page_info_editor_set_page (self, _tmp3_);
}

static void
__enotes_page_info_editor___lambda99__enotes_application_state_update_page_title (ENotesApplicationState* _sender,
                                                                                  gpointer self)
{
	_enotes_page_info_editor___lambda99_ ((ENotesPageInfoEditor*) self);
}

static void
_enotes_page_info_editor___lambda100_ (ENotesPageInfoEditor* self)
{
	ENotesApplication* _tmp0_;
	ENotesApplicationState* _tmp1_;
	ENotesNotebook* _tmp2_;
	ENotesNotebook* _tmp3_;
	_tmp0_ = enotes_app;
	_tmp1_ = _tmp0_->state;
	_tmp2_ = enotes_application_state_get_opened_page_notebook (_tmp1_);
	_tmp3_ = _tmp2_;
	enotes_page_info_editor_set_notebook (self, _tmp3_);
}

static void
__enotes_page_info_editor___lambda100__enotes_application_state_opened_notebook_updated (ENotesApplicationState* _sender,
                                                                                         gpointer self)
{
	_enotes_page_info_editor___lambda100_ ((ENotesPageInfoEditor*) self);
}

static GObject *
enotes_page_info_editor_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ENotesPageInfoEditor * self;
	GtkGrid* _tmp0_;
	GtkGrid* _tmp1_;
	GtkGrid* _tmp2_;
	GtkStyleContext* _tmp3_;
	GtkGrid* _tmp4_;
	GtkStyleContext* _tmp5_;
	GtkGrid* button_grid = NULL;
	GtkGrid* _tmp6_;
	GtkGrid* _tmp7_;
	GtkButton* _tmp8_;
	GtkButton* _tmp9_;
	GtkStyleContext* _tmp10_;
	GtkButton* _tmp11_;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	GtkCssProvider* _tmp14_;
	GtkLabel* _tmp15_;
	GtkStyleContext* _tmp16_;
	GtkCssProvider* _tmp17_;
	GtkGrid* _tmp18_;
	GtkImage* _tmp19_;
	GtkImage* _tmp20_;
	GtkGrid* _tmp21_;
	GtkLabel* _tmp22_;
	GtkButton* _tmp23_;
	GtkGrid* _tmp24_;
	GtkSeparator* mid_separator = NULL;
	GtkSeparator* _tmp25_;
	GtkSeparator* _tmp26_;
	GtkLabel* _tmp27_;
	GtkLabel* _tmp28_;
	GtkLabel* _tmp29_;
	GtkLabel* _tmp30_;
	GtkStyleContext* _tmp31_;
	GtkLabel* _tmp32_;
	GtkLabel* _tmp33_;
	GtkLabel* _tmp34_;
	GtkLabel* _tmp35_;
	GtkLabel* _tmp36_;
	GtkStyleContext* _tmp37_;
	GtkLabel* _tmp38_;
	GtkSeparator* bottom_separator = NULL;
	GtkSeparator* _tmp39_;
	GtkSeparator* _tmp40_;
	ENotesButtonEntry* _tmp41_;
	GtkButton* link_to_page_button = NULL;
	GtkButton* _tmp42_;
	GtkButton* _tmp43_;
	GtkButton* _tmp44_;
	GtkButton* _tmp45_;
	GtkBox* bottom_box = NULL;
	GtkBox* _tmp46_;
	GtkBox* _tmp47_;
	ENotesButtonEntry* _tmp48_;
	GtkBox* _tmp49_;
	GtkLabel* _tmp50_;
	GtkBox* _tmp51_;
	GtkLabel* _tmp52_;
	GtkBox* _tmp53_;
	GtkButton* _tmp54_;
	ENotesPageInfoEditorTagsBox* tags_box = NULL;
	ENotesPageInfoEditorTagsBox* _tmp55_;
	GtkGrid* _tmp56_;
	GtkButton* _tmp57_;
	GtkGrid* _tmp58_;
	GtkSeparator* _tmp59_;
	GtkSeparator* _tmp60_;
	GtkGrid* _tmp61_;
	ENotesPageInfoEditorTagsBox* _tmp62_;
	GtkGrid* _tmp63_;
	GtkSeparator* _tmp64_;
	GtkGrid* _tmp65_;
	GtkBox* _tmp66_;
	GtkGrid* _tmp67_;
	GtkSeparator* _tmp68_;
	GtkGrid* _tmp69_;
	ENotesApplication* _tmp70_;
	ENotesApplicationState* _tmp71_;
	ENotesApplication* _tmp72_;
	ENotesApplicationState* _tmp73_;
	GtkToggleButton* _tmp74_;
	GtkToggleButton* _tmp75_;
	GtkStyleContext* _tmp76_;
	GtkToggleButton* _tmp77_;
	GtkStyleContext* _tmp78_;
	GtkToggleButton* _tmp79_;
	ENotesApplication* _tmp80_;
	gchar** _tmp81_;
	gchar** _tmp82_;
	gchar** _tmp83_;
	gint _tmp83__length1;
	gchar* _tmp84_;
	gchar* _tmp85_;
	GtkToggleButton* _tmp86_;
	GtkImage* icon = NULL;
	GtkImage* _tmp87_;
	GtkImage* _tmp88_;
	GtkImage* _tmp89_;
	GtkToggleButton* _tmp90_;
	GtkImage* _tmp91_;
	ENotesApplication* _tmp92_;
	ENotesApplicationState* _tmp93_;
	GtkToggleButton* _tmp94_;
	GtkButton* _tmp95_;
	GtkButton* _tmp96_;
	ENotesButtonEntry* _tmp97_;
	ENotesApplication* _tmp98_;
	ENotesApplicationState* _tmp99_;
	ENotesApplication* _tmp100_;
	ENotesApplicationState* _tmp101_;
	parent_class = G_OBJECT_CLASS (enotes_page_info_editor_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ENOTES_TYPE_PAGE_INFO_EDITOR, ENotesPageInfoEditor);
	_tmp0_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->grid);
	self->priv->grid = _tmp0_;
	_tmp1_ = self->priv->grid;
	gtk_grid_set_column_spacing (_tmp1_, 16);
	_tmp2_ = self->priv->grid;
	_tmp3_ = gtk_widget_get_style_context ((GtkWidget*) _tmp2_);
	gtk_style_context_add_class (_tmp3_, "inline-toolbar");
	_tmp4_ = self->priv->grid;
	_tmp5_ = gtk_widget_get_style_context ((GtkWidget*) _tmp4_);
	gtk_style_context_add_class (_tmp5_, "toolbar");
	_tmp6_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp6_);
	button_grid = _tmp6_;
	_tmp7_ = button_grid;
	gtk_orientable_set_orientation ((GtkOrientable*) _tmp7_, GTK_ORIENTATION_HORIZONTAL);
	_tmp8_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->current_notebook_button);
	self->priv->current_notebook_button = _tmp8_;
	_tmp9_ = self->priv->current_notebook_button;
	_tmp10_ = gtk_widget_get_style_context ((GtkWidget*) _tmp9_);
	gtk_style_context_add_class (_tmp10_, "flat");
	_tmp11_ = self->priv->current_notebook_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp11_, _ ("Move page…"));
	_tmp12_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->current_notebook);
	self->priv->current_notebook = _tmp12_;
	_tmp13_ = self->priv->current_notebook;
	gtk_label_set_use_markup (_tmp13_, TRUE);
	_tmp14_ = gtk_css_provider_new ();
	_g_object_unref0 (self->priv->notebook_css_provider);
	self->priv->notebook_css_provider = _tmp14_;
	_tmp15_ = self->priv->current_notebook;
	_tmp16_ = gtk_widget_get_style_context ((GtkWidget*) _tmp15_);
	_tmp17_ = self->priv->notebook_css_provider;
	gtk_style_context_add_provider (_tmp16_, (GtkStyleProvider*) _tmp17_, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
	_tmp18_ = button_grid;
	_tmp19_ = (GtkImage*) gtk_image_new_from_icon_name ("notebook-symbolic", (GtkIconSize) GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp19_);
	_tmp20_ = _tmp19_;
	gtk_container_add ((GtkContainer*) _tmp18_, (GtkWidget*) _tmp20_);
	_g_object_unref0 (_tmp20_);
	_tmp21_ = button_grid;
	_tmp22_ = self->priv->current_notebook;
	gtk_container_add ((GtkContainer*) _tmp21_, (GtkWidget*) _tmp22_);
	_tmp23_ = self->priv->current_notebook_button;
	_tmp24_ = button_grid;
	gtk_container_add ((GtkContainer*) _tmp23_, (GtkWidget*) _tmp24_);
	_tmp25_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp25_);
	mid_separator = _tmp25_;
	_tmp26_ = mid_separator;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp26_, TRUE);
	_tmp27_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp27_);
	_g_object_unref0 (self->priv->created_date_label);
	self->priv->created_date_label = _tmp27_;
	_tmp28_ = self->priv->created_date_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp28_, GTK_ALIGN_START);
	_tmp29_ = self->priv->created_date_label;
	gtk_label_set_use_markup (_tmp29_, TRUE);
	_tmp30_ = self->priv->created_date_label;
	_tmp31_ = gtk_widget_get_style_context ((GtkWidget*) _tmp30_);
	gtk_style_context_add_class (_tmp31_, "h4");
	_tmp32_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp32_);
	_g_object_unref0 (self->priv->updated_date_label);
	self->priv->updated_date_label = _tmp32_;
	_tmp33_ = self->priv->updated_date_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp33_, GTK_ALIGN_START);
	_tmp34_ = self->priv->updated_date_label;
	gtk_label_set_use_markup (_tmp34_, TRUE);
	_tmp35_ = self->priv->updated_date_label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp35_, TRUE);
	_tmp36_ = self->priv->updated_date_label;
	_tmp37_ = gtk_widget_get_style_context ((GtkWidget*) _tmp36_);
	gtk_style_context_add_class (_tmp37_, "h4");
	_tmp38_ = self->priv->updated_date_label;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp38_, 8);
	_tmp39_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp39_);
	bottom_separator = _tmp39_;
	_tmp40_ = bottom_separator;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp40_, TRUE);
	_tmp41_ = enotes_button_entry_new_for_page_title ();
	g_object_ref_sink (_tmp41_);
	_g_object_unref0 (self->priv->page_title);
	self->priv->page_title = _tmp41_;
	_tmp42_ = (GtkButton*) gtk_button_new_from_icon_name ("insert-link-symbolic", (GtkIconSize) GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp42_);
	link_to_page_button = _tmp42_;
	_tmp43_ = link_to_page_button;
	gtk_widget_set_halign ((GtkWidget*) _tmp43_, GTK_ALIGN_END);
	_tmp44_ = link_to_page_button;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp44_, 6);
	_tmp45_ = link_to_page_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp45_, _ ("Copy link to page to clipboard"));
	_tmp46_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 16);
	g_object_ref_sink (_tmp46_);
	bottom_box = _tmp46_;
	_tmp47_ = bottom_box;
	_tmp48_ = self->priv->page_title;
	gtk_container_add ((GtkContainer*) _tmp47_, (GtkWidget*) _tmp48_);
	_tmp49_ = bottom_box;
	_tmp50_ = self->priv->created_date_label;
	gtk_container_add ((GtkContainer*) _tmp49_, (GtkWidget*) _tmp50_);
	_tmp51_ = bottom_box;
	_tmp52_ = self->priv->updated_date_label;
	gtk_container_add ((GtkContainer*) _tmp51_, (GtkWidget*) _tmp52_);
	_tmp53_ = bottom_box;
	_tmp54_ = link_to_page_button;
	gtk_container_add ((GtkContainer*) _tmp53_, (GtkWidget*) _tmp54_);
	_tmp55_ = enotes_page_info_editor_tags_box_new ();
	g_object_ref_sink (_tmp55_);
	tags_box = _tmp55_;
	_tmp56_ = self->priv->grid;
	_tmp57_ = self->priv->current_notebook_button;
	gtk_grid_attach (_tmp56_, (GtkWidget*) _tmp57_, 0, 0, 1, 1);
	_tmp58_ = self->priv->grid;
	_tmp59_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_VERTICAL);
	g_object_ref_sink (_tmp59_);
	_tmp60_ = _tmp59_;
	gtk_grid_attach (_tmp58_, (GtkWidget*) _tmp60_, 1, 0, 1, 1);
	_g_object_unref0 (_tmp60_);
	_tmp61_ = self->priv->grid;
	_tmp62_ = tags_box;
	gtk_grid_attach (_tmp61_, (GtkWidget*) _tmp62_, 2, 0, 1, 1);
	_tmp63_ = self->priv->grid;
	_tmp64_ = mid_separator;
	gtk_grid_attach (_tmp63_, (GtkWidget*) _tmp64_, 0, 1, 3, 1);
	_tmp65_ = self->priv->grid;
	_tmp66_ = bottom_box;
	gtk_grid_attach (_tmp65_, (GtkWidget*) _tmp66_, 0, 2, 3, 1);
	_tmp67_ = self->priv->grid;
	_tmp68_ = bottom_separator;
	gtk_grid_attach (_tmp67_, (GtkWidget*) _tmp68_, 0, 3, 3, 1);
	gtk_widget_show_all ((GtkWidget*) self);
	_tmp69_ = self->priv->grid;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp69_);
	_tmp70_ = enotes_app;
	_tmp71_ = _tmp70_->state;
	g_signal_connect_object ((GObject*) _tmp71_, "notify::opened-page", (GCallback) __enotes_page_info_editor___lambda92__g_object_notify, self, 0);
	_tmp72_ = enotes_app;
	_tmp73_ = _tmp72_->state;
	g_signal_connect_object ((GObject*) _tmp73_, "notify::opened-page-notebook", (GCallback) __enotes_page_info_editor___lambda93__g_object_notify, self, 0);
	_tmp74_ = (GtkToggleButton*) gtk_toggle_button_new ();
	g_object_ref_sink (_tmp74_);
	_g_object_unref0 (self->priv->toggle_button);
	self->priv->toggle_button = _tmp74_;
	_tmp75_ = self->priv->toggle_button;
	_tmp76_ = gtk_widget_get_style_context ((GtkWidget*) _tmp75_);
	gtk_style_context_add_class (_tmp76_, "flat");
	_tmp77_ = self->priv->toggle_button;
	_tmp78_ = gtk_widget_get_style_context ((GtkWidget*) _tmp77_);
	gtk_style_context_add_class (_tmp78_, "circular");
	_tmp79_ = self->priv->toggle_button;
	_tmp80_ = enotes_app;
	_tmp82_ = _tmp81_ = gtk_application_get_accels_for_action ((GtkApplication*) _tmp80_, "win.page-info-action");
	_tmp83_ = _tmp82_;
	_tmp83__length1 = _vala_array_length (_tmp81_);
	_tmp84_ = granite_markup_accel_tooltip (_tmp83_, (gint) _vala_array_length (_tmp81_), _ ("Toggle page information"));
	_tmp85_ = _tmp84_;
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp79_, _tmp85_);
	_g_free0 (_tmp85_);
	_tmp83_ = (_vala_array_free (_tmp83_, _tmp83__length1, (GDestroyNotify) g_free), NULL);
	_tmp86_ = self->priv->toggle_button;
	gtk_widget_set_can_focus ((GtkWidget*) _tmp86_, FALSE);
	_tmp87_ = (GtkImage*) gtk_image_new_from_icon_name ("view-more-symbolic", (GtkIconSize) GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp87_);
	icon = _tmp87_;
	_tmp88_ = icon;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp88_, 3);
	_tmp89_ = icon;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp89_, 3);
	_tmp90_ = self->priv->toggle_button;
	_tmp91_ = icon;
	gtk_container_add ((GtkContainer*) _tmp90_, (GtkWidget*) _tmp91_);
	_tmp92_ = enotes_app;
	_tmp93_ = _tmp92_->state;
	g_signal_connect_object ((GObject*) _tmp93_, "notify::show-page-info", (GCallback) __enotes_page_info_editor___lambda94__g_object_notify, self, 0);
	_tmp94_ = self->priv->toggle_button;
	g_signal_connect_object (_tmp94_, "toggled", (GCallback) __enotes_page_info_editor___lambda95__gtk_toggle_button_toggled, self, 0);
	_tmp95_ = self->priv->current_notebook_button;
	g_signal_connect_object (_tmp95_, "clicked", (GCallback) __enotes_page_info_editor___lambda96__gtk_button_clicked, self, 0);
	_tmp96_ = link_to_page_button;
	g_signal_connect_object (_tmp96_, "clicked", (GCallback) __enotes_page_info_editor___lambda97__gtk_button_clicked, self, 0);
	_tmp97_ = self->priv->page_title;
	g_signal_connect_object (_tmp97_, "activated", (GCallback) __enotes_page_info_editor___lambda98__enotes_button_entry_activated, self, 0);
	_tmp98_ = enotes_app;
	_tmp99_ = _tmp98_->state;
	g_signal_connect_object (_tmp99_, "update-page-title", (GCallback) __enotes_page_info_editor___lambda99__enotes_application_state_update_page_title, self, 0);
	_tmp100_ = enotes_app;
	_tmp101_ = _tmp100_->state;
	g_signal_connect_object (_tmp101_, "opened-notebook-updated", (GCallback) __enotes_page_info_editor___lambda100__enotes_application_state_opened_notebook_updated, self, 0);
	enotes_page_info_editor_set_notebook (self, NULL);
	_g_object_unref0 (icon);
	_g_object_unref0 (tags_box);
	_g_object_unref0 (bottom_box);
	_g_object_unref0 (link_to_page_button);
	_g_object_unref0 (bottom_separator);
	_g_object_unref0 (mid_separator);
	_g_object_unref0 (button_grid);
	return obj;
}

static void
enotes_page_info_editor_class_init (ENotesPageInfoEditorClass * klass,
                                    gpointer klass_data)
{
	enotes_page_info_editor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ENotesPageInfoEditor_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_enotes_page_info_editor_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_enotes_page_info_editor_set_property;
	G_OBJECT_CLASS (klass)->constructor = enotes_page_info_editor_constructor;
	G_OBJECT_CLASS (klass)->finalize = enotes_page_info_editor_finalize;
}

static void
enotes_page_info_editor_instance_init (ENotesPageInfoEditor * self,
                                       gpointer klass)
{
	self->priv = enotes_page_info_editor_get_instance_private (self);
}

static void
enotes_page_info_editor_finalize (GObject * obj)
{
	ENotesPageInfoEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ENOTES_TYPE_PAGE_INFO_EDITOR, ENotesPageInfoEditor);
	_g_object_unref0 (self->priv->notebook_css_provider);
	_g_object_unref0 (self->priv->current_notebook_button);
	_g_object_unref0 (self->priv->current_notebook);
	_g_object_unref0 (self->priv->created_date_label);
	_g_object_unref0 (self->priv->updated_date_label);
	_g_object_unref0 (self->priv->grid);
	_g_object_unref0 (self->priv->page_title);
	_g_object_unref0 (self->priv->toggle_button);
	_g_object_unref0 (self->priv->_page);
	_g_object_unref0 (self->priv->_notebook);
	G_OBJECT_CLASS (enotes_page_info_editor_parent_class)->finalize (obj);
}

static GType
enotes_page_info_editor_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ENotesPageInfoEditorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) enotes_page_info_editor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ENotesPageInfoEditor), 0, (GInstanceInitFunc) enotes_page_info_editor_instance_init, NULL };
	GType enotes_page_info_editor_type_id;
	enotes_page_info_editor_type_id = g_type_register_static (gtk_revealer_get_type (), "ENotesPageInfoEditor", &g_define_type_info, 0);
	ENotesPageInfoEditor_private_offset = g_type_add_instance_private (enotes_page_info_editor_type_id, sizeof (ENotesPageInfoEditorPrivate));
	return enotes_page_info_editor_type_id;
}

GType
enotes_page_info_editor_get_type (void)
{
	static volatile gsize enotes_page_info_editor_type_id__once = 0;
	if (g_once_init_enter (&enotes_page_info_editor_type_id__once)) {
		GType enotes_page_info_editor_type_id;
		enotes_page_info_editor_type_id = enotes_page_info_editor_get_type_once ();
		g_once_init_leave (&enotes_page_info_editor_type_id__once, enotes_page_info_editor_type_id);
	}
	return enotes_page_info_editor_type_id__once;
}

static void
_vala_enotes_page_info_editor_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	ENotesPageInfoEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ENOTES_TYPE_PAGE_INFO_EDITOR, ENotesPageInfoEditor);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_enotes_page_info_editor_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	ENotesPageInfoEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ENOTES_TYPE_PAGE_INFO_EDITOR, ENotesPageInfoEditor);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

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

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

