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

/*
* Copyright (c) 2018-2026 (https://github.com/phase1geo/Minder)
*
* 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., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Trevor Williams <phase1geo@gmail.com>
*/

#include <gtk/gtk.h>
#include <glib-object.h>
#include <gtksourceview/gtksource.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <gio/gio.h>

#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 TYPE_NODE_INSPECTOR (node_inspector_get_type ())
#define NODE_INSPECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_INSPECTOR, NodeInspector))
#define NODE_INSPECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE_INSPECTOR, NodeInspectorClass))
#define IS_NODE_INSPECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_INSPECTOR))
#define IS_NODE_INSPECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE_INSPECTOR))
#define NODE_INSPECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE_INSPECTOR, NodeInspectorClass))

typedef struct _NodeInspector NodeInspector;
typedef struct _NodeInspectorClass NodeInspectorClass;
typedef struct _NodeInspectorPrivate NodeInspectorPrivate;

#define TYPE_NOTE_VIEW (note_view_get_type ())
#define NOTE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTE_VIEW, NoteView))
#define NOTE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTE_VIEW, NoteViewClass))
#define IS_NOTE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTE_VIEW))
#define IS_NOTE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTE_VIEW))
#define NOTE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTE_VIEW, NoteViewClass))

typedef struct _NoteView NoteView;
typedef struct _NoteViewClass NoteViewClass;

#define TYPE_MIND_MAP (mind_map_get_type ())
#define MIND_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MIND_MAP, MindMap))
#define MIND_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MIND_MAP, MindMapClass))
#define IS_MIND_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MIND_MAP))
#define IS_MIND_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MIND_MAP))
#define MIND_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MIND_MAP, MindMapClass))

typedef struct _MindMap MindMap;
typedef struct _MindMapClass MindMapClass;

#define TYPE_NODE (node_get_type ())
#define NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE, Node))
#define NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE, NodeClass))
#define IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE))
#define IS_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE))
#define NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE, NodeClass))

typedef struct _Node Node;
typedef struct _NodeClass NodeClass;
enum  {
	NODE_INSPECTOR_0_PROPERTY,
	NODE_INSPECTOR_NOTE_PROPERTY,
	NODE_INSPECTOR_NUM_PROPERTIES
};
static GParamSpec* node_inspector_properties[NODE_INSPECTOR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _mind_map_unref0(var) ((var == NULL) ? NULL : (var = (mind_map_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#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 TYPE_MAP_MODEL (map_model_get_type ())
#define MAP_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAP_MODEL, MapModel))
#define MAP_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAP_MODEL, MapModelClass))
#define IS_MAP_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAP_MODEL))
#define IS_MAP_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAP_MODEL))
#define MAP_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAP_MODEL, MapModelClass))

typedef struct _MapModel MapModel;
typedef struct _MapModelClass MapModelClass;

#define TYPE_UNICODE_INSERT (unicode_insert_get_type ())
#define UNICODE_INSERT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNICODE_INSERT, UnicodeInsert))
#define UNICODE_INSERT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNICODE_INSERT, UnicodeInsertClass))
#define IS_UNICODE_INSERT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNICODE_INSERT))
#define IS_UNICODE_INSERT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNICODE_INSERT))
#define UNICODE_INSERT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNICODE_INSERT, UnicodeInsertClass))

typedef struct _UnicodeInsert UnicodeInsert;
typedef struct _UnicodeInsertClass UnicodeInsertClass;

#define TYPE_NODE_LINK (node_link_get_type ())
#define NODE_LINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_LINK, NodeLink))
#define NODE_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE_LINK, NodeLinkClass))
#define IS_NODE_LINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_LINK))
#define IS_NODE_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE_LINK))
#define NODE_LINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE_LINK, NodeLinkClass))

typedef struct _NodeLink NodeLink;
typedef struct _NodeLinkClass NodeLinkClass;
typedef struct _Block45Data Block45Data;
typedef struct _Block46Data Block46Data;

#define TYPE_THEME (theme_get_type ())
#define THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THEME, Theme))
#define THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THEME, ThemeClass))
#define IS_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THEME))
#define IS_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THEME))
#define THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THEME, ThemeClass))

typedef struct _Theme Theme;
typedef struct _ThemeClass ThemeClass;
#define __vala_GdkRGBA_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkRGBA_free (var), NULL)))

#define TYPE_UNDO_ITEM (undo_item_get_type ())
#define UNDO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_ITEM, UndoItem))
#define UNDO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_ITEM, UndoItemClass))
#define IS_UNDO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_ITEM))
#define IS_UNDO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_ITEM))
#define UNDO_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_ITEM, UndoItemClass))

typedef struct _UndoItem UndoItem;
typedef struct _UndoItemClass UndoItemClass;

#define TYPE_UNDO_NODE_NOTE (undo_node_note_get_type ())
#define UNDO_NODE_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_NODE_NOTE, UndoNodeNote))
#define UNDO_NODE_NOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_NODE_NOTE, UndoNodeNoteClass))
#define IS_UNDO_NODE_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_NODE_NOTE))
#define IS_UNDO_NODE_NOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_NODE_NOTE))
#define UNDO_NODE_NOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_NODE_NOTE, UndoNodeNoteClass))

typedef struct _UndoNodeNote UndoNodeNote;
typedef struct _UndoNodeNoteClass UndoNodeNoteClass;

#define TYPE_NODE_LINKS (node_links_get_type ())
#define NODE_LINKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_LINKS, NodeLinks))
#define NODE_LINKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE_LINKS, NodeLinksClass))
#define IS_NODE_LINKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_LINKS))
#define IS_NODE_LINKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE_LINKS))
#define NODE_LINKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE_LINKS, NodeLinksClass))

typedef struct _NodeLinks NodeLinks;
typedef struct _NodeLinksClass NodeLinksClass;
#define _node_link_unref0(var) ((var == NULL) ? NULL : (var = (node_link_unref (var), NULL)))

#define TYPE_NODE_IMAGE (node_image_get_type ())
#define NODE_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_IMAGE, NodeImage))
#define NODE_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE_IMAGE, NodeImageClass))
#define IS_NODE_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_IMAGE))
#define IS_NODE_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE_IMAGE))
#define NODE_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE_IMAGE, NodeImageClass))

typedef struct _NodeImage NodeImage;
typedef struct _NodeImageClass NodeImageClass;

#define TYPE_IMAGE_MANAGER (image_manager_get_type ())
#define IMAGE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMAGE_MANAGER, ImageManager))
#define IMAGE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMAGE_MANAGER, ImageManagerClass))
#define IS_IMAGE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMAGE_MANAGER))
#define IS_IMAGE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMAGE_MANAGER))
#define IMAGE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMAGE_MANAGER, ImageManagerClass))

typedef struct _ImageManager ImageManager;
typedef struct _ImageManagerClass ImageManagerClass;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
enum  {
	NODE_INSPECTOR_UPDATE_ICONS_SIGNAL,
	NODE_INSPECTOR_EDITABLE_CHANGED_SIGNAL,
	NODE_INSPECTOR_NUM_SIGNALS
};
static guint node_inspector_signals[NODE_INSPECTOR_NUM_SIGNALS] = {0};

struct _NodeInspector {
	GtkBox parent_instance;
	NodeInspectorPrivate * priv;
};

struct _NodeInspectorClass {
	GtkBoxClass parent_class;
};

struct _NodeInspectorPrivate {
	GtkScrolledWindow* _sw;
	GtkSwitch* _task;
	GtkSwitch* _fold;
	GtkSwitch* _sequence;
	GtkBox* _link_box;
	GtkColorButton* _link_color;
	NoteView* _note;
	MindMap* _map;
	GtkButton* _detach_btn;
	gchar* _orig_note;
	Node* _node;
	GtkStack* _image_stack;
	GtkPicture* _image;
	GtkButton* _image_btn;
	GtkLabel* _image_loc;
	GtkSwitch* _override;
	GtkColorButton* _root_color;
	GtkBox* _root_color_box;
	GtkRevealer* _color_reveal;
	GtkToggleButton* _resize;
	gboolean _ignore;
};

struct _Block45Data {
	int _ref_count_;
	NodeInspector* self;
	GtkButton* btn;
};

struct _Block46Data {
	int _ref_count_;
	NodeInspector* self;
	GtkButton* btn_edit;
	GtkButton* btn_del;
};

static gint NodeInspector_private_offset;
static gpointer node_inspector_parent_class = NULL;

VALA_EXTERN GType node_inspector_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeInspector, g_object_unref)
VALA_EXTERN GType note_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NoteView, g_object_unref)
VALA_EXTERN gpointer mind_map_ref (gpointer instance);
VALA_EXTERN void mind_map_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_mind_map (const gchar* name,
                                 const gchar* nick,
                                 const gchar* blurb,
                                 GType object_type,
                                 GParamFlags flags);
VALA_EXTERN void value_set_mind_map (GValue* value,
                         gpointer v_object);
VALA_EXTERN void value_take_mind_map (GValue* value,
                          gpointer v_object);
VALA_EXTERN gpointer value_get_mind_map (const GValue* value);
VALA_EXTERN GType mind_map_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MindMap, mind_map_unref)
VALA_EXTERN GType node_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Node, g_object_unref)
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_unref)
VALA_EXTERN NodeInspector* node_inspector_new (MainWindow* win);
VALA_EXTERN NodeInspector* node_inspector_construct (GType object_type,
                                         MainWindow* win);
static void node_inspector_create_title (NodeInspector* self);
static void node_inspector_create_task (NodeInspector* self);
static void node_inspector_create_fold (NodeInspector* self);
static void node_inspector_create_sequence (NodeInspector* self);
static void node_inspector_create_link (NodeInspector* self);
static void node_inspector_create_color (NodeInspector* self);
static void node_inspector_create_note (NodeInspector* self,
                                 MainWindow* win);
static void node_inspector_create_image (NodeInspector* self);
static void node_inspector_create_buttons (NodeInspector* self);
static void node_inspector_tab_changed (NodeInspector* self,
                                 MindMap* map);
static void _node_inspector_tab_changed_main_window_canvas_changed (MainWindow* _sender,
                                                             MindMap* map,
                                                             gpointer self);
static void node_inspector_node_changed (NodeInspector* self);
static void _node_inspector_node_changed_mind_map_current_changed (MindMap* _sender,
                                                            MindMap* map,
                                                            gpointer self);
static void node_inspector_theme_changed (NodeInspector* self,
                                   MindMap* map);
static void _node_inspector_theme_changed_mind_map_theme_changed (MindMap* _sender,
                                                           MindMap* map,
                                                           gpointer self);
VALA_EXTERN void node_inspector_set_width (NodeInspector* self,
                               gint width);
static void node_inspector_task_changed (NodeInspector* self);
static void _node_inspector_task_changed_g_object_notify (GObject* _sender,
                                                   GParamSpec* pspec,
                                                   gpointer self);
static void node_inspector_fold_changed (NodeInspector* self);
static void _node_inspector_fold_changed_g_object_notify (GObject* _sender,
                                                   GParamSpec* pspec,
                                                   gpointer self);
static void node_inspector_sequence_changed (NodeInspector* self);
static void _node_inspector_sequence_changed_g_object_notify (GObject* _sender,
                                                       GParamSpec* pspec,
                                                       gpointer self);
static void __lambda130_ (NodeInspector* self);
VALA_EXTERN gpointer map_model_ref (gpointer instance);
VALA_EXTERN void map_model_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_map_model (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags);
VALA_EXTERN void value_set_map_model (GValue* value,
                          gpointer v_object);
VALA_EXTERN void value_take_map_model (GValue* value,
                           gpointer v_object);
VALA_EXTERN gpointer value_get_map_model (const GValue* value);
VALA_EXTERN GType map_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MapModel, map_model_unref)
VALA_EXTERN MapModel* mind_map_get_model (MindMap* self);
VALA_EXTERN void map_model_change_current_link_color (MapModel* self,
                                          GdkRGBA* color);
static void ___lambda130__gtk_color_button_color_set (GtkColorButton* _sender,
                                               gpointer self);
static void node_inspector_root_color_changed (NodeInspector* self);
static void _node_inspector_root_color_changed_g_object_notify (GObject* _sender,
                                                         GParamSpec* pspec,
                                                         gpointer self);
static void __lambda131_ (NodeInspector* self);
static void ___lambda131__gtk_color_button_color_set (GtkColorButton* _sender,
                                               gpointer self);
VALA_EXTERN NoteView* note_view_new (MainWindow* win);
VALA_EXTERN NoteView* note_view_construct (GType object_type,
                               MainWindow* win);
VALA_EXTERN gpointer unicode_insert_ref (gpointer instance);
VALA_EXTERN void unicode_insert_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_unicode_insert (const gchar* name,
                                       const gchar* nick,
                                       const gchar* blurb,
                                       GType object_type,
                                       GParamFlags flags);
VALA_EXTERN void value_set_unicode_insert (GValue* value,
                               gpointer v_object);
VALA_EXTERN void value_take_unicode_insert (GValue* value,
                                gpointer v_object);
VALA_EXTERN gpointer value_get_unicode_insert (const GValue* value);
VALA_EXTERN GType unicode_insert_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UnicodeInsert, unicode_insert_unref)
VALA_EXTERN void note_view_add_unicode_completion (NoteView* self,
                                       MainWindow* win,
                                       UnicodeInsert* unicoder);
VALA_EXTERN UnicodeInsert* main_window_get_unicoder (MainWindow* self);
static void node_inspector_note_changed (NodeInspector* self);
static void _node_inspector_note_changed_gtk_text_buffer_changed (GtkTextBuffer* _sender,
                                                           gpointer self);
static void node_inspector_note_focus_in (NodeInspector* self);
static void _node_inspector_note_focus_in_gtk_event_controller_focus_enter (GtkEventControllerFocus* _sender,
                                                                     gpointer self);
static void node_inspector_note_focus_out (NodeInspector* self);
static void _node_inspector_note_focus_out_gtk_event_controller_focus_leave (GtkEventControllerFocus* _sender,
                                                                      gpointer self);
VALA_EXTERN gpointer node_link_ref (gpointer instance);
VALA_EXTERN void node_link_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_node_link (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags);
VALA_EXTERN void value_set_node_link (GValue* value,
                          gpointer v_object);
VALA_EXTERN void value_take_node_link (GValue* value,
                           gpointer v_object);
VALA_EXTERN gpointer value_get_node_link (const GValue* value);
VALA_EXTERN GType node_link_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeLink, node_link_unref)
static gint node_inspector_note_node_link_added (NodeInspector* self,
                                          NodeLink* link,
                                          gchar** text);
static gint _node_inspector_note_node_link_added_note_view_node_link_added (NoteView* _sender,
                                                                     NodeLink* link,
                                                                     gchar** text,
                                                                     gpointer self);
static void node_inspector_note_node_link_clicked (NodeInspector* self,
                                            gint id);
static void _node_inspector_note_node_link_clicked_note_view_node_link_clicked (NoteView* _sender,
                                                                         gint id,
                                                                         gpointer self);
static void node_inspector_note_node_link_hover (NodeInspector* self,
                                          gint id);
static void _node_inspector_note_node_link_hover_note_view_node_link_hover (NoteView* _sender,
                                                                     gint id,
                                                                     gpointer self);
static GtkBox* node_inspector_create_image_add (NodeInspector* self);
static GtkBox* node_inspector_create_image_edit (NodeInspector* self);
static Block45Data* block45_data_ref (Block45Data* _data45_);
static void block45_data_unref (void * _userdata_);
static void node_inspector_image_button_clicked (NodeInspector* self);
static void _node_inspector_image_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                              gpointer self);
static void __lambda132_ (Block45Data* _data45_);
VALA_EXTERN gboolean mind_map_get_editable (MindMap* self);
static void ___lambda132__node_inspector_editable_changed (NodeInspector* _sender,
                                                    gpointer self);
static Block46Data* block46_data_ref (Block46Data* _data46_);
static void block46_data_unref (void * _userdata_);
static void __lambda133_ (NodeInspector* self);
VALA_EXTERN void map_model_edit_current_image (MapModel* self);
static void ___lambda133__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda134_ (NodeInspector* self);
VALA_EXTERN void map_model_delete_current_image (MapModel* self);
static void ___lambda134__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda135_ (NodeInspector* self);
VALA_EXTERN Node* mind_map_get_current_node (MindMap* self);
VALA_EXTERN void node_set_image_resizable (Node* self,
                               gboolean value);
VALA_EXTERN void mind_map_auto_save (MindMap* self);
static void ___lambda135__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                              gpointer self);
static void __lambda136_ (Block46Data* _data46_);
static void ___lambda136__node_inspector_editable_changed (NodeInspector* _sender,
                                                    gpointer self);
static gboolean __lambda137_ (NodeInspector* self,
                       GdkDrop* d);
static gboolean ___lambda137__gtk_drop_target_accept (GtkDropTarget* _sender,
                                               GdkDrop* drop,
                                               gpointer self);
static gboolean __lambda138_ (NodeInspector* self,
                       GValue* val,
                       gdouble x,
                       gdouble y);
VALA_EXTERN gboolean map_model_update_current_image (MapModel* self,
                                         const gchar* uri);
static gboolean ___lambda138__gtk_drop_target_drop (GtkDropTarget* _sender,
                                             GValue* value,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
VALA_EXTERN void map_model_add_current_image (MapModel* self);
static gboolean node_inspector_image_link_clicked (NodeInspector* self,
                                            const gchar* uri);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void node_inspector_node_copy (NodeInspector* self);
static void _node_inspector_node_copy_gtk_button_clicked (GtkButton* _sender,
                                                   gpointer self);
static void node_inspector_node_cut (NodeInspector* self);
static void _node_inspector_node_cut_gtk_button_clicked (GtkButton* _sender,
                                                  gpointer self);
static void node_inspector_node_detach (NodeInspector* self);
static void _node_inspector_node_detach_gtk_button_clicked (GtkButton* _sender,
                                                     gpointer self);
static void __lambda139_ (NodeInspector* self);
VALA_EXTERN gboolean utils_use_dark_mode (GtkWidget* w);
static void ___lambda139__node_inspector_update_icons (NodeInspector* _sender,
                                                gpointer self);
static void node_inspector_node_delete (NodeInspector* self);
static void _node_inspector_node_delete_gtk_button_clicked (GtkButton* _sender,
                                                     gpointer self);
VALA_EXTERN void map_model_change_current_task (MapModel* self,
                                    gboolean enable,
                                    gboolean done);
VALA_EXTERN gboolean node_task_enabled (Node* self);
VALA_EXTERN void map_model_toggle_folds (MapModel* self,
                             gboolean deep);
VALA_EXTERN gboolean node_get_sequence (Node* self);
VALA_EXTERN void node_set_sequence (Node* self,
                        gboolean value);
VALA_EXTERN void mind_map_queue_draw (MindMap* self);
VALA_EXTERN GType theme_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Theme, g_object_unref)
VALA_EXTERN Theme* mind_map_get_theme (MindMap* self);
VALA_EXTERN GdkRGBA* theme_get_color (Theme* self,
                          const gchar* name);
static gboolean _gdk_rgba_equal (const GdkRGBA * s1,
                          const GdkRGBA * s2);
static void _vala_GdkRGBA_free (GdkRGBA* self);
VALA_EXTERN void map_model_change_current_node_note (MapModel* self,
                                         const gchar* note);
VALA_EXTERN void mind_map_unedit_text (MindMap* self);
VALA_EXTERN const gchar* node_get_note (Node* self);
VALA_EXTERN GType undo_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoItem, g_object_unref)
VALA_EXTERN void mind_map_add_undo (MindMap* self,
                        UndoItem* item);
VALA_EXTERN UndoNodeNote* undo_node_note_new (Node* n,
                                  const gchar* old_note);
VALA_EXTERN UndoNodeNote* undo_node_note_construct (GType object_type,
                                        Node* n,
                                        const gchar* old_note);
VALA_EXTERN GType undo_node_note_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoNodeNote, g_object_unref)
VALA_EXTERN gint map_model_add_note_node_link (MapModel* self,
                                   NodeLink* link,
                                   gchar** text);
VALA_EXTERN void map_model_note_node_link_clicked (MapModel* self,
                                       gint id);
VALA_EXTERN gpointer node_links_ref (gpointer instance);
VALA_EXTERN void node_links_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_node_links (const gchar* name,
                                   const gchar* nick,
                                   const gchar* blurb,
                                   GType object_type,
                                   GParamFlags flags);
VALA_EXTERN void value_set_node_links (GValue* value,
                           gpointer v_object);
VALA_EXTERN void value_take_node_links (GValue* value,
                            gpointer v_object);
VALA_EXTERN gpointer value_get_node_links (const GValue* value);
VALA_EXTERN GType node_links_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeLinks, node_links_unref)
VALA_EXTERN NodeLinks* map_model_get_node_links (MapModel* self);
VALA_EXTERN NodeLink* node_links_get_node_link (NodeLinks* self,
                                    gint id);
VALA_EXTERN void note_view_show_tooltip (NoteView* self,
                             const gchar* tooltip);
VALA_EXTERN gchar* node_link_get_tooltip (NodeLink* self,
                              MindMap* map);
VALA_EXTERN void minder_clipboard_copy_nodes (MindMap* map);
VALA_EXTERN void map_model_cut_node_to_clipboard (MapModel* self);
VALA_EXTERN void map_model_detach (MapModel* self);
VALA_EXTERN void map_model_delete_node (MapModel* self);
VALA_EXTERN void node_inspector_grab_note (NodeInspector* self);
static void node_inspector_resize_changed (NodeInspector* self);
VALA_EXTERN gboolean node_get_image_resizable (Node* self);
VALA_EXTERN gint theme_num_link_colors (void);
VALA_EXTERN void theme_link_color (Theme* self,
                       gint index,
                       GdkRGBA* result);
VALA_EXTERN gboolean node_is_leaf (Node* self);
VALA_EXTERN gboolean node_get_folded (Node* self);
VALA_EXTERN gboolean node_is_root (Node* self);
VALA_EXTERN gboolean node_get_link_color_set (Node* self);
VALA_EXTERN GdkRGBA* node_get_link_color (Node* self);
static GdkRGBA* _vala_GdkRGBA_copy (GdkRGBA* self);
VALA_EXTERN Node* node_get_parent (Node* self);
VALA_EXTERN gpointer node_image_ref (gpointer instance);
VALA_EXTERN void node_image_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_node_image (const gchar* name,
                                   const gchar* nick,
                                   const gchar* blurb,
                                   GType object_type,
                                   GParamFlags flags);
VALA_EXTERN void value_set_node_image (GValue* value,
                           gpointer v_object);
VALA_EXTERN void value_take_node_image (GValue* value,
                            gpointer v_object);
VALA_EXTERN gpointer value_get_node_image (const GValue* value);
VALA_EXTERN GType node_image_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeImage, node_image_unref)
VALA_EXTERN NodeImage* node_get_image (Node* self);
VALA_EXTERN gpointer image_manager_ref (gpointer instance);
VALA_EXTERN void image_manager_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_image_manager (const gchar* name,
                                      const gchar* nick,
                                      const gchar* blurb,
                                      GType object_type,
                                      GParamFlags flags);
VALA_EXTERN void value_set_image_manager (GValue* value,
                              gpointer v_object);
VALA_EXTERN void value_take_image_manager (GValue* value,
                               gpointer v_object);
VALA_EXTERN gpointer value_get_image_manager (const GValue* value);
VALA_EXTERN GType image_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ImageManager, image_manager_unref)
VALA_EXTERN ImageManager* mind_map_get_image_manager (MindMap* self);
VALA_EXTERN gchar* image_manager_get_uri (ImageManager* self,
                              gint id);
VALA_EXTERN gint node_image_get_id (NodeImage* self);
VALA_EXTERN void node_image_set_image (NodeImage* self,
                           GtkPicture* img);
VALA_EXTERN void node_inspector_grab_first (NodeInspector* self);
VALA_EXTERN NoteView* node_inspector_get_note (NodeInspector* self);
static void node_inspector_finalize (GObject * obj);
static GType node_inspector_get_type_once (void);
static void _vala_node_inspector_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
node_inspector_get_instance_private (NodeInspector* self)
{
	return G_STRUCT_MEMBER_P (self, NodeInspector_private_offset);
}

static void
_node_inspector_tab_changed_main_window_canvas_changed (MainWindow* _sender,
                                                        MindMap* map,
                                                        gpointer self)
{
	node_inspector_tab_changed ((NodeInspector*) self, map);
}

NodeInspector*
node_inspector_construct (GType object_type,
                          MainWindow* win)
{
	NodeInspector * self = NULL;
	g_return_val_if_fail (win != NULL, NULL);
	self = (NodeInspector*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 10, NULL);
	node_inspector_create_title (self);
	node_inspector_create_task (self);
	node_inspector_create_fold (self);
	node_inspector_create_sequence (self);
	node_inspector_create_link (self);
	node_inspector_create_color (self);
	node_inspector_create_note (self, win);
	node_inspector_create_image (self);
	node_inspector_create_buttons (self);
	g_signal_connect_object (win, "canvas-changed", (GCallback) _node_inspector_tab_changed_main_window_canvas_changed, self, 0);
	return self;
}

NodeInspector*
node_inspector_new (MainWindow* win)
{
	return node_inspector_construct (TYPE_NODE_INSPECTOR, win);
}

static void
_node_inspector_node_changed_mind_map_current_changed (MindMap* _sender,
                                                       MindMap* map,
                                                       gpointer self)
{
	node_inspector_node_changed ((NodeInspector*) self);
}

static void
_node_inspector_theme_changed_mind_map_theme_changed (MindMap* _sender,
                                                      MindMap* map,
                                                      gpointer self)
{
	node_inspector_theme_changed ((NodeInspector*) self, map);
}

static gpointer
_mind_map_ref0 (gpointer self)
{
	return self ? mind_map_ref (self) : NULL;
}

static void
node_inspector_tab_changed (NodeInspector* self,
                            MindMap* map)
{
	MindMap* _tmp0_;
	MindMap* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	if (_tmp0_ != NULL) {
		MindMap* _tmp1_;
		guint _tmp2_;
		MindMap* _tmp3_;
		guint _tmp4_;
		_tmp1_ = self->priv->_map;
		g_signal_parse_name ("current-changed", TYPE_MIND_MAP, &_tmp2_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _node_inspector_node_changed_mind_map_current_changed, self);
		_tmp3_ = self->priv->_map;
		g_signal_parse_name ("theme-changed", TYPE_MIND_MAP, &_tmp4_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _node_inspector_theme_changed_mind_map_theme_changed, self);
	}
	_tmp5_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp5_;
	if (map != NULL) {
		g_signal_connect_object (map, "current-changed", (GCallback) _node_inspector_node_changed_mind_map_current_changed, self, 0);
		g_signal_connect_object (map, "theme-changed", (GCallback) _node_inspector_theme_changed_mind_map_theme_changed, self, 0);
		node_inspector_node_changed (self);
		g_signal_emit (self, node_inspector_signals[NODE_INSPECTOR_EDITABLE_CHANGED_SIGNAL], 0);
	}
}

void
node_inspector_set_width (NodeInspector* self,
                          gint width)
{
	GtkScrolledWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_sw;
	g_object_set ((GtkWidget*) _tmp0_, "width-request", width, NULL);
}

static void
node_inspector_create_title (NodeInspector* self)
{
	GtkLabel* title = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GtkLabel* _tmp4_ = NULL;
	GtkLabel* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strconcat ("<big>", _ ("Node"), NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strconcat (_tmp1_, "</big>", NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = (GtkLabel*) gtk_label_new (_tmp3_);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_FILL);
	gtk_label_set_use_markup (_tmp4_, TRUE);
	gtk_label_set_justify (_tmp4_, GTK_JUSTIFY_CENTER);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	title = _tmp5_;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) title);
	_g_object_unref0 (title);
}

static void
_node_inspector_task_changed_g_object_notify (GObject* _sender,
                                              GParamSpec* pspec,
                                              gpointer self)
{
	node_inspector_task_changed ((NodeInspector*) self);
}

static void
node_inspector_create_task (NodeInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkSwitch* _tmp1_ = NULL;
	GtkSwitch* _tmp2_;
	GtkBox* box = NULL;
	GtkBox* _tmp3_ = NULL;
	GtkSwitch* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Task"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) lbl, "titled");
	_tmp1_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_task);
	self->priv->_task = _tmp1_;
	_tmp2_ = self->priv->_task;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::active", (GCallback) _node_inspector_task_changed_g_object_notify, self, 0);
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp3_);
	box = _tmp3_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp4_ = self->priv->_task;
	gtk_box_append (box, (GtkWidget*) _tmp4_);
	gtk_box_append ((GtkBox*) self, (GtkWidget*) box);
	_g_object_unref0 (box);
	_g_object_unref0 (lbl);
}

static void
_node_inspector_fold_changed_g_object_notify (GObject* _sender,
                                              GParamSpec* pspec,
                                              gpointer self)
{
	node_inspector_fold_changed ((NodeInspector*) self);
}

static void
node_inspector_create_fold (NodeInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkSwitch* _tmp1_ = NULL;
	GtkSwitch* _tmp2_;
	GtkBox* box = NULL;
	GtkBox* _tmp3_ = NULL;
	GtkSwitch* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Fold"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) lbl, "titled");
	_tmp1_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_fold);
	self->priv->_fold = _tmp1_;
	_tmp2_ = self->priv->_fold;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::active", (GCallback) _node_inspector_fold_changed_g_object_notify, self, 0);
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp3_);
	box = _tmp3_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp4_ = self->priv->_fold;
	gtk_box_append (box, (GtkWidget*) _tmp4_);
	gtk_box_append ((GtkBox*) self, (GtkWidget*) box);
	_g_object_unref0 (box);
	_g_object_unref0 (lbl);
}

static void
_node_inspector_sequence_changed_g_object_notify (GObject* _sender,
                                                  GParamSpec* pspec,
                                                  gpointer self)
{
	node_inspector_sequence_changed ((NodeInspector*) self);
}

static void
node_inspector_create_sequence (NodeInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkImage* info = NULL;
	gchar* _tmp1_;
	GtkImage* _tmp2_ = NULL;
	GtkSwitch* _tmp3_ = NULL;
	GtkSwitch* _tmp4_;
	GtkBox* box = NULL;
	GtkBox* _tmp5_ = NULL;
	GtkSwitch* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Sequence"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) lbl, "titled");
	_tmp1_ = g_strdup (_ ("When set, automatically numbers child nodes and displays them as a seq" \
"uence."));
	_tmp2_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-information-symbolic");
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp2_, TRUE);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _tmp1_);
	_g_free0 (_tmp1_);
	g_object_ref_sink (_tmp2_);
	info = _tmp2_;
	_tmp3_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->_sequence);
	self->priv->_sequence = _tmp3_;
	_tmp4_ = self->priv->_sequence;
	g_signal_connect_object ((GObject*) _tmp4_, "notify::active", (GCallback) _node_inspector_sequence_changed_g_object_notify, self, 0);
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	gtk_widget_set_halign ((GtkWidget*) _tmp5_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp5_);
	box = _tmp5_;
	gtk_box_append (box, (GtkWidget*) lbl);
	gtk_box_append (box, (GtkWidget*) info);
	_tmp6_ = self->priv->_sequence;
	gtk_box_append (box, (GtkWidget*) _tmp6_);
	gtk_box_append ((GtkBox*) self, (GtkWidget*) box);
	_g_object_unref0 (box);
	_g_object_unref0 (info);
	_g_object_unref0 (lbl);
}

static void
__lambda130_ (NodeInspector* self)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	GtkColorButton* _tmp3_;
	GdkRGBA _tmp4_ = {0};
	GdkRGBA _tmp5_;
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_link_color;
	gtk_color_chooser_get_rgba ((GtkColorChooser*) _tmp3_, &_tmp4_);
	_tmp5_ = _tmp4_;
	map_model_change_current_link_color (_tmp2_, &_tmp5_);
}

static void
___lambda130__gtk_color_button_color_set (GtkColorButton* _sender,
                                          gpointer self)
{
	__lambda130_ ((NodeInspector*) self);
}

static void
node_inspector_create_link (NodeInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkColorButton* _tmp1_ = NULL;
	GtkColorButton* _tmp2_;
	GtkBox* _tmp3_ = NULL;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	GtkColorButton* _tmp6_;
	GtkBox* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Color"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) lbl, "titled");
	_tmp1_ = (GtkColorButton*) gtk_color_button_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_link_color);
	self->priv->_link_color = _tmp1_;
	_tmp2_ = self->priv->_link_color;
	g_signal_connect_object (_tmp2_, "color-set", (GCallback) ___lambda130__gtk_color_button_color_set, self, 0);
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	gtk_box_set_homogeneous (_tmp3_, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 5);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 5);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->_link_box);
	self->priv->_link_box = _tmp3_;
	_tmp4_ = self->priv->_link_box;
	gtk_box_append (_tmp4_, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_link_box;
	_tmp6_ = self->priv->_link_color;
	gtk_box_append (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = self->priv->_link_box;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp7_);
	_g_object_unref0 (lbl);
}

static void
_node_inspector_root_color_changed_g_object_notify (GObject* _sender,
                                                    GParamSpec* pspec,
                                                    gpointer self)
{
	node_inspector_root_color_changed ((NodeInspector*) self);
}

static void
__lambda131_ (NodeInspector* self)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	GtkColorButton* _tmp3_;
	GdkRGBA _tmp4_ = {0};
	GdkRGBA _tmp5_;
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_root_color;
	gtk_color_chooser_get_rgba ((GtkColorChooser*) _tmp3_, &_tmp4_);
	_tmp5_ = _tmp4_;
	map_model_change_current_link_color (_tmp2_, &_tmp5_);
}

static void
___lambda131__gtk_color_button_color_set (GtkColorButton* _sender,
                                          gpointer self)
{
	__lambda131_ ((NodeInspector*) self);
}

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

static void
node_inspector_create_color (NodeInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkSwitch* _tmp1_ = NULL;
	GtkSwitch* _tmp2_;
	GtkBox* box = NULL;
	GtkBox* _tmp3_ = NULL;
	GtkSwitch* _tmp4_;
	GtkLabel* l = NULL;
	GtkLabel* _tmp5_;
	GtkColorButton* _tmp6_ = NULL;
	GtkColorButton* _tmp7_;
	GtkBox* cbox = NULL;
	GtkBox* _tmp8_ = NULL;
	GtkColorButton* _tmp9_;
	GtkWidget* _tmp10_;
	GtkRevealer* _tmp11_ = NULL;
	GtkBox* _tmp12_ = NULL;
	GtkBox* _tmp13_;
	GtkBox* _tmp14_;
	GtkRevealer* _tmp15_;
	GtkBox* _tmp16_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Override Color"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) lbl, "titled");
	_tmp1_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_override);
	self->priv->_override = _tmp1_;
	_tmp2_ = self->priv->_override;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::active", (GCallback) _node_inspector_root_color_changed_g_object_notify, self, 0);
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_FILL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 5);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 5);
	g_object_ref_sink (_tmp3_);
	box = _tmp3_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp4_ = self->priv->_override;
	gtk_box_append (box, (GtkWidget*) _tmp4_);
	_tmp5_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp5_);
	l = _tmp5_;
	_tmp6_ = (GtkColorButton*) gtk_color_button_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->_root_color);
	self->priv->_root_color = _tmp6_;
	_tmp7_ = self->priv->_root_color;
	g_signal_connect_object (_tmp7_, "color-set", (GCallback) ___lambda131__gtk_color_button_color_set, self, 0);
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	gtk_box_set_homogeneous (_tmp8_, TRUE);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp8_, 5);
	g_object_ref_sink (_tmp8_);
	cbox = _tmp8_;
	gtk_box_append (cbox, (GtkWidget*) l);
	_tmp9_ = self->priv->_root_color;
	gtk_box_append (cbox, (GtkWidget*) _tmp9_);
	_tmp10_ = _g_object_ref0 ((GtkWidget*) cbox);
	_tmp11_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp11_, _tmp10_);
	_g_object_unref0 (_tmp10_);
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->_color_reveal);
	self->priv->_color_reveal = _tmp11_;
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp12_, 5);
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->_root_color_box);
	self->priv->_root_color_box = _tmp12_;
	_tmp13_ = self->priv->_root_color_box;
	gtk_box_append (_tmp13_, (GtkWidget*) box);
	_tmp14_ = self->priv->_root_color_box;
	_tmp15_ = self->priv->_color_reveal;
	gtk_box_append (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = self->priv->_root_color_box;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp16_);
	_g_object_unref0 (cbox);
	_g_object_unref0 (l);
	_g_object_unref0 (box);
	_g_object_unref0 (lbl);
}

static void
_node_inspector_note_changed_gtk_text_buffer_changed (GtkTextBuffer* _sender,
                                                      gpointer self)
{
	node_inspector_note_changed ((NodeInspector*) self);
}

static void
_node_inspector_note_focus_in_gtk_event_controller_focus_enter (GtkEventControllerFocus* _sender,
                                                                gpointer self)
{
	node_inspector_note_focus_in ((NodeInspector*) self);
}

static void
_node_inspector_note_focus_out_gtk_event_controller_focus_leave (GtkEventControllerFocus* _sender,
                                                                 gpointer self)
{
	node_inspector_note_focus_out ((NodeInspector*) self);
}

static gint
_node_inspector_note_node_link_added_note_view_node_link_added (NoteView* _sender,
                                                                NodeLink* link,
                                                                gchar** text,
                                                                gpointer self)
{
	gint result;
	result = node_inspector_note_node_link_added ((NodeInspector*) self, link, text);
	return result;
}

static void
_node_inspector_note_node_link_clicked_note_view_node_link_clicked (NoteView* _sender,
                                                                    gint id,
                                                                    gpointer self)
{
	node_inspector_note_node_link_clicked ((NodeInspector*) self, id);
}

static void
_node_inspector_note_node_link_hover_note_view_node_link_hover (NoteView* _sender,
                                                                gint id,
                                                                gpointer self)
{
	node_inspector_note_node_link_hover ((NodeInspector*) self, id);
}

static void
node_inspector_create_note (NodeInspector* self,
                            MainWindow* win)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	NoteView* _tmp1_ = NULL;
	NoteView* _tmp2_;
	UnicodeInsert* _tmp3_;
	UnicodeInsert* _tmp4_;
	NoteView* _tmp5_;
	GtkTextBuffer* _tmp6_;
	GtkTextBuffer* _tmp7_;
	NoteView* _tmp8_;
	GtkTextBuffer* _tmp9_;
	GtkTextBuffer* _tmp10_;
	GtkEventControllerFocus* focus = NULL;
	GtkEventControllerFocus* _tmp11_;
	NoteView* _tmp12_;
	GtkEventController* _tmp13_;
	NoteView* _tmp14_;
	NoteView* _tmp15_;
	NoteView* _tmp16_;
	NoteView* _tmp17_;
	GtkWidget* _tmp18_;
	GtkScrolledWindow* _tmp19_ = NULL;
	GtkBox* box = NULL;
	GtkBox* _tmp20_ = NULL;
	GtkScrolledWindow* _tmp21_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (win != NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Note"));
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) lbl, "titled");
	_tmp1_ = note_view_new (win);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp1_, TRUE);
	gtk_text_view_set_wrap_mode ((GtkTextView*) _tmp1_, GTK_WRAP_WORD);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_note);
	self->priv->_note = _tmp1_;
	_tmp2_ = self->priv->_note;
	_tmp3_ = main_window_get_unicoder (win);
	_tmp4_ = _tmp3_;
	note_view_add_unicode_completion (_tmp2_, win, _tmp4_);
	_tmp5_ = self->priv->_note;
	_tmp6_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp5_);
	_tmp7_ = _tmp6_;
	g_object_set (_tmp7_, "text", "", NULL);
	_tmp8_ = self->priv->_note;
	_tmp9_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp8_);
	_tmp10_ = _tmp9_;
	g_signal_connect_object (_tmp10_, "changed", (GCallback) _node_inspector_note_changed_gtk_text_buffer_changed, self, 0);
	_tmp11_ = (GtkEventControllerFocus*) gtk_event_controller_focus_new ();
	focus = _tmp11_;
	_tmp12_ = self->priv->_note;
	_tmp13_ = _g_object_ref0 ((GtkEventController*) focus);
	gtk_widget_add_controller ((GtkWidget*) _tmp12_, _tmp13_);
	g_signal_connect_object (focus, "enter", (GCallback) _node_inspector_note_focus_in_gtk_event_controller_focus_enter, self, 0);
	g_signal_connect_object (focus, "leave", (GCallback) _node_inspector_note_focus_out_gtk_event_controller_focus_leave, self, 0);
	_tmp14_ = self->priv->_note;
	g_signal_connect_object (_tmp14_, "node-link-added", (GCallback) _node_inspector_note_node_link_added_note_view_node_link_added, self, 0);
	_tmp15_ = self->priv->_note;
	g_signal_connect_object (_tmp15_, "node-link-clicked", (GCallback) _node_inspector_note_node_link_clicked_note_view_node_link_clicked, self, 0);
	_tmp16_ = self->priv->_note;
	g_signal_connect_object (_tmp16_, "node-link-hover", (GCallback) _node_inspector_note_node_link_hover_note_view_node_link_hover, self, 0);
	_tmp17_ = self->priv->_note;
	_tmp18_ = _g_object_ref0 ((GtkWidget*) _tmp17_);
	_tmp19_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_scrolled_window_set_min_content_width (_tmp19_, 300);
	gtk_scrolled_window_set_min_content_height (_tmp19_, 100);
	gtk_scrolled_window_set_child (_tmp19_, _tmp18_);
	_g_object_unref0 (_tmp18_);
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (self->priv->_sw);
	self->priv->_sw = _tmp19_;
	_tmp20_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
	gtk_widget_set_halign ((GtkWidget*) _tmp20_, GTK_ALIGN_FILL);
	gtk_widget_set_valign ((GtkWidget*) _tmp20_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp20_);
	box = _tmp20_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp21_ = self->priv->_sw;
	gtk_box_append (box, (GtkWidget*) _tmp21_);
	gtk_box_append ((GtkBox*) self, (GtkWidget*) box);
	_g_object_unref0 (box);
	_g_object_unref0 (focus);
	_g_object_unref0 (lbl);
}

static void
node_inspector_create_image (NodeInspector* self)
{
	GtkStack* _tmp0_ = NULL;
	GtkStack* _tmp1_;
	GtkBox* _tmp2_;
	GtkBox* _tmp3_;
	GtkStack* _tmp4_;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	GtkStack* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkStack*) gtk_stack_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_FILL);
	gtk_stack_set_transition_type (_tmp0_, GTK_STACK_TRANSITION_TYPE_NONE);
	gtk_stack_set_hhomogeneous (_tmp0_, FALSE);
	gtk_stack_set_vhomogeneous (_tmp0_, FALSE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->_image_stack);
	self->priv->_image_stack = _tmp0_;
	_tmp1_ = self->priv->_image_stack;
	_tmp2_ = node_inspector_create_image_add (self);
	_tmp3_ = _tmp2_;
	gtk_stack_add_named (_tmp1_, (GtkWidget*) _tmp3_, "add");
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->priv->_image_stack;
	_tmp5_ = node_inspector_create_image_edit (self);
	_tmp6_ = _tmp5_;
	gtk_stack_add_named (_tmp4_, (GtkWidget*) _tmp6_, "edit");
	_g_object_unref0 (_tmp6_);
	_tmp7_ = self->priv->_image_stack;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp7_);
}

static Block45Data*
block45_data_ref (Block45Data* _data45_)
{
	g_atomic_int_inc (&_data45_->_ref_count_);
	return _data45_;
}

static void
block45_data_unref (void * _userdata_)
{
	Block45Data* _data45_;
	_data45_ = (Block45Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data45_->_ref_count_)) {
		NodeInspector* self;
		self = _data45_->self;
		_g_object_unref0 (_data45_->btn);
		_g_object_unref0 (self);
		g_slice_free (Block45Data, _data45_);
	}
}

static void
_node_inspector_image_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                         gpointer self)
{
	node_inspector_image_button_clicked ((NodeInspector*) self);
}

static void
__lambda132_ (Block45Data* _data45_)
{
	NodeInspector* self;
	MindMap* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data45_->self;
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_editable (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_widget_set_sensitive ((GtkWidget*) _data45_->btn, _tmp2_);
}

static void
___lambda132__node_inspector_editable_changed (NodeInspector* _sender,
                                               gpointer self)
{
	__lambda132_ (self);
}

static GtkBox*
node_inspector_create_image_add (NodeInspector* self)
{
	Block45Data* _data45_;
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkButton* _tmp1_;
	GtkBox* box = NULL;
	GtkBox* _tmp2_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data45_ = g_slice_new0 (Block45Data);
	_data45_->_ref_count_ = 1;
	_data45_->self = g_object_ref (self);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Image"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_FILL);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) lbl, "titled");
	_tmp1_ = (GtkButton*) gtk_button_new_with_label (_ ("Add Image…"));
	g_object_ref_sink (_tmp1_);
	_data45_->btn = _tmp1_;
	g_signal_connect_object (_data45_->btn, "clicked", (GCallback) _node_inspector_image_button_clicked_gtk_button_clicked, self, 0);
	g_signal_connect_data (self, "editable-changed", (GCallback) ___lambda132__node_inspector_editable_changed, block45_data_ref (_data45_), (GClosureNotify) block45_data_unref, 0);
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
	g_object_ref_sink (_tmp2_);
	box = _tmp2_;
	gtk_box_append (box, (GtkWidget*) lbl);
	gtk_box_append (box, (GtkWidget*) _data45_->btn);
	result = box;
	_g_object_unref0 (lbl);
	block45_data_unref (_data45_);
	_data45_ = NULL;
	return result;
}

static Block46Data*
block46_data_ref (Block46Data* _data46_)
{
	g_atomic_int_inc (&_data46_->_ref_count_);
	return _data46_;
}

static void
block46_data_unref (void * _userdata_)
{
	Block46Data* _data46_;
	_data46_ = (Block46Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data46_->_ref_count_)) {
		NodeInspector* self;
		self = _data46_->self;
		_g_object_unref0 (_data46_->btn_del);
		_g_object_unref0 (_data46_->btn_edit);
		_g_object_unref0 (self);
		g_slice_free (Block46Data, _data46_);
	}
}

static void
__lambda133_ (NodeInspector* self)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	map_model_edit_current_image (_tmp2_);
}

static void
___lambda133__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda133_ ((NodeInspector*) self);
}

static void
__lambda134_ (NodeInspector* self)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	map_model_delete_current_image (_tmp2_);
}

static void
___lambda134__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda134_ ((NodeInspector*) self);
}

static void
__lambda135_ (NodeInspector* self)
{
	Node* current = NULL;
	MindMap* _tmp0_;
	Node* _tmp1_;
	Node* _tmp2_;
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_current_node (_tmp0_);
	current = _tmp1_;
	_tmp2_ = current;
	if (_tmp2_ != NULL) {
		Node* _tmp3_;
		GtkToggleButton* _tmp4_;
		MindMap* _tmp5_;
		_tmp3_ = current;
		_tmp4_ = self->priv->_resize;
		node_set_image_resizable (_tmp3_, gtk_toggle_button_get_active (_tmp4_));
		_tmp5_ = self->priv->_map;
		mind_map_auto_save (_tmp5_);
	}
	_g_object_unref0 (current);
}

static void
___lambda135__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                         gpointer self)
{
	__lambda135_ ((NodeInspector*) self);
}

static void
__lambda136_ (Block46Data* _data46_)
{
	NodeInspector* self;
	MindMap* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	MindMap* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	self = _data46_->self;
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_editable (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_widget_set_sensitive ((GtkWidget*) _data46_->btn_edit, _tmp2_);
	_tmp3_ = self->priv->_map;
	_tmp4_ = mind_map_get_editable (_tmp3_);
	_tmp5_ = _tmp4_;
	gtk_widget_set_sensitive ((GtkWidget*) _data46_->btn_del, _tmp5_);
}

static void
___lambda136__node_inspector_editable_changed (NodeInspector* _sender,
                                               gpointer self)
{
	__lambda136_ (self);
}

static gboolean
__lambda137_ (NodeInspector* self,
              GdkDrop* d)
{
	MindMap* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	g_return_val_if_fail (d != NULL, FALSE);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_editable (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static gboolean
___lambda137__gtk_drop_target_accept (GtkDropTarget* _sender,
                                      GdkDrop* drop,
                                      gpointer self)
{
	gboolean result;
	result = __lambda137_ ((NodeInspector*) self, drop);
	return result;
}

static gboolean
__lambda138_ (NodeInspector* self,
              GValue* val,
              gdouble x,
              gdouble y)
{
	GFile* file = NULL;
	GValue _tmp0_;
	GFile* _tmp1_;
	MindMap* _tmp2_;
	MapModel* _tmp3_;
	MapModel* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gboolean _tmp7_;
	gboolean result;
	g_return_val_if_fail (val != NULL, FALSE);
	_tmp0_ = *val;
	_tmp1_ = _g_object_ref0 (g_value_get_object (&_tmp0_));
	file = _tmp1_;
	_tmp2_ = self->priv->_map;
	_tmp3_ = mind_map_get_model (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_file_get_uri (file);
	_tmp6_ = _tmp5_;
	_tmp7_ = map_model_update_current_image (_tmp4_, _tmp6_);
	_g_free0 (_tmp6_);
	result = _tmp7_;
	_g_object_unref0 (file);
	return result;
}

static gboolean
___lambda138__gtk_drop_target_drop (GtkDropTarget* _sender,
                                    GValue* value,
                                    gdouble x,
                                    gdouble y,
                                    gpointer self)
{
	gboolean result;
	result = __lambda138_ ((NodeInspector*) self, value, x, y);
	return result;
}

static GtkBox*
node_inspector_create_image_edit (NodeInspector* self)
{
	Block46Data* _data46_;
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	gchar* _tmp1_;
	GtkButton* _tmp2_ = NULL;
	gchar* _tmp3_;
	GtkButton* _tmp4_ = NULL;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GtkToggleButton* _tmp7_ = NULL;
	GtkToggleButton* _tmp8_;
	GtkBox* image_btn_box = NULL;
	GtkBox* _tmp9_ = NULL;
	GtkToggleButton* _tmp10_;
	GtkBox* tbox = NULL;
	GtkBox* _tmp11_;
	GtkPicture* _tmp12_ = NULL;
	GtkBox* box = NULL;
	GtkBox* _tmp13_;
	GtkPicture* _tmp14_;
	GtkDropTarget* drop = NULL;
	GtkDropTarget* _tmp15_;
	GtkPicture* _tmp16_;
	GtkEventController* _tmp17_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data46_ = g_slice_new0 (Block46Data);
	_data46_->_ref_count_ = 1;
	_data46_->self = g_object_ref (self);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Image"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) lbl, "titled");
	_tmp1_ = g_strdup (_ ("Edit Image"));
	_tmp2_ = (GtkButton*) gtk_button_new_from_icon_name ("document-edit-symbolic");
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_END);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _tmp1_);
	_g_free0 (_tmp1_);
	g_object_ref_sink (_tmp2_);
	_data46_->btn_edit = _tmp2_;
	g_signal_connect_object (_data46_->btn_edit, "clicked", (GCallback) ___lambda133__gtk_button_clicked, self, 0);
	_tmp3_ = g_strdup (_ ("Remove Image"));
	_tmp4_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-delete-symbolic");
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_END);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_ref_sink (_tmp4_);
	_data46_->btn_del = _tmp4_;
	g_signal_connect_object (_data46_->btn_del, "clicked", (GCallback) ___lambda134__gtk_button_clicked, self, 0);
	_tmp5_ = g_strdup ("view-fullscreen-symbolic");
	_tmp6_ = g_strdup (_ ("Resizable"));
	_tmp7_ = (GtkToggleButton*) gtk_toggle_button_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp7_, GTK_ALIGN_END);
	gtk_button_set_icon_name ((GtkButton*) _tmp7_, _tmp5_);
	_g_free0 (_tmp5_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp7_, _tmp6_);
	_g_free0 (_tmp6_);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->_resize);
	self->priv->_resize = _tmp7_;
	_tmp8_ = self->priv->_resize;
	g_signal_connect_object (_tmp8_, "toggled", (GCallback) ___lambda135__gtk_toggle_button_toggled, self, 0);
	_tmp9_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	gtk_widget_set_halign ((GtkWidget*) _tmp9_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp9_);
	image_btn_box = _tmp9_;
	_tmp10_ = self->priv->_resize;
	gtk_box_append (image_btn_box, (GtkWidget*) _tmp10_);
	gtk_box_append (image_btn_box, (GtkWidget*) _data46_->btn_edit);
	gtk_box_append (image_btn_box, (GtkWidget*) _data46_->btn_del);
	_tmp11_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp11_);
	tbox = _tmp11_;
	gtk_box_append (tbox, (GtkWidget*) lbl);
	gtk_box_append (tbox, (GtkWidget*) image_btn_box);
	_tmp12_ = (GtkPicture*) gtk_picture_new ();
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp12_, 20);
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->_image);
	self->priv->_image = _tmp12_;
	_tmp13_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
	g_object_ref_sink (_tmp13_);
	box = _tmp13_;
	gtk_box_append (box, (GtkWidget*) tbox);
	_tmp14_ = self->priv->_image;
	gtk_box_append (box, (GtkWidget*) _tmp14_);
	g_signal_connect_data (self, "editable-changed", (GCallback) ___lambda136__node_inspector_editable_changed, block46_data_ref (_data46_), (GClosureNotify) block46_data_unref, 0);
	_tmp15_ = gtk_drop_target_new (g_file_get_type (), GDK_ACTION_COPY);
	drop = _tmp15_;
	_tmp16_ = self->priv->_image;
	_tmp17_ = _g_object_ref0 ((GtkEventController*) drop);
	gtk_widget_add_controller ((GtkWidget*) _tmp16_, _tmp17_);
	g_signal_connect_object (drop, "accept", (GCallback) ___lambda137__gtk_drop_target_accept, self, 0);
	g_signal_connect_object (drop, "drop", (GCallback) ___lambda138__gtk_drop_target_drop, self, 0);
	result = box;
	_g_object_unref0 (drop);
	_g_object_unref0 (tbox);
	_g_object_unref0 (image_btn_box);
	_g_object_unref0 (lbl);
	block46_data_unref (_data46_);
	_data46_ = NULL;
	return result;
}

static void
node_inspector_image_button_clicked (NodeInspector* self)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	map_model_add_current_image (_tmp2_);
}

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 gboolean
node_inspector_image_link_clicked (NodeInspector* self,
                                   const gchar* uri)
{
	GFile* file = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (uri != NULL, FALSE);
	_tmp0_ = g_file_new_for_uri (uri);
	file = _tmp0_;
	_tmp1_ = file;
	_tmp2_ = g_file_get_uri_scheme (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strcmp0 (_tmp3_, "file") == 0;
	_g_free0 (_tmp3_);
	if (_tmp4_) {
		GAppInfo* files = NULL;
		GAppInfo* _tmp5_;
		GList* list = NULL;
		GFile* _tmp6_;
		GFile* _tmp7_;
		_tmp5_ = g_app_info_get_default_for_type ("inode/directory", TRUE);
		files = _tmp5_;
		list = NULL;
		_tmp6_ = file;
		_tmp7_ = _g_object_ref0 (_tmp6_);
		list = g_list_append (list, _tmp7_);
		{
			GAppInfo* _tmp8_;
			GList* _tmp9_;
			_tmp8_ = files;
			_tmp9_ = list;
			g_app_info_launch (_tmp8_, _tmp9_, NULL, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			g_clear_error (&_inner_error0_);
			result = FALSE;
			(list == NULL) ? NULL : (list = (_g_list_free__g_object_unref0_ (list), NULL));
			_g_object_unref0 (files);
			_g_object_unref0 (file);
			return result;
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp10_ = FALSE;
			(list == NULL) ? NULL : (list = (_g_list_free__g_object_unref0_ (list), NULL));
			_g_object_unref0 (files);
			_g_object_unref0 (file);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp10_;
		}
		result = TRUE;
		(list == NULL) ? NULL : (list = (_g_list_free__g_object_unref0_ (list), NULL));
		_g_object_unref0 (files);
		_g_object_unref0 (file);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (file);
	return result;
}

static void
_node_inspector_node_copy_gtk_button_clicked (GtkButton* _sender,
                                              gpointer self)
{
	node_inspector_node_copy ((NodeInspector*) self);
}

static void
_node_inspector_node_cut_gtk_button_clicked (GtkButton* _sender,
                                             gpointer self)
{
	node_inspector_node_cut ((NodeInspector*) self);
}

static void
_node_inspector_node_detach_gtk_button_clicked (GtkButton* _sender,
                                                gpointer self)
{
	node_inspector_node_detach ((NodeInspector*) self);
}

static void
__lambda139_ (NodeInspector* self)
{
	const gchar* _tmp0_ = NULL;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	_tmp1_ = self->priv->_detach_btn;
	if (utils_use_dark_mode ((GtkWidget*) _tmp1_)) {
		_tmp0_ = "minder-detach-dark-symbolic";
	} else {
		_tmp0_ = "minder-detach-light-symbolic";
	}
	_tmp2_ = self->priv->_detach_btn;
	gtk_button_set_icon_name (_tmp2_, _tmp0_);
}

static void
___lambda139__node_inspector_update_icons (NodeInspector* _sender,
                                           gpointer self)
{
	__lambda139_ ((NodeInspector*) self);
}

static void
_node_inspector_node_delete_gtk_button_clicked (GtkButton* _sender,
                                                gpointer self)
{
	node_inspector_node_delete ((NodeInspector*) self);
}

static void
node_inspector_create_buttons (NodeInspector* self)
{
	GtkGrid* grid = NULL;
	GtkGrid* _tmp0_ = NULL;
	GtkButton* copy_btn = NULL;
	gchar* _tmp1_;
	GtkButton* _tmp2_ = NULL;
	GtkButton* cut_btn = NULL;
	gchar* _tmp3_;
	GtkButton* _tmp4_ = NULL;
	gchar* _tmp5_;
	GtkButton* _tmp6_ = NULL;
	GtkButton* _tmp7_;
	GtkButton* del_btn = NULL;
	gchar* _tmp8_;
	GtkButton* _tmp9_ = NULL;
	GtkButton* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_homogeneous (_tmp0_, TRUE);
	gtk_grid_set_column_spacing (_tmp0_, 5);
	g_object_ref_sink (_tmp0_);
	grid = _tmp0_;
	_tmp1_ = g_strdup (_ ("Copy Node To Clipboard"));
	_tmp2_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-copy-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _tmp1_);
	_g_free0 (_tmp1_);
	g_object_ref_sink (_tmp2_);
	copy_btn = _tmp2_;
	g_signal_connect_object (copy_btn, "clicked", (GCallback) _node_inspector_node_copy_gtk_button_clicked, self, 0);
	_tmp3_ = g_strdup (_ ("Cut Node To Clipboard"));
	_tmp4_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-cut-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_ref_sink (_tmp4_);
	cut_btn = _tmp4_;
	g_signal_connect_object (cut_btn, "clicked", (GCallback) _node_inspector_node_cut_gtk_button_clicked, self, 0);
	_tmp5_ = g_strdup (_ ("Detach Node"));
	_tmp6_ = (GtkButton*) gtk_button_new_from_icon_name ("minder-detach-light-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp6_, _tmp5_);
	_g_free0 (_tmp5_);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->_detach_btn);
	self->priv->_detach_btn = _tmp6_;
	_tmp7_ = self->priv->_detach_btn;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) _node_inspector_node_detach_gtk_button_clicked, self, 0);
	g_signal_connect_object (self, "update-icons", (GCallback) ___lambda139__node_inspector_update_icons, self, 0);
	_tmp8_ = g_strdup (_ ("Delete Node"));
	_tmp9_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-delete-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp9_, _tmp8_);
	_g_free0 (_tmp8_);
	g_object_ref_sink (_tmp9_);
	del_btn = _tmp9_;
	g_signal_connect_object (del_btn, "clicked", (GCallback) _node_inspector_node_delete_gtk_button_clicked, self, 0);
	gtk_grid_attach (grid, (GtkWidget*) copy_btn, 0, 0, 1, 1);
	gtk_grid_attach (grid, (GtkWidget*) cut_btn, 1, 0, 1, 1);
	_tmp10_ = self->priv->_detach_btn;
	gtk_grid_attach (grid, (GtkWidget*) _tmp10_, 2, 0, 1, 1);
	gtk_grid_attach (grid, (GtkWidget*) del_btn, 3, 0, 1, 1);
	_g_object_unref0 (del_btn);
	_g_object_unref0 (cut_btn);
	_g_object_unref0 (copy_btn);
	_g_object_unref0 (grid);
}

static void
node_inspector_task_changed (NodeInspector* self)
{
	Node* current = NULL;
	MindMap* _tmp0_;
	Node* _tmp1_;
	Node* _tmp2_;
	g_return_if_fail (self != NULL);
	if (self->priv->_ignore) {
		return;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_current_node (_tmp0_);
	current = _tmp1_;
	_tmp2_ = current;
	if (_tmp2_ != NULL) {
		MindMap* _tmp3_;
		MapModel* _tmp4_;
		MapModel* _tmp5_;
		Node* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_model (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = current;
		map_model_change_current_task (_tmp5_, !node_task_enabled (_tmp6_), FALSE);
	}
	_g_object_unref0 (current);
}

static void
node_inspector_fold_changed (NodeInspector* self)
{
	Node* current = NULL;
	MindMap* _tmp0_;
	Node* _tmp1_;
	Node* _tmp2_;
	g_return_if_fail (self != NULL);
	if (self->priv->_ignore) {
		return;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_current_node (_tmp0_);
	current = _tmp1_;
	_tmp2_ = current;
	if (_tmp2_ != NULL) {
		MindMap* _tmp3_;
		MapModel* _tmp4_;
		MapModel* _tmp5_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_model (_tmp3_);
		_tmp5_ = _tmp4_;
		map_model_toggle_folds (_tmp5_, FALSE);
	}
	_g_object_unref0 (current);
}

static void
node_inspector_sequence_changed (NodeInspector* self)
{
	Node* current = NULL;
	MindMap* _tmp0_;
	Node* _tmp1_;
	Node* _tmp2_;
	g_return_if_fail (self != NULL);
	if (self->priv->_ignore) {
		return;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_current_node (_tmp0_);
	current = _tmp1_;
	_tmp2_ = current;
	if (_tmp2_ != NULL) {
		Node* _tmp3_;
		Node* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		MindMap* _tmp7_;
		MindMap* _tmp8_;
		_tmp3_ = current;
		_tmp4_ = current;
		_tmp5_ = node_get_sequence (_tmp4_);
		_tmp6_ = _tmp5_;
		node_set_sequence (_tmp3_, !_tmp6_);
		_tmp7_ = self->priv->_map;
		mind_map_auto_save (_tmp7_);
		_tmp8_ = self->priv->_map;
		mind_map_queue_draw (_tmp8_);
	}
	_g_object_unref0 (current);
}

static gboolean
_gdk_rgba_equal (const GdkRGBA * s1,
                 const GdkRGBA * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	if (s1->red != s2->red) {
		return FALSE;
	}
	if (s1->green != s2->green) {
		return FALSE;
	}
	if (s1->blue != s2->blue) {
		return FALSE;
	}
	if (s1->alpha != s2->alpha) {
		return FALSE;
	}
	return TRUE;
}

static void
_vala_GdkRGBA_free (GdkRGBA* self)
{
	g_boxed_free (gdk_rgba_get_type (), self);
}

static void
node_inspector_root_color_changed (NodeInspector* self)
{
	Node* current = NULL;
	MindMap* _tmp0_;
	Node* _tmp1_;
	GtkRevealer* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	if (self->priv->_ignore) {
		return;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_current_node (_tmp0_);
	current = _tmp1_;
	_tmp2_ = self->priv->_color_reveal;
	_tmp3_ = gtk_revealer_get_reveal_child (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		GtkRevealer* _tmp5_;
		Node* _tmp6_;
		_tmp5_ = self->priv->_color_reveal;
		gtk_revealer_set_reveal_child (_tmp5_, FALSE);
		_tmp6_ = current;
		if (_tmp6_ != NULL) {
			MindMap* _tmp7_;
			MapModel* _tmp8_;
			MapModel* _tmp9_;
			_tmp7_ = self->priv->_map;
			_tmp8_ = mind_map_get_model (_tmp7_);
			_tmp9_ = _tmp8_;
			map_model_change_current_link_color (_tmp9_, NULL);
		}
	} else {
		GtkRevealer* _tmp10_;
		gboolean _tmp11_ = FALSE;
		Node* _tmp12_;
		_tmp10_ = self->priv->_color_reveal;
		gtk_revealer_set_reveal_child (_tmp10_, TRUE);
		_tmp12_ = current;
		if (_tmp12_ != NULL) {
			GtkColorButton* _tmp13_;
			GdkRGBA _tmp14_ = {0};
			GdkRGBA _tmp15_;
			MindMap* _tmp16_;
			Theme* _tmp17_;
			Theme* _tmp18_;
			GdkRGBA* _tmp19_;
			GdkRGBA* _tmp20_;
			_tmp13_ = self->priv->_root_color;
			gtk_color_chooser_get_rgba ((GtkColorChooser*) _tmp13_, &_tmp14_);
			_tmp15_ = _tmp14_;
			_tmp16_ = self->priv->_map;
			_tmp17_ = mind_map_get_theme (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = theme_get_color (_tmp18_, "root_background");
			_tmp20_ = _tmp19_;
			_tmp11_ = _gdk_rgba_equal (&_tmp15_, _tmp20_) != TRUE;
			__vala_GdkRGBA_free0 (_tmp20_);
			_g_object_unref0 (_tmp18_);
		} else {
			_tmp11_ = FALSE;
		}
		if (_tmp11_) {
			MindMap* _tmp21_;
			MapModel* _tmp22_;
			MapModel* _tmp23_;
			GtkColorButton* _tmp24_;
			GdkRGBA _tmp25_ = {0};
			_tmp21_ = self->priv->_map;
			_tmp22_ = mind_map_get_model (_tmp21_);
			_tmp23_ = _tmp22_;
			_tmp24_ = self->priv->_root_color;
			gtk_color_chooser_get_rgba ((GtkColorChooser*) _tmp24_, &_tmp25_);
			map_model_change_current_link_color (_tmp23_, &_tmp25_);
		}
	}
	_g_object_unref0 (current);
}

static void
node_inspector_note_changed (NodeInspector* self)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	NoteView* _tmp3_;
	GtkTextBuffer* _tmp4_;
	GtkTextBuffer* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	if (self->priv->_ignore) {
		return;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_note;
	_tmp4_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_object_get (_tmp5_, "text", &_tmp6_, NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	map_model_change_current_node_note (_tmp2_, _tmp8_);
	_g_free0 (_tmp8_);
}

static void
node_inspector_note_focus_in (NodeInspector* self)
{
	MindMap* _tmp0_;
	Node* _tmp1_;
	NoteView* _tmp2_;
	GtkTextBuffer* _tmp3_;
	GtkTextBuffer* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	MindMap* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_current_node (_tmp0_);
	_g_object_unref0 (self->priv->_node);
	self->priv->_node = _tmp1_;
	_tmp2_ = self->priv->_note;
	_tmp3_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp2_);
	_tmp4_ = _tmp3_;
	g_object_get (_tmp4_, "text", &_tmp5_, NULL);
	_tmp6_ = _tmp5_;
	_g_free0 (self->priv->_orig_note);
	self->priv->_orig_note = _tmp6_;
	_tmp7_ = self->priv->_map;
	mind_map_unedit_text (_tmp7_);
}

static void
node_inspector_note_focus_out (NodeInspector* self)
{
	gboolean _tmp0_ = FALSE;
	Node* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_node;
	if (_tmp1_ != NULL) {
		Node* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp2_ = self->priv->_node;
		_tmp3_ = node_get_note (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = self->priv->_orig_note;
		_tmp0_ = g_strcmp0 (_tmp4_, _tmp5_) != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		MindMap* _tmp6_;
		Node* _tmp7_;
		const gchar* _tmp8_;
		UndoNodeNote* _tmp9_;
		UndoNodeNote* _tmp10_;
		_tmp6_ = self->priv->_map;
		_tmp7_ = self->priv->_node;
		_tmp8_ = self->priv->_orig_note;
		_tmp9_ = undo_node_note_new (_tmp7_, _tmp8_);
		_tmp10_ = _tmp9_;
		mind_map_add_undo (_tmp6_, (UndoItem*) _tmp10_);
		_g_object_unref0 (_tmp10_);
	}
}

static gint
node_inspector_note_node_link_added (NodeInspector* self,
                                     NodeLink* link,
                                     gchar** text)
{
	gchar* _vala_text = NULL;
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	gchar* _tmp3_ = NULL;
	gint _tmp4_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (link != NULL, -1);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp4_ = map_model_add_note_node_link (_tmp2_, link, &_tmp3_);
	_g_free0 (_vala_text);
	_vala_text = _tmp3_;
	result = _tmp4_;
	if (text) {
		*text = _vala_text;
	} else {
		_g_free0 (_vala_text);
	}
	return result;
}

static void
node_inspector_note_node_link_clicked (NodeInspector* self,
                                       gint id)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	map_model_note_node_link_clicked (_tmp2_, id);
}

static void
node_inspector_note_node_link_hover (NodeInspector* self,
                                     gint id)
{
	NodeLink* link = NULL;
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	NodeLinks* _tmp3_;
	NodeLinks* _tmp4_;
	NodeLink* _tmp5_;
	NodeLink* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = map_model_get_node_links (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = node_links_get_node_link (_tmp4_, id);
	link = _tmp5_;
	_tmp6_ = link;
	if (_tmp6_ != NULL) {
		NoteView* _tmp7_;
		NodeLink* _tmp8_;
		MindMap* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp7_ = self->priv->_note;
		_tmp8_ = link;
		_tmp9_ = self->priv->_map;
		_tmp10_ = node_link_get_tooltip (_tmp8_, _tmp9_);
		_tmp11_ = _tmp10_;
		note_view_show_tooltip (_tmp7_, _tmp11_);
		_g_free0 (_tmp11_);
	}
	_node_link_unref0 (link);
}

static void
node_inspector_node_copy (NodeInspector* self)
{
	MindMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	minder_clipboard_copy_nodes (_tmp0_);
}

static void
node_inspector_node_cut (NodeInspector* self)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	map_model_cut_node_to_clipboard (_tmp2_);
}

static void
node_inspector_node_detach (NodeInspector* self)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	GtkButton* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	map_model_detach (_tmp2_);
	_tmp3_ = self->priv->_detach_btn;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, FALSE);
}

static void
node_inspector_node_delete (NodeInspector* self)
{
	MindMap* _tmp0_;
	MapModel* _tmp1_;
	MapModel* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	map_model_delete_node (_tmp2_);
}

void
node_inspector_grab_note (NodeInspector* self)
{
	NoteView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_note;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	node_inspector_node_changed (self);
}

static void
node_inspector_resize_changed (NodeInspector* self)
{
	Node* current = NULL;
	MindMap* _tmp0_;
	Node* _tmp1_;
	Node* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_current_node (_tmp0_);
	current = _tmp1_;
	_tmp2_ = current;
	if (_tmp2_ != NULL) {
		Node* _tmp3_;
		Node* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		MindMap* _tmp7_;
		_tmp3_ = current;
		_tmp4_ = current;
		_tmp5_ = node_get_image_resizable (_tmp4_);
		_tmp6_ = _tmp5_;
		node_set_image_resizable (_tmp3_, !_tmp6_);
		_tmp7_ = self->priv->_map;
		mind_map_auto_save (_tmp7_);
	}
	_g_object_unref0 (current);
}

static void
node_inspector_theme_changed (NodeInspector* self,
                              MindMap* map)
{
	gint num_colors = 0;
	GdkRGBA* colors = NULL;
	GdkRGBA* _tmp0_;
	gint colors_length1;
	gint _colors_size_;
	GtkColorButton* _tmp8_;
	GtkColorButton* _tmp9_;
	GdkRGBA* _tmp10_;
	gint _tmp10__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (map != NULL);
	num_colors = theme_num_link_colors ();
	_tmp0_ = g_new0 (GdkRGBA, num_colors);
	colors = _tmp0_;
	colors_length1 = num_colors;
	_colors_size_ = colors_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				GdkRGBA* _tmp3_;
				gint _tmp3__length1;
				MindMap* _tmp4_;
				Theme* _tmp5_;
				Theme* _tmp6_;
				GdkRGBA _tmp7_ = {0};
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(i < num_colors)) {
					break;
				}
				_tmp3_ = colors;
				_tmp3__length1 = colors_length1;
				_tmp4_ = self->priv->_map;
				_tmp5_ = mind_map_get_theme (_tmp4_);
				_tmp6_ = _tmp5_;
				theme_link_color (_tmp6_, i, &_tmp7_);
				_tmp3_[i] = _tmp7_;
				_g_object_unref0 (_tmp6_);
			}
		}
	}
	_tmp8_ = self->priv->_link_color;
	gtk_color_chooser_add_palette ((GtkColorChooser*) _tmp8_, GTK_ORIENTATION_HORIZONTAL, 10, (gint) 0, NULL);
	_tmp9_ = self->priv->_link_color;
	_tmp10_ = colors;
	_tmp10__length1 = colors_length1;
	gtk_color_chooser_add_palette ((GtkColorChooser*) _tmp9_, GTK_ORIENTATION_HORIZONTAL, 10, (gint) _tmp10__length1, _tmp10_);
	colors = (g_free (colors), NULL);
}

static GdkRGBA*
_vala_GdkRGBA_copy (GdkRGBA* self)
{
	return g_boxed_copy (gdk_rgba_get_type (), self);
}

static gpointer
__vala_GdkRGBA_copy0 (gpointer self)
{
	return self ? _vala_GdkRGBA_copy (self) : NULL;
}

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
node_inspector_node_changed (NodeInspector* self)
{
	Node* current = NULL;
	MindMap* _tmp0_;
	Node* _tmp1_;
	Node* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_current_node (_tmp0_);
	current = _tmp1_;
	self->priv->_ignore = TRUE;
	_tmp2_ = current;
	if (_tmp2_ != NULL) {
		GtkSwitch* _tmp3_;
		Node* _tmp4_;
		GtkSwitch* _tmp5_;
		MindMap* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		Node* _tmp9_;
		Node* _tmp20_;
		Node* _tmp31_;
		gboolean _tmp67_ = FALSE;
		Node* _tmp68_;
		Node* _tmp69_;
		Node* _tmp70_;
		GtkButton* _tmp74_;
		gchar* note = NULL;
		Node* _tmp75_;
		const gchar* _tmp76_;
		const gchar* _tmp77_;
		gchar* _tmp78_;
		NoteView* _tmp79_;
		GtkTextBuffer* _tmp80_;
		GtkTextBuffer* _tmp81_;
		const gchar* _tmp82_;
		NoteView* _tmp83_;
		MindMap* _tmp84_;
		gboolean _tmp85_;
		gboolean _tmp86_;
		Node* _tmp87_;
		NodeImage* _tmp88_;
		NodeImage* _tmp89_;
		_tmp3_ = self->priv->_task;
		_tmp4_ = current;
		gtk_switch_set_active (_tmp3_, node_task_enabled (_tmp4_));
		_tmp5_ = self->priv->_task;
		_tmp6_ = self->priv->_map;
		_tmp7_ = mind_map_get_editable (_tmp6_);
		_tmp8_ = _tmp7_;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, _tmp8_);
		_tmp9_ = current;
		if (node_is_leaf (_tmp9_)) {
			GtkSwitch* _tmp10_;
			GtkSwitch* _tmp11_;
			_tmp10_ = self->priv->_fold;
			gtk_switch_set_active (_tmp10_, FALSE);
			_tmp11_ = self->priv->_fold;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp11_, FALSE);
		} else {
			GtkSwitch* _tmp12_;
			Node* _tmp13_;
			gboolean _tmp14_;
			gboolean _tmp15_;
			GtkSwitch* _tmp16_;
			MindMap* _tmp17_;
			gboolean _tmp18_;
			gboolean _tmp19_;
			_tmp12_ = self->priv->_fold;
			_tmp13_ = current;
			_tmp14_ = node_get_folded (_tmp13_);
			_tmp15_ = _tmp14_;
			gtk_switch_set_active (_tmp12_, _tmp15_);
			_tmp16_ = self->priv->_fold;
			_tmp17_ = self->priv->_map;
			_tmp18_ = mind_map_get_editable (_tmp17_);
			_tmp19_ = _tmp18_;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp16_, _tmp19_);
		}
		_tmp20_ = current;
		if (node_is_root (_tmp20_)) {
			GtkSwitch* _tmp21_;
			GtkSwitch* _tmp22_;
			_tmp21_ = self->priv->_sequence;
			gtk_switch_set_active (_tmp21_, FALSE);
			_tmp22_ = self->priv->_sequence;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp22_, FALSE);
		} else {
			GtkSwitch* _tmp23_;
			Node* _tmp24_;
			gboolean _tmp25_;
			gboolean _tmp26_;
			GtkSwitch* _tmp27_;
			MindMap* _tmp28_;
			gboolean _tmp29_;
			gboolean _tmp30_;
			_tmp23_ = self->priv->_sequence;
			_tmp24_ = current;
			_tmp25_ = node_get_sequence (_tmp24_);
			_tmp26_ = _tmp25_;
			gtk_switch_set_active (_tmp23_, _tmp26_);
			_tmp27_ = self->priv->_sequence;
			_tmp28_ = self->priv->_map;
			_tmp29_ = mind_map_get_editable (_tmp28_);
			_tmp30_ = _tmp29_;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp27_, _tmp30_);
		}
		_tmp31_ = current;
		if (node_is_root (_tmp31_)) {
			GtkBox* _tmp32_;
			GtkBox* _tmp33_;
			GtkSwitch* _tmp34_;
			Node* _tmp35_;
			gboolean _tmp36_;
			gboolean _tmp37_;
			GtkSwitch* _tmp38_;
			MindMap* _tmp39_;
			gboolean _tmp40_;
			gboolean _tmp41_;
			GtkRevealer* _tmp42_;
			Node* _tmp43_;
			gboolean _tmp44_;
			gboolean _tmp45_;
			GdkRGBA* _tmp46_ = NULL;
			Node* _tmp47_;
			gboolean _tmp48_;
			gboolean _tmp49_;
			GtkColorButton* _tmp58_;
			GdkRGBA _tmp59_;
			_tmp32_ = self->priv->_link_box;
			gtk_widget_set_visible ((GtkWidget*) _tmp32_, FALSE);
			_tmp33_ = self->priv->_root_color_box;
			gtk_widget_set_visible ((GtkWidget*) _tmp33_, TRUE);
			_tmp34_ = self->priv->_override;
			_tmp35_ = current;
			_tmp36_ = node_get_link_color_set (_tmp35_);
			_tmp37_ = _tmp36_;
			gtk_switch_set_active (_tmp34_, _tmp37_);
			_tmp38_ = self->priv->_override;
			_tmp39_ = self->priv->_map;
			_tmp40_ = mind_map_get_editable (_tmp39_);
			_tmp41_ = _tmp40_;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp38_, _tmp41_);
			_tmp42_ = self->priv->_color_reveal;
			_tmp43_ = current;
			_tmp44_ = node_get_link_color_set (_tmp43_);
			_tmp45_ = _tmp44_;
			gtk_revealer_set_reveal_child (_tmp42_, _tmp45_);
			_tmp47_ = current;
			_tmp48_ = node_get_link_color_set (_tmp47_);
			_tmp49_ = _tmp48_;
			if (_tmp49_) {
				Node* _tmp50_;
				GdkRGBA* _tmp51_;
				GdkRGBA* _tmp52_;
				GdkRGBA* _tmp53_;
				_tmp50_ = current;
				_tmp51_ = node_get_link_color (_tmp50_);
				_tmp52_ = _tmp51_;
				_tmp53_ = __vala_GdkRGBA_copy0 (_tmp52_);
				__vala_GdkRGBA_free0 (_tmp46_);
				_tmp46_ = _tmp53_;
			} else {
				MindMap* _tmp54_;
				Theme* _tmp55_;
				Theme* _tmp56_;
				GdkRGBA* _tmp57_;
				_tmp54_ = self->priv->_map;
				_tmp55_ = mind_map_get_theme (_tmp54_);
				_tmp56_ = _tmp55_;
				_tmp57_ = theme_get_color (_tmp56_, "root_background");
				__vala_GdkRGBA_free0 (_tmp46_);
				_tmp46_ = _tmp57_;
				_g_object_unref0 (_tmp56_);
			}
			_tmp58_ = self->priv->_root_color;
			_tmp59_ = *_tmp46_;
			gtk_color_chooser_set_rgba ((GtkColorChooser*) _tmp58_, &_tmp59_);
			__vala_GdkRGBA_free0 (_tmp46_);
		} else {
			GtkBox* _tmp60_;
			GtkBox* _tmp61_;
			GtkColorButton* _tmp62_;
			Node* _tmp63_;
			GdkRGBA* _tmp64_;
			GdkRGBA* _tmp65_;
			GdkRGBA _tmp66_;
			_tmp60_ = self->priv->_link_box;
			gtk_widget_set_visible ((GtkWidget*) _tmp60_, TRUE);
			_tmp61_ = self->priv->_root_color_box;
			gtk_widget_set_visible ((GtkWidget*) _tmp61_, FALSE);
			_tmp62_ = self->priv->_link_color;
			_tmp63_ = current;
			_tmp64_ = node_get_link_color (_tmp63_);
			_tmp65_ = _tmp64_;
			_tmp66_ = *_tmp65_;
			gtk_color_chooser_set_rgba ((GtkColorChooser*) _tmp62_, &_tmp66_);
		}
		_tmp68_ = current;
		_tmp69_ = node_get_parent (_tmp68_);
		_tmp70_ = _tmp69_;
		if (_tmp70_ != NULL) {
			MindMap* _tmp71_;
			gboolean _tmp72_;
			gboolean _tmp73_;
			_tmp71_ = self->priv->_map;
			_tmp72_ = mind_map_get_editable (_tmp71_);
			_tmp73_ = _tmp72_;
			_tmp67_ = _tmp73_;
		} else {
			_tmp67_ = FALSE;
		}
		_tmp74_ = self->priv->_detach_btn;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp74_, _tmp67_);
		_tmp75_ = current;
		_tmp76_ = node_get_note (_tmp75_);
		_tmp77_ = _tmp76_;
		_tmp78_ = g_strdup (_tmp77_);
		note = _tmp78_;
		_tmp79_ = self->priv->_note;
		_tmp80_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp79_);
		_tmp81_ = _tmp80_;
		_tmp82_ = note;
		g_object_set (_tmp81_, "text", _tmp82_, NULL);
		_tmp83_ = self->priv->_note;
		_tmp84_ = self->priv->_map;
		_tmp85_ = mind_map_get_editable (_tmp84_);
		_tmp86_ = _tmp85_;
		gtk_text_view_set_editable ((GtkTextView*) _tmp83_, _tmp86_);
		_tmp87_ = current;
		_tmp88_ = node_get_image (_tmp87_);
		_tmp89_ = _tmp88_;
		if (_tmp89_ != NULL) {
			gchar* url = NULL;
			MindMap* _tmp90_;
			ImageManager* _tmp91_;
			ImageManager* _tmp92_;
			Node* _tmp93_;
			NodeImage* _tmp94_;
			NodeImage* _tmp95_;
			gint _tmp96_;
			gint _tmp97_;
			gchar* _tmp98_;
			gchar* _tmp99_;
			gchar* _tmp100_;
			gchar* _tmp101_;
			gchar* str = NULL;
			const gchar* _tmp102_;
			gchar* _tmp103_;
			gchar* _tmp104_;
			gchar* _tmp105_;
			gchar* _tmp106_;
			const gchar* _tmp107_;
			gchar* _tmp108_;
			gchar* _tmp109_;
			gchar* _tmp110_;
			gchar* _tmp111_;
			Node* _tmp112_;
			NodeImage* _tmp113_;
			NodeImage* _tmp114_;
			GtkPicture* _tmp115_;
			gboolean _tmp116_ = FALSE;
			Node* _tmp117_;
			gboolean _tmp118_;
			gboolean _tmp119_;
			GtkToggleButton* _tmp123_;
			GtkStack* _tmp124_;
			_tmp90_ = self->priv->_map;
			_tmp91_ = mind_map_get_image_manager (_tmp90_);
			_tmp92_ = _tmp91_;
			_tmp93_ = current;
			_tmp94_ = node_get_image (_tmp93_);
			_tmp95_ = _tmp94_;
			_tmp96_ = node_image_get_id (_tmp95_);
			_tmp97_ = _tmp96_;
			_tmp98_ = image_manager_get_uri (_tmp92_, _tmp97_);
			_tmp99_ = _tmp98_;
			_tmp100_ = string_replace (_tmp99_, "&", "&amp;");
			_tmp101_ = _tmp100_;
			_g_free0 (_tmp99_);
			url = _tmp101_;
			_tmp102_ = url;
			_tmp103_ = g_strconcat ("<a href=\"", _tmp102_, NULL);
			_tmp104_ = _tmp103_;
			_tmp105_ = g_strconcat (_tmp104_, "\">", NULL);
			_tmp106_ = _tmp105_;
			_tmp107_ = url;
			_tmp108_ = g_strconcat (_tmp106_, _tmp107_, NULL);
			_tmp109_ = _tmp108_;
			_tmp110_ = g_strconcat (_tmp109_, "</a>", NULL);
			_tmp111_ = _tmp110_;
			_g_free0 (_tmp109_);
			_g_free0 (_tmp106_);
			_g_free0 (_tmp104_);
			str = _tmp111_;
			_tmp112_ = current;
			_tmp113_ = node_get_image (_tmp112_);
			_tmp114_ = _tmp113_;
			_tmp115_ = self->priv->_image;
			node_image_set_image (_tmp114_, _tmp115_);
			_tmp117_ = current;
			_tmp118_ = node_get_image_resizable (_tmp117_);
			_tmp119_ = _tmp118_;
			if (_tmp119_) {
				MindMap* _tmp120_;
				gboolean _tmp121_;
				gboolean _tmp122_;
				_tmp120_ = self->priv->_map;
				_tmp121_ = mind_map_get_editable (_tmp120_);
				_tmp122_ = _tmp121_;
				_tmp116_ = _tmp122_;
			} else {
				_tmp116_ = FALSE;
			}
			_tmp123_ = self->priv->_resize;
			gtk_toggle_button_set_active (_tmp123_, _tmp116_);
			_tmp124_ = self->priv->_image_stack;
			gtk_stack_set_visible_child_name (_tmp124_, "edit");
			_g_free0 (str);
			_g_free0 (url);
		} else {
			GtkStack* _tmp125_;
			_tmp125_ = self->priv->_image_stack;
			gtk_stack_set_visible_child_name (_tmp125_, "add");
		}
		_g_free0 (note);
	}
	self->priv->_ignore = FALSE;
	_g_object_unref0 (current);
}

void
node_inspector_grab_first (NodeInspector* self)
{
	GtkSwitch* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_task;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	node_inspector_node_changed (self);
}

NoteView*
node_inspector_get_note (NodeInspector* self)
{
	NoteView* result;
	NoteView* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_note;
	result = _tmp0_;
	return result;
}

static void
node_inspector_class_init (NodeInspectorClass * klass,
                           gpointer klass_data)
{
	node_inspector_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &NodeInspector_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_node_inspector_get_property;
	G_OBJECT_CLASS (klass)->finalize = node_inspector_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_INSPECTOR_NOTE_PROPERTY, node_inspector_properties[NODE_INSPECTOR_NOTE_PROPERTY] = g_param_spec_object ("note", "note", "note", TYPE_NOTE_VIEW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	node_inspector_signals[NODE_INSPECTOR_UPDATE_ICONS_SIGNAL] = g_signal_new ("update-icons", TYPE_NODE_INSPECTOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	node_inspector_signals[NODE_INSPECTOR_EDITABLE_CHANGED_SIGNAL] = g_signal_new ("editable-changed", TYPE_NODE_INSPECTOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
node_inspector_instance_init (NodeInspector * self,
                              gpointer klass)
{
	gchar* _tmp0_;
	self->priv = node_inspector_get_instance_private (self);
	self->priv->_map = NULL;
	_tmp0_ = g_strdup ("");
	self->priv->_orig_note = _tmp0_;
	self->priv->_node = NULL;
	self->priv->_ignore = FALSE;
}

static void
node_inspector_finalize (GObject * obj)
{
	NodeInspector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NODE_INSPECTOR, NodeInspector);
	_g_object_unref0 (self->priv->_sw);
	_g_object_unref0 (self->priv->_task);
	_g_object_unref0 (self->priv->_fold);
	_g_object_unref0 (self->priv->_sequence);
	_g_object_unref0 (self->priv->_link_box);
	_g_object_unref0 (self->priv->_link_color);
	_g_object_unref0 (self->priv->_note);
	_mind_map_unref0 (self->priv->_map);
	_g_object_unref0 (self->priv->_detach_btn);
	_g_free0 (self->priv->_orig_note);
	_g_object_unref0 (self->priv->_node);
	_g_object_unref0 (self->priv->_image_stack);
	_g_object_unref0 (self->priv->_image);
	_g_object_unref0 (self->priv->_image_btn);
	_g_object_unref0 (self->priv->_image_loc);
	_g_object_unref0 (self->priv->_override);
	_g_object_unref0 (self->priv->_root_color);
	_g_object_unref0 (self->priv->_root_color_box);
	_g_object_unref0 (self->priv->_color_reveal);
	_g_object_unref0 (self->priv->_resize);
	G_OBJECT_CLASS (node_inspector_parent_class)->finalize (obj);
}

static GType
node_inspector_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (NodeInspectorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) node_inspector_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NodeInspector), 0, (GInstanceInitFunc) node_inspector_instance_init, NULL };
	GType node_inspector_type_id;
	node_inspector_type_id = g_type_register_static (gtk_box_get_type (), "NodeInspector", &g_define_type_info, 0);
	NodeInspector_private_offset = g_type_add_instance_private (node_inspector_type_id, sizeof (NodeInspectorPrivate));
	return node_inspector_type_id;
}

GType
node_inspector_get_type (void)
{
	static volatile gsize node_inspector_type_id__once = 0;
	if (g_once_init_enter (&node_inspector_type_id__once)) {
		GType node_inspector_type_id;
		node_inspector_type_id = node_inspector_get_type_once ();
		g_once_init_leave (&node_inspector_type_id__once, node_inspector_type_id);
	}
	return node_inspector_type_id__once;
}

static void
_vala_node_inspector_get_property (GObject * object,
                                   guint property_id,
                                   GValue * value,
                                   GParamSpec * pspec)
{
	NodeInspector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_NODE_INSPECTOR, NodeInspector);
	switch (property_id) {
		case NODE_INSPECTOR_NOTE_PROPERTY:
		g_value_set_object (value, node_inspector_get_note (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

