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

/*
 * Copyright (c) 2024-2025 focus-timer contributors
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include "ft_core.h"
#include "ft_ui.h"
#include <gdk/gdk.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

#define FT_TYPE_SECTIONED_LOG_MODEL (ft_sectioned_log_model_get_type ())
#define FT_SECTIONED_LOG_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FT_TYPE_SECTIONED_LOG_MODEL, FtSectionedLogModel))
#define FT_SECTIONED_LOG_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FT_TYPE_SECTIONED_LOG_MODEL, FtSectionedLogModelClass))
#define FT_IS_SECTIONED_LOG_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FT_TYPE_SECTIONED_LOG_MODEL))
#define FT_IS_SECTIONED_LOG_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FT_TYPE_SECTIONED_LOG_MODEL))
#define FT_SECTIONED_LOG_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FT_TYPE_SECTIONED_LOG_MODEL, FtSectionedLogModelClass))

typedef struct _FtSectionedLogModel FtSectionedLogModel;
typedef struct _FtSectionedLogModelClass FtSectionedLogModelClass;
typedef struct _FtSectionedLogModelPrivate FtSectionedLogModelPrivate;
enum  {
	FT_SECTIONED_LOG_MODEL_0_PROPERTY,
	FT_SECTIONED_LOG_MODEL_MODEL_PROPERTY,
	FT_SECTIONED_LOG_MODEL_NUM_PROPERTIES
};
static GParamSpec* ft_sectioned_log_model_properties[FT_SECTIONED_LOG_MODEL_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	FT_LOG_WINDOW_0_PROPERTY,
	FT_LOG_WINDOW_NUM_PROPERTIES
};
static GParamSpec* ft_log_window_properties[FT_LOG_WINDOW_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
typedef struct _Block2Data Block2Data;

struct _FtSectionedLogModel {
	GObject parent_instance;
	FtSectionedLogModelPrivate * priv;
};

struct _FtSectionedLogModelClass {
	GObjectClass parent_class;
};

struct _FtSectionedLogModelPrivate {
	GListModel* _model;
};

struct _FtLogWindowPrivate {
	GtkStack* stack;
	GtkListView* listview;
	GtkLabel* header_label;
	GtkLabel* datetime_label;
	GtkLabel* context_label;
	GtkLabel* command_line_header_label;
	GtkLabel* command_line_label;
	GtkLabel* command_error_header_label;
	GtkLabel* command_error_message_label;
	GtkLabel* command_output_header_label;
	GtkLabel* command_output_label;
	GtkBox* command_exit_code_box;
	GtkLabel* command_exit_code_label;
	GtkLabel* command_execution_time_label;
	FtLogger* logger;
	FtLogEntry* selected_entry;
	guint update_contents_id;
};

struct _Block1Data {
	int _ref_count_;
	FtLogWindow* self;
	FtSidebarRow* row;
};

struct _Block2Data {
	int _ref_count_;
	Block1Data * _data1_;
	GtkSpinner* spinner;
};

static gint FtSectionedLogModel_private_offset;
static gpointer ft_sectioned_log_model_parent_class = NULL;
static GListModelInterface * ft_sectioned_log_model_g_list_model_parent_iface = NULL;
static GtkSectionModelInterface * ft_sectioned_log_model_gtk_section_model_parent_iface = NULL;
static gint FtLogWindow_private_offset;
static gpointer ft_log_window_parent_class = NULL;

VALA_EXTERN gchar* ft_get_event_icon_name (const gchar* event_name);
VALA_EXTERN gchar* ft_get_action_icon_name (const gchar* event_name);
VALA_EXTERN GType ft_sectioned_log_model_get_type (void) G_GNUC_CONST ;
VALA_EXTERN FtSectionedLogModel* ft_sectioned_log_model_new (GListModel* model);
VALA_EXTERN FtSectionedLogModel* ft_sectioned_log_model_construct (GType object_type,
                                                       GListModel* model);
static GObject* ft_sectioned_log_model_real_get_item (GListModel* base,
                                               guint position);
static GType ft_sectioned_log_model_real_get_item_type (GListModel* base);
static guint ft_sectioned_log_model_real_get_n_items (GListModel* base);
static void ft_sectioned_log_model_on_items_changed (FtSectionedLogModel* self,
                                              guint position,
                                              guint removed,
                                              guint added);
static inline gint64 ft_sectioned_log_model_calculate_hash (gint64 timestamp);
static void ft_sectioned_log_model_real_get_section (GtkSectionModel* base,
                                              guint position,
                                              guint* out_start,
                                              guint* out_end);
static void ft_sectioned_log_model_real_dispose (GObject* base);
static void _ft_sectioned_log_model_on_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                                          guint position,
                                                                          guint removed,
                                                                          guint added,
                                                                          gpointer self);
VALA_EXTERN GListModel* ft_sectioned_log_model_get_model (FtSectionedLogModel* self);
static void ft_sectioned_log_model_set_model (FtSectionedLogModel* self,
                                       GListModel* value);
static void ft_sectioned_log_model_finalize (GObject * obj);
static GType ft_sectioned_log_model_get_type_once (void);
static void _vala_ft_sectioned_log_model_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_ft_sectioned_log_model_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
static void ft_log_window_update_contents (FtLogWindow* self);
static void ft_log_window_on_selected_entry_notify (FtLogWindow* self);
static void _ft_log_window_on_selected_entry_notify_g_object_notify (GObject* _sender,
                                                              GParamSpec* pspec,
                                                              gpointer self);
static void ft_log_window_queue_update_contents (FtLogWindow* self);
static gboolean ___lambda4_ (FtLogWindow* self);
static gboolean ____lambda4__gtk_tick_callback (GtkWidget* widget,
                                         GdkFrameClock* frame_clock,
                                         gpointer self);
static void ft_log_window_update_stack_visible_child (FtLogWindow* self);
static void ft_log_window_on_items_changed (FtLogWindow* self,
                                     GListModel* model,
                                     guint position,
                                     guint removed,
                                     guint added);
static void ft_log_window_on_selection_changed (FtLogWindow* self,
                                         guint position,
                                         guint n_items);
static void ft_log_window_setup_list_item (FtLogWindow* self,
                                    GObject* object);
static void _ft_log_window_setup_list_item_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                        GObject* object,
                                                                        gpointer self);
static void ft_log_window_bind_list_item (FtLogWindow* self,
                                   GObject* object);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void ____lambda5_ (Block1Data* _data1_);
static void _____lambda5__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void ____lambda6_ (Block2Data* _data2_,
                   GObject* object,
                   GParamSpec* pspec);
static void _____lambda6__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void _ft_log_window_bind_list_item_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                      GObject* object,
                                                                      gpointer self);
static void ft_log_window_real_dispose (GObject* base);
static void _ft_log_window_on_selection_changed_gtk_selection_model_selection_changed (GtkSelectionModel* _sender,
                                                                                guint position,
                                                                                guint n_items,
                                                                                gpointer self);
static void _ft_log_window_on_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                                 guint position,
                                                                 guint removed,
                                                                 guint added,
                                                                 gpointer self);
static GObject * ft_log_window_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties);
static void ft_log_window_finalize (GObject * obj);
static GType ft_log_window_get_type_once (void);

gchar*
ft_get_event_icon_name (const gchar* event_name)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	static GQuark _tmp1_label6 = 0;
	gchar* result;
	g_return_val_if_fail (event_name != NULL, NULL);
	_tmp0_ = event_name;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("start")))) {
		switch (0) {
			default:
			{
				gchar* _tmp3_;
				_tmp3_ = g_strdup ("timer-start-symbolic");
				result = _tmp3_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("stop")))) {
		switch (0) {
			default:
			{
				gchar* _tmp4_;
				_tmp4_ = g_strdup ("timer-stop-symbolic");
				result = _tmp4_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("skip")))) {
		switch (0) {
			default:
			{
				gchar* _tmp5_;
				_tmp5_ = g_strdup ("timer-skip-symbolic");
				result = _tmp5_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("rewind")))) {
		switch (0) {
			default:
			{
				gchar* _tmp6_;
				_tmp6_ = g_strdup ("timer-rewind-symbolic");
				result = _tmp6_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("pause")))) {
		switch (0) {
			default:
			{
				gchar* _tmp7_;
				_tmp7_ = g_strdup ("timer-pause-symbolic");
				result = _tmp7_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string ("resume")))) {
		switch (0) {
			default:
			{
				gchar* _tmp8_;
				_tmp8_ = g_strdup ("timer-start-symbolic");
				result = _tmp8_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label6) ? _tmp1_label6 : (_tmp1_label6 = g_quark_from_static_string ("reset")))) {
		switch (0) {
			default:
			{
				gchar* _tmp9_;
				_tmp9_ = g_strdup ("timer-reset-symbolic");
				result = _tmp9_;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				gchar* _tmp10_;
				_tmp10_ = g_strdup ("event-symbolic");
				result = _tmp10_;
				return result;
			}
		}
	}
}

gchar*
ft_get_action_icon_name (const gchar* event_name)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	gchar* result;
	g_return_val_if_fail (event_name != NULL, NULL);
	_tmp0_ = event_name;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("triggered")))) {
		switch (0) {
			default:
			{
				gchar* _tmp3_;
				_tmp3_ = g_strdup ("custom-action-symbolic");
				result = _tmp3_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("entered-condition")))) {
		switch (0) {
			default:
			{
				gchar* _tmp4_;
				_tmp4_ = g_strdup ("condition-enter-symbolic");
				result = _tmp4_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("exited-condition")))) {
		switch (0) {
			default:
			{
				gchar* _tmp5_;
				_tmp5_ = g_strdup ("condition-exit-symbolic");
				result = _tmp5_;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				gchar* _tmp6_;
				_tmp6_ = g_strdup ("custom-action-symbolic");
				result = _tmp6_;
				return result;
			}
		}
	}
}

static inline gpointer
ft_sectioned_log_model_get_instance_private (FtSectionedLogModel* self)
{
	return G_STRUCT_MEMBER_P (self, FtSectionedLogModel_private_offset);
}

FtSectionedLogModel*
ft_sectioned_log_model_construct (GType object_type,
                                  GListModel* model)
{
	FtSectionedLogModel * self = NULL;
	g_return_val_if_fail (model != NULL, NULL);
	self = (FtSectionedLogModel*) g_object_new (object_type, "model", model, NULL);
	return self;
}

FtSectionedLogModel*
ft_sectioned_log_model_new (GListModel* model)
{
	return ft_sectioned_log_model_construct (FT_TYPE_SECTIONED_LOG_MODEL, model);
}

static GObject*
ft_sectioned_log_model_real_get_item (GListModel* base,
                                      guint position)
{
	FtSectionedLogModel * self;
	GListModel* _tmp0_;
	GObject* _tmp1_;
	GObject* result;
	self = (FtSectionedLogModel*) base;
	_tmp0_ = self->priv->_model;
	_tmp1_ = g_list_model_get_item (_tmp0_, position);
	result = _tmp1_;
	return result;
}

static GType
ft_sectioned_log_model_real_get_item_type (GListModel* base)
{
	FtSectionedLogModel * self;
	GListModel* _tmp0_;
	GType result;
	self = (FtSectionedLogModel*) base;
	_tmp0_ = self->priv->_model;
	result = g_list_model_get_item_type (_tmp0_);
	return result;
}

static guint
ft_sectioned_log_model_real_get_n_items (GListModel* base)
{
	FtSectionedLogModel * self;
	GListModel* _tmp0_;
	guint result;
	self = (FtSectionedLogModel*) base;
	_tmp0_ = self->priv->_model;
	result = g_list_model_get_n_items (_tmp0_);
	return result;
}

static void
ft_sectioned_log_model_on_items_changed (FtSectionedLogModel* self,
                                         guint position,
                                         guint removed,
                                         guint added)
{
	g_return_if_fail (self != NULL);
	g_list_model_items_changed ((GListModel*) self, position, removed, added);
	if (added > ((guint) 0)) {
		gtk_section_model_sections_changed ((GtkSectionModel*) self, position, added);
	}
}

static inline gint64
ft_sectioned_log_model_calculate_hash (gint64 timestamp)
{
	gint64 result;
	result = timestamp / FT_INTERVAL_MINUTE;
	return result;
}

static void
ft_sectioned_log_model_real_get_section (GtkSectionModel* base,
                                         guint position,
                                         guint* out_start,
                                         guint* out_end)
{
	FtSectionedLogModel * self;
	guint _vala_out_start = 0U;
	guint _vala_out_end = 0U;
	FtLogEntry* reference_item = NULL;
	GListModel* _tmp0_;
	GObject* _tmp1_;
	gint64 reference_hash = 0LL;
	FtLogEntry* _tmp2_;
	gint64 _tmp3_;
	gint64 _tmp4_;
	guint n_items = 0U;
	GListModel* _tmp5_;
	self = (FtSectionedLogModel*) base;
	_tmp0_ = self->priv->_model;
	_tmp1_ = g_list_model_get_item (_tmp0_, position);
	reference_item = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, FT_TYPE_LOG_ENTRY, FtLogEntry);
	_tmp2_ = reference_item;
	_tmp3_ = ft_log_entry_get_timestamp (_tmp2_);
	_tmp4_ = _tmp3_;
	reference_hash = ft_sectioned_log_model_calculate_hash (_tmp4_);
	_tmp5_ = self->priv->_model;
	n_items = g_list_model_get_n_items (_tmp5_);
	_vala_out_start = position;
	_vala_out_end = position + 1;
	while (TRUE) {
		FtLogEntry* item = NULL;
		GListModel* _tmp6_;
		GObject* _tmp7_;
		FtLogEntry* _tmp8_;
		gint64 _tmp9_;
		gint64 _tmp10_;
		if (!(_vala_out_start > ((guint) 0))) {
			break;
		}
		_tmp6_ = self->priv->_model;
		_tmp7_ = g_list_model_get_item (_tmp6_, _vala_out_start - 1);
		item = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, FT_TYPE_LOG_ENTRY, FtLogEntry);
		_tmp8_ = item;
		_tmp9_ = ft_log_entry_get_timestamp (_tmp8_);
		_tmp10_ = _tmp9_;
		if (ft_sectioned_log_model_calculate_hash (_tmp10_) == reference_hash) {
			guint _tmp11_;
			_tmp11_ = _vala_out_start;
			_vala_out_start = _tmp11_ - 1;
		} else {
			_g_object_unref0 (item);
			break;
		}
		_g_object_unref0 (item);
	}
	while (TRUE) {
		FtLogEntry* item = NULL;
		GListModel* _tmp12_;
		GObject* _tmp13_;
		FtLogEntry* _tmp14_;
		gint64 _tmp15_;
		gint64 _tmp16_;
		if (!(_vala_out_end < n_items)) {
			break;
		}
		_tmp12_ = self->priv->_model;
		_tmp13_ = g_list_model_get_item (_tmp12_, _vala_out_end);
		item = G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FT_TYPE_LOG_ENTRY, FtLogEntry);
		_tmp14_ = item;
		_tmp15_ = ft_log_entry_get_timestamp (_tmp14_);
		_tmp16_ = _tmp15_;
		if (ft_sectioned_log_model_calculate_hash (_tmp16_) == reference_hash) {
			guint _tmp17_;
			_tmp17_ = _vala_out_end;
			_vala_out_end = _tmp17_ + 1;
		} else {
			_g_object_unref0 (item);
			break;
		}
		_g_object_unref0 (item);
	}
	_g_object_unref0 (reference_item);
	if (out_start) {
		*out_start = _vala_out_start;
	}
	if (out_end) {
		*out_end = _vala_out_end;
	}
}

static void
_ft_sectioned_log_model_on_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                                     guint position,
                                                                     guint removed,
                                                                     guint added,
                                                                     gpointer self)
{
	ft_sectioned_log_model_on_items_changed ((FtSectionedLogModel*) self, position, removed, added);
}

static void
ft_sectioned_log_model_real_dispose (GObject* base)
{
	FtSectionedLogModel * self;
	GListModel* _tmp0_;
	self = (FtSectionedLogModel*) base;
	_tmp0_ = self->priv->_model;
	if (_tmp0_ != NULL) {
		GListModel* _tmp1_;
		guint _tmp2_;
		_tmp1_ = self->priv->_model;
		g_signal_parse_name ("items-changed", g_list_model_get_type (), &_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) _ft_sectioned_log_model_on_items_changed_g_list_model_items_changed, self);
		_g_object_unref0 (self->priv->_model);
		self->priv->_model = NULL;
	}
	G_OBJECT_CLASS (ft_sectioned_log_model_parent_class)->dispose (G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject));
}

GListModel*
ft_sectioned_log_model_get_model (FtSectionedLogModel* self)
{
	GListModel* result;
	GListModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model;
	result = _tmp0_;
	return result;
}

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

static void
ft_sectioned_log_model_set_model (FtSectionedLogModel* self,
                                  GListModel* value)
{
	GListModel* _tmp0_;
	GListModel* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_model);
	self->priv->_model = _tmp0_;
	_tmp1_ = self->priv->_model;
	g_signal_connect_object (_tmp1_, "items-changed", (GCallback) _ft_sectioned_log_model_on_items_changed_g_list_model_items_changed, self, 0);
	g_object_notify_by_pspec ((GObject *) self, ft_sectioned_log_model_properties[FT_SECTIONED_LOG_MODEL_MODEL_PROPERTY]);
}

static void
ft_sectioned_log_model_class_init (FtSectionedLogModelClass * klass,
                                   gpointer klass_data)
{
	ft_sectioned_log_model_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FtSectionedLogModel_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) ft_sectioned_log_model_real_dispose;
	G_OBJECT_CLASS (klass)->get_property = _vala_ft_sectioned_log_model_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_ft_sectioned_log_model_set_property;
	G_OBJECT_CLASS (klass)->finalize = ft_sectioned_log_model_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_SECTIONED_LOG_MODEL_MODEL_PROPERTY, ft_sectioned_log_model_properties[FT_SECTIONED_LOG_MODEL_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", g_list_model_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
ft_sectioned_log_model_g_list_model_interface_init (GListModelInterface * iface,
                                                    gpointer iface_data)
{
	ft_sectioned_log_model_g_list_model_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_item = (GObject* (*) (GListModel*, guint)) ft_sectioned_log_model_real_get_item;
	iface->get_item_type = (GType (*) (GListModel*)) ft_sectioned_log_model_real_get_item_type;
	iface->get_n_items = (guint (*) (GListModel*)) ft_sectioned_log_model_real_get_n_items;
}

static void
ft_sectioned_log_model_gtk_section_model_interface_init (GtkSectionModelInterface * iface,
                                                         gpointer iface_data)
{
	ft_sectioned_log_model_gtk_section_model_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_section = (void (*) (GtkSectionModel*, guint, guint*, guint*)) ft_sectioned_log_model_real_get_section;
}

static void
ft_sectioned_log_model_instance_init (FtSectionedLogModel * self,
                                      gpointer klass)
{
	self->priv = ft_sectioned_log_model_get_instance_private (self);
	self->priv->_model = NULL;
}

static void
ft_sectioned_log_model_finalize (GObject * obj)
{
	FtSectionedLogModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_SECTIONED_LOG_MODEL, FtSectionedLogModel);
	_g_object_unref0 (self->priv->_model);
	G_OBJECT_CLASS (ft_sectioned_log_model_parent_class)->finalize (obj);
}

/**
     * Custom model for handling sections (time headers).
     */
static GType
ft_sectioned_log_model_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtSectionedLogModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_sectioned_log_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FtSectionedLogModel), 0, (GInstanceInitFunc) ft_sectioned_log_model_instance_init, NULL };
	static const GInterfaceInfo g_list_model_info = { (GInterfaceInitFunc) ft_sectioned_log_model_g_list_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gtk_section_model_info = { (GInterfaceInitFunc) ft_sectioned_log_model_gtk_section_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType ft_sectioned_log_model_type_id;
	ft_sectioned_log_model_type_id = g_type_register_static (G_TYPE_OBJECT, "FtSectionedLogModel", &g_define_type_info, 0);
	g_type_add_interface_static (ft_sectioned_log_model_type_id, g_list_model_get_type (), &g_list_model_info);
	g_type_add_interface_static (ft_sectioned_log_model_type_id, gtk_section_model_get_type (), &gtk_section_model_info);
	FtSectionedLogModel_private_offset = g_type_add_instance_private (ft_sectioned_log_model_type_id, sizeof (FtSectionedLogModelPrivate));
	return ft_sectioned_log_model_type_id;
}

GType
ft_sectioned_log_model_get_type (void)
{
	static volatile gsize ft_sectioned_log_model_type_id__once = 0;
	if (g_once_init_enter (&ft_sectioned_log_model_type_id__once)) {
		GType ft_sectioned_log_model_type_id;
		ft_sectioned_log_model_type_id = ft_sectioned_log_model_get_type_once ();
		g_once_init_leave (&ft_sectioned_log_model_type_id__once, ft_sectioned_log_model_type_id);
	}
	return ft_sectioned_log_model_type_id__once;
}

static void
_vala_ft_sectioned_log_model_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	FtSectionedLogModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_SECTIONED_LOG_MODEL, FtSectionedLogModel);
	switch (property_id) {
		case FT_SECTIONED_LOG_MODEL_MODEL_PROPERTY:
		g_value_set_object (value, ft_sectioned_log_model_get_model (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_ft_sectioned_log_model_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	FtSectionedLogModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_SECTIONED_LOG_MODEL, FtSectionedLogModel);
	switch (property_id) {
		case FT_SECTIONED_LOG_MODEL_MODEL_PROPERTY:
		ft_sectioned_log_model_set_model (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
ft_log_window_get_instance_private (FtLogWindow* self)
{
	return G_STRUCT_MEMBER_P (self, FtLogWindow_private_offset);
}

static void
_ft_log_window_on_selected_entry_notify_g_object_notify (GObject* _sender,
                                                         GParamSpec* pspec,
                                                         gpointer self)
{
	ft_log_window_on_selected_entry_notify ((FtLogWindow*) self);
}

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

static void
ft_log_window_update_contents (FtLogWindow* self)
{
	FtLogEntry* _tmp0_;
	GtkSingleSelection* model = NULL;
	GtkListView* _tmp3_;
	GtkSelectionModel* _tmp4_;
	GtkSelectionModel* _tmp5_;
	GtkSingleSelection* _tmp6_;
	GtkSingleSelection* _tmp7_ = NULL;
	GtkSingleSelection* _tmp8_;
	GObject* _tmp9_ = NULL;
	FtLogEntry* entry = NULL;
	FtLogEntry* _tmp12_;
	FtLogEntry* _tmp13_;
	FtLogEntry* _tmp104_;
	FtLogEntry* _tmp105_;
	g_return_if_fail (self != NULL);
	if (self->priv->update_contents_id != ((guint) 0)) {
		gtk_widget_remove_tick_callback ((GtkWidget*) self, self->priv->update_contents_id);
		self->priv->update_contents_id = (guint) 0;
	}
	_tmp0_ = self->priv->selected_entry;
	if (_tmp0_ != NULL) {
		FtLogEntry* _tmp1_;
		guint _tmp2_;
		_tmp1_ = self->priv->selected_entry;
		g_signal_parse_name ("notify", G_TYPE_OBJECT, &_tmp2_, NULL, FALSE);
		g_signal_handlers_disconnect_matched ((GObject*) _tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _ft_log_window_on_selected_entry_notify_g_object_notify, self);
		_g_object_unref0 (self->priv->selected_entry);
		self->priv->selected_entry = NULL;
	}
	_tmp3_ = self->priv->listview;
	_tmp4_ = gtk_list_view_get_model (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_single_selection_get_type (), GtkSingleSelection));
	model = _tmp6_;
	_tmp8_ = model;
	_tmp7_ = _tmp8_;
	_tmp9_ = NULL;
	if (_tmp7_ != NULL) {
		GObject* _tmp10_;
		GObject* _tmp11_;
		_tmp10_ = gtk_single_selection_get_selected_item (_tmp7_);
		_tmp11_ = _tmp10_;
		_tmp9_ = _tmp11_;
	}
	_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, FT_TYPE_LOG_ENTRY, FtLogEntry));
	entry = _tmp12_;
	_tmp13_ = entry;
	if (_tmp13_ != NULL) {
		GDateTime* datetime = NULL;
		FtLogEntry* _tmp14_;
		gint64 _tmp15_;
		gint64 _tmp16_;
		GDateTime* _tmp17_;
		GtkLabel* _tmp18_;
		FtLogEntry* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		gchar* _tmp22_ = NULL;
		GDateTime* _tmp23_;
		GtkLabel* _tmp29_;
		gchar* _tmp30_ = NULL;
		FtLogEntry* _tmp31_;
		FtContext* _tmp32_;
		FtContext* _tmp33_;
		GtkLabel* _tmp39_;
		GtkLabel* _tmp40_;
		GtkLabel* _tmp41_;
		GtkLabel* _tmp42_;
		GtkLabel* _tmp43_;
		GtkLabel* _tmp44_;
		GtkLabel* _tmp45_;
		GtkBox* _tmp46_;
		FtLogEntry* _tmp47_;
		FtLogEntry* _tmp103_;
		_tmp14_ = entry;
		_tmp15_ = ft_log_entry_get_timestamp (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = g_date_time_new_from_unix_utc (_tmp16_ / FT_INTERVAL_SECOND);
		datetime = _tmp17_;
		_tmp18_ = self->priv->header_label;
		_tmp19_ = entry;
		_tmp20_ = ft_log_entry_get_label (_tmp19_);
		_tmp21_ = _tmp20_;
		gtk_label_set_label (_tmp18_, _tmp21_);
		_tmp23_ = datetime;
		if (_tmp23_ != NULL) {
			GDateTime* _tmp24_;
			GDateTime* _tmp25_;
			GDateTime* _tmp26_;
			gchar* _tmp27_;
			_tmp24_ = datetime;
			_tmp25_ = g_date_time_to_local (_tmp24_);
			_tmp26_ = _tmp25_;
			_tmp27_ = g_date_time_format (_tmp26_, "%c");
			_g_free0 (_tmp22_);
			_tmp22_ = _tmp27_;
			_g_date_time_unref0 (_tmp26_);
		} else {
			gchar* _tmp28_;
			_tmp28_ = g_strdup ("");
			_g_free0 (_tmp22_);
			_tmp22_ = _tmp28_;
		}
		_tmp29_ = self->priv->datetime_label;
		gtk_label_set_label (_tmp29_, _tmp22_);
		_tmp31_ = entry;
		_tmp32_ = ft_log_entry_get_context (_tmp31_);
		_tmp33_ = _tmp32_;
		if (_tmp33_ != NULL) {
			FtLogEntry* _tmp34_;
			FtContext* _tmp35_;
			FtContext* _tmp36_;
			gchar* _tmp37_;
			_tmp34_ = entry;
			_tmp35_ = ft_log_entry_get_context (_tmp34_);
			_tmp36_ = _tmp35_;
			_tmp37_ = ft_context_to_json (_tmp36_);
			_g_free0 (_tmp30_);
			_tmp30_ = _tmp37_;
		} else {
			gchar* _tmp38_;
			_tmp38_ = g_strdup ("");
			_g_free0 (_tmp30_);
			_tmp30_ = _tmp38_;
		}
		_tmp39_ = self->priv->context_label;
		gtk_label_set_label (_tmp39_, _tmp30_);
		_tmp40_ = self->priv->command_line_header_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp40_, FALSE);
		_tmp41_ = self->priv->command_line_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp41_, FALSE);
		_tmp42_ = self->priv->command_error_header_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp42_, FALSE);
		_tmp43_ = self->priv->command_error_message_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp43_, FALSE);
		_tmp44_ = self->priv->command_output_header_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp44_, FALSE);
		_tmp45_ = self->priv->command_output_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp45_, FALSE);
		_tmp46_ = self->priv->command_exit_code_box;
		gtk_widget_set_visible ((GtkWidget*) _tmp46_, FALSE);
		_tmp47_ = entry;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp47_, FT_TYPE_ACTION_LOG_ENTRY)) {
			FtActionLogEntry* action_entry = NULL;
			FtLogEntry* _tmp48_;
			FtActionLogEntry* _tmp49_;
			FtActionLogEntry* _tmp50_;
			const gchar* _tmp51_;
			const gchar* _tmp52_;
			gboolean _tmp59_ = FALSE;
			FtActionLogEntry* _tmp60_;
			const gchar* _tmp61_;
			const gchar* _tmp62_;
			gboolean _tmp72_ = FALSE;
			FtActionLogEntry* _tmp73_;
			const gchar* _tmp74_;
			const gchar* _tmp75_;
			FtActionLogEntry* _tmp87_;
			gint _tmp88_;
			gint _tmp89_;
			_tmp48_ = entry;
			_tmp49_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, FT_TYPE_ACTION_LOG_ENTRY, FtActionLogEntry));
			action_entry = _tmp49_;
			_tmp50_ = action_entry;
			_tmp51_ = ft_action_log_entry_get_command_line (_tmp50_);
			_tmp52_ = _tmp51_;
			if (g_strcmp0 (_tmp52_, "") != 0) {
				GtkLabel* _tmp53_;
				FtActionLogEntry* _tmp54_;
				const gchar* _tmp55_;
				const gchar* _tmp56_;
				GtkLabel* _tmp57_;
				GtkLabel* _tmp58_;
				_tmp53_ = self->priv->command_line_label;
				_tmp54_ = action_entry;
				_tmp55_ = ft_action_log_entry_get_command_line (_tmp54_);
				_tmp56_ = _tmp55_;
				gtk_label_set_label (_tmp53_, _tmp56_);
				_tmp57_ = self->priv->command_line_header_label;
				gtk_widget_set_visible ((GtkWidget*) _tmp57_, TRUE);
				_tmp58_ = self->priv->command_line_label;
				gtk_widget_set_visible ((GtkWidget*) _tmp58_, TRUE);
			}
			_tmp60_ = action_entry;
			_tmp61_ = ft_action_log_entry_get_command_error_message (_tmp60_);
			_tmp62_ = _tmp61_;
			if (_tmp62_ != NULL) {
				FtActionLogEntry* _tmp63_;
				const gchar* _tmp64_;
				const gchar* _tmp65_;
				_tmp63_ = action_entry;
				_tmp64_ = ft_action_log_entry_get_command_error_message (_tmp63_);
				_tmp65_ = _tmp64_;
				_tmp59_ = g_strcmp0 (_tmp65_, "") != 0;
			} else {
				_tmp59_ = FALSE;
			}
			if (_tmp59_) {
				GtkLabel* _tmp66_;
				FtActionLogEntry* _tmp67_;
				const gchar* _tmp68_;
				const gchar* _tmp69_;
				GtkLabel* _tmp70_;
				GtkLabel* _tmp71_;
				_tmp66_ = self->priv->command_error_message_label;
				_tmp67_ = action_entry;
				_tmp68_ = ft_action_log_entry_get_command_error_message (_tmp67_);
				_tmp69_ = _tmp68_;
				gtk_label_set_label (_tmp66_, _tmp69_);
				_tmp70_ = self->priv->command_error_header_label;
				gtk_widget_set_visible ((GtkWidget*) _tmp70_, TRUE);
				_tmp71_ = self->priv->command_error_message_label;
				gtk_widget_set_visible ((GtkWidget*) _tmp71_, TRUE);
			}
			_tmp73_ = action_entry;
			_tmp74_ = ft_action_log_entry_get_command_output (_tmp73_);
			_tmp75_ = _tmp74_;
			if (_tmp75_ != NULL) {
				FtActionLogEntry* _tmp76_;
				const gchar* _tmp77_;
				const gchar* _tmp78_;
				_tmp76_ = action_entry;
				_tmp77_ = ft_action_log_entry_get_command_output (_tmp76_);
				_tmp78_ = _tmp77_;
				_tmp72_ = g_strcmp0 (_tmp78_, "") != 0;
			} else {
				_tmp72_ = FALSE;
			}
			if (_tmp72_) {
				GtkLabel* _tmp79_;
				FtActionLogEntry* _tmp80_;
				const gchar* _tmp81_;
				const gchar* _tmp82_;
				gchar* _tmp83_;
				gchar* _tmp84_;
				GtkLabel* _tmp85_;
				GtkLabel* _tmp86_;
				_tmp79_ = self->priv->command_output_label;
				_tmp80_ = action_entry;
				_tmp81_ = ft_action_log_entry_get_command_output (_tmp80_);
				_tmp82_ = _tmp81_;
				_tmp83_ = string_strip (_tmp82_);
				_tmp84_ = _tmp83_;
				gtk_label_set_label (_tmp79_, _tmp84_);
				_g_free0 (_tmp84_);
				_tmp85_ = self->priv->command_output_header_label;
				gtk_widget_set_visible ((GtkWidget*) _tmp85_, TRUE);
				_tmp86_ = self->priv->command_output_label;
				gtk_widget_set_visible ((GtkWidget*) _tmp86_, TRUE);
			}
			_tmp87_ = action_entry;
			_tmp88_ = ft_action_log_entry_get_command_exit_code (_tmp87_);
			_tmp89_ = _tmp88_;
			if (_tmp89_ >= 0) {
				GtkBox* _tmp90_;
				GtkLabel* _tmp91_;
				FtActionLogEntry* _tmp92_;
				gint _tmp93_;
				gint _tmp94_;
				gchar* _tmp95_;
				gchar* _tmp96_;
				GtkLabel* _tmp97_;
				FtActionLogEntry* _tmp98_;
				gint64 _tmp99_;
				gint64 _tmp100_;
				gchar* _tmp101_;
				gchar* _tmp102_;
				_tmp90_ = self->priv->command_exit_code_box;
				gtk_widget_set_visible ((GtkWidget*) _tmp90_, TRUE);
				_tmp91_ = self->priv->command_exit_code_label;
				_tmp92_ = action_entry;
				_tmp93_ = ft_action_log_entry_get_command_exit_code (_tmp92_);
				_tmp94_ = _tmp93_;
				_tmp95_ = g_strdup_printf ("%i", _tmp94_);
				_tmp96_ = _tmp95_;
				gtk_label_set_label (_tmp91_, _tmp96_);
				_g_free0 (_tmp96_);
				_tmp97_ = self->priv->command_execution_time_label;
				_tmp98_ = action_entry;
				_tmp99_ = ft_action_log_entry_get_command_execution_time (_tmp98_);
				_tmp100_ = _tmp99_;
				_tmp101_ = g_strdup_printf ("%u ms", ft_timestamp_to_milliseconds_uint (_tmp100_));
				_tmp102_ = _tmp101_;
				gtk_label_set_label (_tmp97_, _tmp102_);
				_g_free0 (_tmp102_);
			}
			_g_object_unref0 (action_entry);
		}
		_tmp103_ = entry;
		g_signal_connect_object ((GObject*) _tmp103_, "notify", (GCallback) _ft_log_window_on_selected_entry_notify_g_object_notify, self, 0);
		_g_free0 (_tmp30_);
		_g_free0 (_tmp22_);
		_g_date_time_unref0 (datetime);
	}
	_tmp104_ = entry;
	_tmp105_ = _g_object_ref0 (_tmp104_);
	_g_object_unref0 (self->priv->selected_entry);
	self->priv->selected_entry = _tmp105_;
	_g_object_unref0 (entry);
	_g_object_unref0 (model);
}

static gboolean
___lambda4_ (FtLogWindow* self)
{
	gboolean result;
	self->priv->update_contents_id = (guint) 0;
	ft_log_window_update_contents (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda4__gtk_tick_callback (GtkWidget* widget,
                                GdkFrameClock* frame_clock,
                                gpointer self)
{
	gboolean result;
	result = ___lambda4_ ((FtLogWindow*) self);
	return result;
}

static void
ft_log_window_queue_update_contents (FtLogWindow* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->update_contents_id == ((guint) 0)) {
		self->priv->update_contents_id = gtk_widget_add_tick_callback ((GtkWidget*) self, ____lambda4__gtk_tick_callback, g_object_ref (self), g_object_unref);
	}
}

static void
ft_log_window_update_stack_visible_child (FtLogWindow* self)
{
	GtkSingleSelection* model = NULL;
	GtkListView* _tmp0_;
	GtkSelectionModel* _tmp1_;
	GtkSelectionModel* _tmp2_;
	GtkSingleSelection* _tmp3_;
	guint _tmp4_ = 0U;
	GtkSingleSelection* _tmp5_;
	guint n_items = 0U;
	const gchar* _tmp7_ = NULL;
	gchar* visible_child_name = NULL;
	gchar* _tmp8_;
	GtkStack* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listview;
	_tmp1_ = gtk_list_view_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_single_selection_get_type (), GtkSingleSelection));
	model = _tmp3_;
	_tmp5_ = model;
	if (_tmp5_ != NULL) {
		GtkSingleSelection* _tmp6_;
		_tmp6_ = model;
		_tmp4_ = g_list_model_get_n_items ((GListModel*) _tmp6_);
	} else {
		_tmp4_ = 0U;
	}
	n_items = _tmp4_;
	if (n_items == 0U) {
		_tmp7_ = "placeholder";
	} else {
		_tmp7_ = "content";
	}
	_tmp8_ = g_strdup (_tmp7_);
	visible_child_name = _tmp8_;
	_tmp9_ = self->priv->stack;
	_tmp10_ = gtk_stack_get_visible_child_name (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = visible_child_name;
	if (g_strcmp0 (_tmp11_, _tmp12_) != 0) {
		const gchar* _tmp13_;
		GtkStack* _tmp14_;
		const gchar* _tmp15_;
		_tmp13_ = visible_child_name;
		if (g_strcmp0 (_tmp13_, "content") == 0) {
			ft_log_window_update_contents (self);
		}
		_tmp14_ = self->priv->stack;
		_tmp15_ = visible_child_name;
		gtk_stack_set_visible_child_name (_tmp14_, _tmp15_);
	}
	_g_free0 (visible_child_name);
	_g_object_unref0 (model);
}

static void
ft_log_window_on_items_changed (FtLogWindow* self,
                                GListModel* model,
                                guint position,
                                guint removed,
                                guint added)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (model != NULL);
	ft_log_window_update_stack_visible_child (self);
}

static void
ft_log_window_on_selection_changed (FtLogWindow* self,
                                    guint position,
                                    guint n_items)
{
	g_return_if_fail (self != NULL);
	ft_log_window_update_contents (self);
}

static void
ft_log_window_on_selected_entry_notify (FtLogWindow* self)
{
	g_return_if_fail (self != NULL);
	ft_log_window_queue_update_contents (self);
}

static void
ft_log_window_setup_list_item (FtLogWindow* self,
                               GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	FtSidebarRow* _tmp1_;
	FtSidebarRow* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, gtk_list_item_get_type (), GtkListItem));
	list_item = _tmp0_;
	_tmp1_ = ft_sidebar_row_new ();
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	gtk_list_item_set_child (list_item, (GtkWidget*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	_g_object_unref0 (list_item);
}

static void
_ft_log_window_setup_list_item_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                   GObject* object,
                                                                   gpointer self)
{
	ft_log_window_setup_list_item ((FtLogWindow*) self, object);
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		FtLogWindow* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->row);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

static void
____lambda5_ (Block1Data* _data1_)
{
	FtLogWindow* self;
	FtSidebarRow* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	self = _data1_->self;
	_tmp0_ = _data1_->row;
	_tmp1_ = gtk_widget_get_parent ((GtkWidget*) _tmp0_);
	_tmp2_ = _tmp1_;
	gtk_widget_add_css_class (_tmp2_, "error");
}

static void
_____lambda5__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	____lambda5_ (self);
}

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		FtLogWindow* self;
		self = _data2_->_data1_->self;
		_g_object_unref0 (_data2_->spinner);
		block1_data_unref (_data2_->_data1_);
		_data2_->_data1_ = NULL;
		g_slice_free (Block2Data, _data2_);
	}
}

static void
____lambda6_ (Block2Data* _data2_,
              GObject* object,
              GParamSpec* pspec)
{
	Block1Data* _data1_;
	FtLogWindow* self;
	GtkSpinner* _tmp0_;
	_data1_ = _data2_->_data1_;
	self = _data1_->self;
	g_return_if_fail (object != NULL);
	g_return_if_fail (pspec != NULL);
	_tmp0_ = _data2_->spinner;
	gtk_spinner_stop (_tmp0_);
}

static void
_____lambda6__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	____lambda6_ (self, _sender, pspec);
}

static void
ft_log_window_bind_list_item (FtLogWindow* self,
                              GObject* object)
{
	Block1Data* _data1_;
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	FtLogEntry* entry = NULL;
	GtkListItem* _tmp1_;
	GObject* _tmp2_;
	GObject* _tmp3_;
	FtLogEntry* _tmp4_;
	GtkListItem* _tmp5_;
	GtkWidget* _tmp6_;
	GtkWidget* _tmp7_;
	FtSidebarRow* _tmp8_;
	FtSidebarRow* _tmp9_;
	FtLogEntry* _tmp10_;
	FtLogEntry* _tmp19_;
	FtSidebarRow* _tmp51_;
	FtLogEntry* _tmp52_;
	const gchar* _tmp53_;
	const gchar* _tmp54_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, gtk_list_item_get_type (), GtkListItem));
	list_item = _tmp0_;
	_tmp1_ = list_item;
	_tmp2_ = gtk_list_item_get_item (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, FT_TYPE_LOG_ENTRY, FtLogEntry));
	entry = _tmp4_;
	_tmp5_ = list_item;
	_tmp6_ = gtk_list_item_get_child (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, FT_TYPE_SIDEBAR_ROW, FtSidebarRow));
	_data1_->row = _tmp8_;
	_tmp9_ = _data1_->row;
	if (_tmp9_ == NULL) {
		_g_object_unref0 (entry);
		_g_object_unref0 (list_item);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return;
	}
	_tmp10_ = entry;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, FT_TYPE_EVENT_LOG_ENTRY)) {
		FtEventLogEntry* event_entry = NULL;
		FtLogEntry* _tmp11_;
		FtEventLogEntry* _tmp12_;
		FtSidebarRow* _tmp13_;
		FtEventLogEntry* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp11_ = entry;
		_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, FT_TYPE_EVENT_LOG_ENTRY, FtEventLogEntry));
		event_entry = _tmp12_;
		_tmp13_ = _data1_->row;
		_tmp14_ = event_entry;
		_tmp15_ = ft_event_log_entry_get_event_name (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = ft_get_event_icon_name (_tmp16_);
		_tmp18_ = _tmp17_;
		ft_sidebar_row_set_icon_name (_tmp13_, _tmp18_);
		_g_free0 (_tmp18_);
		_g_object_unref0 (event_entry);
	}
	_tmp19_ = entry;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, FT_TYPE_ACTION_LOG_ENTRY)) {
		FtActionLogEntry* action_entry = NULL;
		FtLogEntry* _tmp20_;
		FtActionLogEntry* _tmp21_;
		FtSidebarRow* _tmp22_;
		FtActionLogEntry* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		FtActionLogEntry* _tmp28_;
		const gchar* _tmp29_;
		const gchar* _tmp30_;
		gboolean _tmp35_ = FALSE;
		gboolean _tmp36_ = FALSE;
		FtActionLogEntry* _tmp37_;
		const gchar* _tmp38_;
		const gchar* _tmp39_;
		_tmp20_ = entry;
		_tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, FT_TYPE_ACTION_LOG_ENTRY, FtActionLogEntry));
		action_entry = _tmp21_;
		_tmp22_ = _data1_->row;
		_tmp23_ = action_entry;
		_tmp24_ = ft_action_log_entry_get_event_name (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = ft_get_action_icon_name (_tmp25_);
		_tmp27_ = _tmp26_;
		ft_sidebar_row_set_icon_name (_tmp22_, _tmp27_);
		_g_free0 (_tmp27_);
		_tmp28_ = action_entry;
		_tmp29_ = ft_action_log_entry_get_command_error_message (_tmp28_);
		_tmp30_ = _tmp29_;
		if (_tmp30_ != NULL) {
			FtSidebarRow* _tmp31_;
			GtkWidget* _tmp32_;
			GtkWidget* _tmp33_;
			_tmp31_ = _data1_->row;
			_tmp32_ = gtk_widget_get_parent ((GtkWidget*) _tmp31_);
			_tmp33_ = _tmp32_;
			gtk_widget_add_css_class (_tmp33_, "error");
		} else {
			FtActionLogEntry* _tmp34_;
			_tmp34_ = action_entry;
			g_signal_connect_data ((GObject*) _tmp34_, "notify::command-error-message", (GCallback) _____lambda5__g_object_notify, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
		}
		_tmp37_ = action_entry;
		_tmp38_ = ft_action_log_entry_get_command_line (_tmp37_);
		_tmp39_ = _tmp38_;
		if (g_strcmp0 (_tmp39_, "") != 0) {
			FtActionLogEntry* _tmp40_;
			gint _tmp41_;
			gint _tmp42_;
			_tmp40_ = action_entry;
			_tmp41_ = ft_action_log_entry_get_command_exit_code (_tmp40_);
			_tmp42_ = _tmp41_;
			_tmp36_ = _tmp42_ < 0;
		} else {
			_tmp36_ = FALSE;
		}
		if (_tmp36_) {
			FtActionLogEntry* _tmp43_;
			const gchar* _tmp44_;
			const gchar* _tmp45_;
			_tmp43_ = action_entry;
			_tmp44_ = ft_action_log_entry_get_command_error_message (_tmp43_);
			_tmp45_ = _tmp44_;
			_tmp35_ = _tmp45_ == NULL;
		} else {
			_tmp35_ = FALSE;
		}
		if (_tmp35_) {
			Block2Data* _data2_;
			GtkSpinner* _tmp46_;
			GtkSpinner* _tmp47_;
			FtSidebarRow* _tmp48_;
			GtkSpinner* _tmp49_;
			FtActionLogEntry* _tmp50_;
			_data2_ = g_slice_new0 (Block2Data);
			_data2_->_ref_count_ = 1;
			_data2_->_data1_ = block1_data_ref (_data1_);
			_tmp46_ = (GtkSpinner*) gtk_spinner_new ();
			g_object_ref_sink (_tmp46_);
			_data2_->spinner = _tmp46_;
			_tmp47_ = _data2_->spinner;
			gtk_spinner_start (_tmp47_);
			_tmp48_ = _data1_->row;
			_tmp49_ = _data2_->spinner;
			ft_sidebar_row_set_suffix (_tmp48_, (GtkWidget*) _tmp49_);
			_tmp50_ = action_entry;
			g_signal_connect_data ((GObject*) _tmp50_, "notify::command-exit-code", (GCallback) _____lambda6__g_object_notify, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
			block2_data_unref (_data2_);
			_data2_ = NULL;
		}
		_g_object_unref0 (action_entry);
	}
	_tmp51_ = _data1_->row;
	_tmp52_ = entry;
	_tmp53_ = ft_log_entry_get_label (_tmp52_);
	_tmp54_ = _tmp53_;
	ft_sidebar_row_set_title (_tmp51_, _tmp54_);
	_g_object_unref0 (entry);
	_g_object_unref0 (list_item);
	block1_data_unref (_data1_);
	_data1_ = NULL;
}

static void
_ft_log_window_bind_list_item_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                 GObject* object,
                                                                 gpointer self)
{
	ft_log_window_bind_list_item ((FtLogWindow*) self, object);
}

void
ft_log_window_select (FtLogWindow* self,
                      gulong entry_id)
{
	GtkSingleSelection* model = NULL;
	GtkListView* _tmp0_;
	GtkSelectionModel* _tmp1_;
	GtkSelectionModel* _tmp2_;
	GtkSingleSelection* _tmp3_;
	guint n_items = 0U;
	GtkSingleSelection* _tmp4_;
	guint _tmp5_;
	guint _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listview;
	_tmp1_ = gtk_list_view_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_single_selection_get_type (), GtkSingleSelection));
	model = _tmp3_;
	_tmp4_ = model;
	g_object_get (_tmp4_, "n-items", &_tmp5_, NULL);
	_tmp6_ = _tmp5_;
	n_items = _tmp6_;
	{
		gint position = 0;
		position = 0;
		{
			gboolean _tmp7_ = FALSE;
			_tmp7_ = TRUE;
			while (TRUE) {
				FtLogEntry* entry = NULL;
				GtkSingleSelection* _tmp9_;
				GObject* _tmp10_;
				FtLogEntry* _tmp11_;
				gulong _tmp12_;
				gulong _tmp13_;
				if (!_tmp7_) {
					gint _tmp8_;
					_tmp8_ = position;
					position = _tmp8_ + 1;
				}
				_tmp7_ = FALSE;
				if (!(((guint) position) < n_items)) {
					break;
				}
				_tmp9_ = model;
				_tmp10_ = g_list_model_get_item ((GListModel*) _tmp9_, (guint) position);
				entry = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, FT_TYPE_LOG_ENTRY, FtLogEntry);
				_tmp11_ = entry;
				_tmp12_ = ft_log_entry_get_id (_tmp11_);
				_tmp13_ = _tmp12_;
				if (_tmp13_ == entry_id) {
					GtkSingleSelection* _tmp14_;
					_tmp14_ = model;
					gtk_single_selection_set_selected (_tmp14_, (guint) position);
					_g_object_unref0 (entry);
					break;
				}
				_g_object_unref0 (entry);
			}
		}
	}
	_g_object_unref0 (model);
}

static void
_ft_log_window_on_selection_changed_gtk_selection_model_selection_changed (GtkSelectionModel* _sender,
                                                                           guint position,
                                                                           guint n_items,
                                                                           gpointer self)
{
	ft_log_window_on_selection_changed ((FtLogWindow*) self, position, n_items);
}

static void
_ft_log_window_on_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                            guint position,
                                                            guint removed,
                                                            guint added,
                                                            gpointer self)
{
	ft_log_window_on_items_changed ((FtLogWindow*) self, _sender, position, removed, added);
}

static void
ft_log_window_real_dispose (GObject* base)
{
	FtLogWindow * self;
	GtkListView* _tmp0_;
	self = (FtLogWindow*) base;
	_tmp0_ = self->priv->listview;
	if (_tmp0_ != NULL) {
		GtkListView* _tmp1_;
		GtkSelectionModel* _tmp2_;
		GtkSelectionModel* _tmp3_;
		guint _tmp4_;
		GtkListView* _tmp5_;
		GtkSelectionModel* _tmp6_;
		GtkSelectionModel* _tmp7_;
		guint _tmp8_;
		_tmp1_ = self->priv->listview;
		_tmp2_ = gtk_list_view_get_model (_tmp1_);
		_tmp3_ = _tmp2_;
		g_signal_parse_name ("selection-changed", gtk_selection_model_get_type (), &_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) _ft_log_window_on_selection_changed_gtk_selection_model_selection_changed, self);
		_tmp5_ = self->priv->listview;
		_tmp6_ = gtk_list_view_get_model (_tmp5_);
		_tmp7_ = _tmp6_;
		g_signal_parse_name ("items-changed", g_list_model_get_type (), &_tmp8_, NULL, FALSE);
		g_signal_handlers_disconnect_matched ((GListModel*) _tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _ft_log_window_on_items_changed_g_list_model_items_changed, self);
	}
	_g_object_unref0 (self->priv->logger);
	self->priv->logger = NULL;
	G_OBJECT_CLASS (ft_log_window_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, adw_application_window_get_type (), AdwApplicationWindow));
}

FtLogWindow*
ft_log_window_construct (GType object_type)
{
	FtLogWindow * self = NULL;
	self = (FtLogWindow*) g_object_new (object_type, NULL);
	return self;
}

FtLogWindow*
ft_log_window_new (void)
{
	return ft_log_window_construct (FT_TYPE_LOG_WINDOW);
}

static GObject *
ft_log_window_constructor (GType type,
                           guint n_construct_properties,
                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FtLogWindow * self;
	FtLogger* _tmp0_;
	GtkSingleSelection* model = NULL;
	FtLogger* _tmp1_;
	GListModel* _tmp2_;
	GListModel* _tmp3_;
	FtSectionedLogModel* _tmp4_;
	GtkSingleSelection* _tmp5_;
	GtkSingleSelection* _tmp6_;
	GtkSingleSelection* _tmp7_;
	GtkSingleSelection* _tmp8_;
	GtkSingleSelection* _tmp9_;
	GtkListView* _tmp10_;
	GtkSingleSelection* _tmp11_;
	parent_class = G_OBJECT_CLASS (ft_log_window_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_LOG_WINDOW, FtLogWindow);
	_tmp0_ = ft_logger_new ();
	_g_object_unref0 (self->priv->logger);
	self->priv->logger = _tmp0_;
	_tmp1_ = self->priv->logger;
	_tmp2_ = ft_logger_get_model (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = ft_sectioned_log_model_new (_tmp3_);
	_tmp5_ = gtk_single_selection_new ((GListModel*) _tmp4_);
	model = _tmp5_;
	_tmp6_ = model;
	gtk_single_selection_set_autoselect (_tmp6_, TRUE);
	_tmp7_ = model;
	gtk_single_selection_set_can_unselect (_tmp7_, FALSE);
	_tmp8_ = model;
	g_signal_connect_object ((GtkSelectionModel*) _tmp8_, "selection-changed", (GCallback) _ft_log_window_on_selection_changed_gtk_selection_model_selection_changed, self, 0);
	_tmp9_ = model;
	g_signal_connect_object ((GListModel*) _tmp9_, "items-changed", (GCallback) _ft_log_window_on_items_changed_g_list_model_items_changed, self, 0);
	_tmp10_ = self->priv->listview;
	_tmp11_ = model;
	gtk_list_view_set_model (_tmp10_, (GtkSelectionModel*) _tmp11_);
	self->priv->update_contents_id = (guint) 0;
	ft_log_window_update_stack_visible_child (self);
	ft_log_window_update_contents (self);
	_g_object_unref0 (model);
	return obj;
}

static void
ft_log_window_class_init (FtLogWindowClass * klass,
                          gpointer klass_data)
{
	ft_log_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FtLogWindow_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) ft_log_window_real_dispose;
	G_OBJECT_CLASS (klass)->constructor = ft_log_window_constructor;
	G_OBJECT_CLASS (klass)->finalize = ft_log_window_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/io/github/focustimerhq/FocusTimer/ui/log/log-window.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "listview", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, listview));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "header_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, header_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "datetime_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, datetime_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "context_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, context_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "command_line_header_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, command_line_header_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "command_line_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, command_line_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "command_error_header_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, command_error_header_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "command_error_message_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, command_error_message_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "command_output_header_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, command_output_header_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "command_output_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, command_output_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "command_exit_code_box", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, command_exit_code_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "command_exit_code_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, command_exit_code_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "command_execution_time_label", FALSE, FtLogWindow_private_offset + G_STRUCT_OFFSET (FtLogWindowPrivate, command_execution_time_label));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "setup_list_item", G_CALLBACK(_ft_log_window_setup_list_item_gtk_signal_list_item_factory_setup));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "bind_list_item", G_CALLBACK(_ft_log_window_bind_list_item_gtk_signal_list_item_factory_bind));
}

static void
ft_log_window_instance_init (FtLogWindow * self,
                             gpointer klass)
{
	self->priv = ft_log_window_get_instance_private (self);
	self->priv->update_contents_id = (guint) 0;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
ft_log_window_finalize (GObject * obj)
{
	FtLogWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_LOG_WINDOW, FtLogWindow);
	_g_object_unref0 (self->priv->logger);
	_g_object_unref0 (self->priv->selected_entry);
	G_OBJECT_CLASS (ft_log_window_parent_class)->finalize (obj);
}

static GType
ft_log_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtLogWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_log_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FtLogWindow), 0, (GInstanceInitFunc) ft_log_window_instance_init, NULL };
	GType ft_log_window_type_id;
	ft_log_window_type_id = g_type_register_static (adw_application_window_get_type (), "FtLogWindow", &g_define_type_info, 0);
	FtLogWindow_private_offset = g_type_add_instance_private (ft_log_window_type_id, sizeof (FtLogWindowPrivate));
	return ft_log_window_type_id;
}

GType
ft_log_window_get_type (void)
{
	static volatile gsize ft_log_window_type_id__once = 0;
	if (g_once_init_enter (&ft_log_window_type_id__once)) {
		GType ft_log_window_type_id;
		ft_log_window_type_id = ft_log_window_get_type_once ();
		g_once_init_leave (&ft_log_window_type_id__once, ft_log_window_type_id);
	}
	return ft_log_window_type_id__once;
}

