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

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "libdino.h"
#include "xmpp-vala.h"
#include "dino_i18n.h"
#include <gtk/gtk.h>
#include <float.h>
#include <math.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 DINO_UI_QUOTE_TYPE_MODEL (dino_ui_quote_model_get_type ())
#define DINO_UI_QUOTE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_QUOTE_TYPE_MODEL, DinoUiQuoteModel))
#define DINO_UI_QUOTE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_QUOTE_TYPE_MODEL, DinoUiQuoteModelClass))
#define DINO_UI_QUOTE_IS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_QUOTE_TYPE_MODEL))
#define DINO_UI_QUOTE_IS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_QUOTE_TYPE_MODEL))
#define DINO_UI_QUOTE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_QUOTE_TYPE_MODEL, DinoUiQuoteModelClass))

typedef struct _DinoUiQuoteModel DinoUiQuoteModel;
typedef struct _DinoUiQuoteModelClass DinoUiQuoteModelClass;
typedef struct _DinoUiQuoteModelPrivate DinoUiQuoteModelPrivate;
enum  {
	DINO_UI_QUOTE_MODEL_0_PROPERTY,
	DINO_UI_QUOTE_MODEL_DISPLAY_NAME_PROPERTY,
	DINO_UI_QUOTE_MODEL_MESSAGE_PROPERTY,
	DINO_UI_QUOTE_MODEL_DISPLAY_TIME_PROPERTY,
	DINO_UI_QUOTE_MODEL_MESSAGE_TIME_PROPERTY,
	DINO_UI_QUOTE_MODEL_STREAM_INTERACTOR_PROPERTY,
	DINO_UI_QUOTE_MODEL_CONVERSATION_PROPERTY,
	DINO_UI_QUOTE_MODEL_AUTHOR_JID_PROPERTY,
	DINO_UI_QUOTE_MODEL_CAN_ABORT_PROPERTY,
	DINO_UI_QUOTE_MODEL_NUM_PROPERTIES
};
static GParamSpec* dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_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)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
enum  {
	DINO_UI_QUOTE_MODEL_ABORTED_SIGNAL,
	DINO_UI_QUOTE_MODEL_JUMP_TO_SIGNAL,
	DINO_UI_QUOTE_MODEL_NUM_SIGNALS
};
static guint dino_ui_quote_model_signals[DINO_UI_QUOTE_MODEL_NUM_SIGNALS] = {0};
typedef struct _Block39Data Block39Data;

#define DINO_UI_TYPE_AVATAR_PICTURE (dino_ui_avatar_picture_get_type ())
#define DINO_UI_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPicture))
#define DINO_UI_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))
#define DINO_UI_IS_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_IS_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_AVATAR_PICTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))

typedef struct _DinoUiAvatarPicture DinoUiAvatarPicture;
typedef struct _DinoUiAvatarPictureClass DinoUiAvatarPictureClass;

#define DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL (dino_ui_view_model_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))

typedef struct _DinoUiViewModelAvatarPictureModel DinoUiViewModelAvatarPictureModel;
typedef struct _DinoUiViewModelAvatarPictureModelClass DinoUiViewModelAvatarPictureModelClass;

#define DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL (dino_ui_view_model_compat_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))

typedef struct _DinoUiViewModelCompatAvatarPictureModel DinoUiViewModelCompatAvatarPictureModel;
typedef struct _DinoUiViewModelCompatAvatarPictureModelClass DinoUiViewModelCompatAvatarPictureModelClass;

struct _DinoUiQuoteModel {
	GObject parent_instance;
	DinoUiQuoteModelPrivate * priv;
};

struct _DinoUiQuoteModelClass {
	GObjectClass parent_class;
};

struct _DinoUiQuoteModelPrivate {
	gchar* _display_name;
	gchar* _message;
	gchar* _display_time;
	GDateTime* _message_time;
	DinoStreamInteractor* _stream_interactor;
	DinoEntitiesConversation* _conversation;
	XmppJid* _author_jid;
	gboolean _can_abort;
	guint display_time_timeout;
};

struct _Block39Data {
	int _ref_count_;
	DinoUiQuoteModel* model;
};

static gint DinoUiQuoteModel_private_offset;
static gpointer dino_ui_quote_model_parent_class = NULL;

VALA_EXTERN GType dino_ui_quote_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiQuoteModel, g_object_unref)
VALA_EXTERN DinoUiQuoteModel* dino_ui_quote_model_new_from_content_item (DinoContentItem* content_item,
                                                             DinoEntitiesConversation* conversation,
                                                             DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiQuoteModel* dino_ui_quote_model_construct_from_content_item (GType object_type,
                                                                   DinoContentItem* content_item,
                                                                   DinoEntitiesConversation* conversation,
                                                                   DinoStreamInteractor* stream_interactor);
VALA_EXTERN gchar* dino_ui_util_get_participant_display_name (DinoStreamInteractor* stream_interactor,
                                                  DinoEntitiesConversation* conversation,
                                                  XmppJid* participant,
                                                  gboolean me_is_me);
VALA_EXTERN void dino_ui_quote_model_set_display_name (DinoUiQuoteModel* self,
                                           const gchar* value);
VALA_EXTERN void dino_ui_quote_model_set_message (DinoUiQuoteModel* self,
                                      const gchar* value);
VALA_EXTERN void dino_ui_quote_model_set_message_time (DinoUiQuoteModel* self,
                                           GDateTime* value);
static void dino_ui_quote_model_update_display_time (DinoUiQuoteModel* self);
VALA_EXTERN void dino_ui_quote_model_set_stream_interactor (DinoUiQuoteModel* self,
                                                DinoStreamInteractor* value);
VALA_EXTERN void dino_ui_quote_model_set_conversation (DinoUiQuoteModel* self,
                                           DinoEntitiesConversation* value);
VALA_EXTERN void dino_ui_quote_model_set_author_jid (DinoUiQuoteModel* self,
                                         XmppJid* value);
static void dino_ui_quote_model_on_display_time_timeout (DinoUiQuoteModel* self);
VALA_EXTERN gchar* dino_ui_conversation_summary_conversation_item_skeleton_get_relative_time (GDateTime* datetime);
VALA_EXTERN GDateTime* dino_ui_quote_model_get_message_time (DinoUiQuoteModel* self);
VALA_EXTERN void dino_ui_quote_model_set_display_time (DinoUiQuoteModel* self,
                                           const gchar* value);
VALA_EXTERN gint dino_ui_conversation_summary_conversation_item_skeleton_get_next_time_change (GDateTime* datetime);
static void _dino_ui_quote_model_on_display_time_timeout_dino_weak_timeout_source_once_func (gconstpointer object);
static void dino_ui_quote_model_real_dispose (GObject* base);
VALA_EXTERN DinoUiQuoteModel* dino_ui_quote_model_new (void);
VALA_EXTERN DinoUiQuoteModel* dino_ui_quote_model_construct (GType object_type);
VALA_EXTERN const gchar* dino_ui_quote_model_get_display_name (DinoUiQuoteModel* self);
VALA_EXTERN const gchar* dino_ui_quote_model_get_message (DinoUiQuoteModel* self);
VALA_EXTERN const gchar* dino_ui_quote_model_get_display_time (DinoUiQuoteModel* self);
VALA_EXTERN DinoStreamInteractor* dino_ui_quote_model_get_stream_interactor (DinoUiQuoteModel* self);
VALA_EXTERN DinoEntitiesConversation* dino_ui_quote_model_get_conversation (DinoUiQuoteModel* self);
VALA_EXTERN XmppJid* dino_ui_quote_model_get_author_jid (DinoUiQuoteModel* self);
VALA_EXTERN gboolean dino_ui_quote_model_get_can_abort (DinoUiQuoteModel* self);
VALA_EXTERN void dino_ui_quote_model_set_can_abort (DinoUiQuoteModel* self,
                                        gboolean value);
static void dino_ui_quote_model_finalize (GObject * obj);
static GType dino_ui_quote_model_get_type_once (void);
static void _vala_dino_ui_quote_model_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_dino_ui_quote_model_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);
VALA_EXTERN GtkWidget* dino_ui_quote_get_widget (DinoUiQuoteModel* model);
static Block39Data* block39_data_ref (Block39Data* _data39_);
static void block39_data_unref (void * _userdata_);
VALA_EXTERN GType dino_ui_avatar_picture_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAvatarPicture, g_object_unref)
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_construct (GType object_type,
                                                                                                   DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_view_model_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelAvatarPictureModel, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_compat_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelCompatAvatarPictureModel, g_object_unref)
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_add_participant (DinoUiViewModelCompatAvatarPictureModel* self,
                                                                                                         DinoEntitiesConversation* conversation,
                                                                                                         XmppJid* jid);
VALA_EXTERN void dino_ui_avatar_picture_set_model (DinoUiAvatarPicture* self,
                                       DinoUiViewModelAvatarPictureModel* value);
static void __lambda33_ (Block39Data* _data39_);
static void ___lambda33__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda34_ (Block39Data* _data39_);
static void ___lambda34__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                             gint n_press,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_quote_model_get_instance_private (DinoUiQuoteModel* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiQuoteModel_private_offset);
}

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

DinoUiQuoteModel*
dino_ui_quote_model_construct_from_content_item (GType object_type,
                                                 DinoContentItem* content_item,
                                                 DinoEntitiesConversation* conversation,
                                                 DinoStreamInteractor* stream_interactor)
{
	DinoUiQuoteModel * self = NULL;
	XmppJid* _tmp0_;
	XmppJid* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GDateTime* _tmp23_;
	GDateTime* _tmp24_;
	XmppJid* _tmp25_;
	XmppJid* _tmp26_;
	g_return_val_if_fail (content_item != NULL, NULL);
	g_return_val_if_fail (conversation != NULL, NULL);
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	self = (DinoUiQuoteModel*) g_object_new (object_type, NULL);
	_tmp0_ = dino_content_item_get_jid (content_item);
	_tmp1_ = _tmp0_;
	_tmp2_ = dino_ui_util_get_participant_display_name (stream_interactor, conversation, _tmp1_, TRUE);
	_tmp3_ = _tmp2_;
	dino_ui_quote_model_set_display_name (self, _tmp3_);
	_g_free0 (_tmp3_);
	_tmp4_ = dino_content_item_get_type_ (content_item);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, DINO_MESSAGE_ITEM_TYPE) == 0) {
		DinoEntitiesMessage* message = NULL;
		DinoEntitiesMessage* _tmp6_;
		DinoEntitiesMessage* _tmp7_;
		DinoEntitiesMessage* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (content_item, DINO_TYPE_MESSAGE_ITEM, DinoMessageItem)->message;
		_tmp7_ = _g_object_ref0 (_tmp6_);
		message = _tmp7_;
		_tmp8_ = message;
		_tmp9_ = dino_message_body_without_reply_fallback (_tmp8_);
		_tmp10_ = _tmp9_;
		dino_ui_quote_model_set_message (self, _tmp10_);
		_g_free0 (_tmp10_);
		_g_object_unref0 (message);
	} else {
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp11_ = dino_content_item_get_type_ (content_item);
		_tmp12_ = _tmp11_;
		if (g_strcmp0 (_tmp12_, DINO_FILE_ITEM_TYPE) == 0) {
			DinoEntitiesFileTransfer* file_transfer = NULL;
			DinoEntitiesFileTransfer* _tmp13_;
			DinoEntitiesFileTransfer* _tmp14_;
			const gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			DinoEntitiesFileTransfer* _tmp18_;
			const gchar* _tmp19_;
			const gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			_tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (content_item, DINO_TYPE_FILE_ITEM, DinoFileItem)->file_transfer;
			_tmp14_ = _g_object_ref0 (_tmp13_);
			file_transfer = _tmp14_;
			_tmp15_ = dino_gettext ("File");
			_tmp16_ = g_strconcat (_tmp15_, ": ", NULL);
			_tmp17_ = _tmp16_;
			_tmp18_ = file_transfer;
			_tmp19_ = dino_entities_file_transfer_get_file_name (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = g_strconcat (_tmp17_, _tmp20_, NULL);
			_tmp22_ = _tmp21_;
			dino_ui_quote_model_set_message (self, _tmp22_);
			_g_free0 (_tmp22_);
			_g_free0 (_tmp17_);
			_g_object_unref0 (file_transfer);
		}
	}
	_tmp23_ = dino_content_item_get_time (content_item);
	_tmp24_ = _tmp23_;
	dino_ui_quote_model_set_message_time (self, _tmp24_);
	dino_ui_quote_model_update_display_time (self);
	dino_ui_quote_model_set_stream_interactor (self, stream_interactor);
	dino_ui_quote_model_set_conversation (self, conversation);
	_tmp25_ = dino_content_item_get_jid (content_item);
	_tmp26_ = _tmp25_;
	dino_ui_quote_model_set_author_jid (self, _tmp26_);
	return self;
}

DinoUiQuoteModel*
dino_ui_quote_model_new_from_content_item (DinoContentItem* content_item,
                                           DinoEntitiesConversation* conversation,
                                           DinoStreamInteractor* stream_interactor)
{
	return dino_ui_quote_model_construct_from_content_item (DINO_UI_QUOTE_TYPE_MODEL, content_item, conversation, stream_interactor);
}

static void
dino_ui_quote_model_on_display_time_timeout (DinoUiQuoteModel* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->display_time_timeout != ((guint) 0)) {
		dino_ui_quote_model_update_display_time (self);
	}
}

static void
_dino_ui_quote_model_on_display_time_timeout_dino_weak_timeout_source_once_func (gconstpointer object)
{
	dino_ui_quote_model_on_display_time_timeout (object);
}

static void
dino_ui_quote_model_update_display_time (DinoUiQuoteModel* self)
{
	GDateTime* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GDateTime* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_message_time;
	_tmp1_ = g_date_time_to_local (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = dino_ui_conversation_summary_conversation_item_skeleton_get_relative_time (_tmp2_);
	_tmp4_ = _tmp3_;
	dino_ui_quote_model_set_display_time (self, _tmp4_);
	_g_free0 (_tmp4_);
	_g_date_time_unref0 (_tmp2_);
	_tmp5_ = self->priv->_message_time;
	self->priv->display_time_timeout = dino_weak_timeout_add_seconds_once (DINO_UI_QUOTE_TYPE_MODEL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, (guint) ((gint) dino_ui_conversation_summary_conversation_item_skeleton_get_next_time_change (_tmp5_)), self, _dino_ui_quote_model_on_display_time_timeout_dino_weak_timeout_source_once_func, G_PRIORITY_DEFAULT);
}

static void
dino_ui_quote_model_real_dispose (GObject* base)
{
	DinoUiQuoteModel * self;
	self = (DinoUiQuoteModel*) base;
	G_OBJECT_CLASS (dino_ui_quote_model_parent_class)->dispose (G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject));
	if (self->priv->display_time_timeout != ((guint) 0)) {
		g_source_remove (self->priv->display_time_timeout);
		self->priv->display_time_timeout = (guint) 0;
	}
}

DinoUiQuoteModel*
dino_ui_quote_model_construct (GType object_type)
{
	DinoUiQuoteModel * self = NULL;
	self = (DinoUiQuoteModel*) g_object_new (object_type, NULL);
	return self;
}

DinoUiQuoteModel*
dino_ui_quote_model_new (void)
{
	return dino_ui_quote_model_construct (DINO_UI_QUOTE_TYPE_MODEL);
}

const gchar*
dino_ui_quote_model_get_display_name (DinoUiQuoteModel* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_display_name;
	result = _tmp0_;
	return result;
}

void
dino_ui_quote_model_set_display_name (DinoUiQuoteModel* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_quote_model_get_display_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_display_name);
		self->priv->_display_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_DISPLAY_NAME_PROPERTY]);
	}
}

const gchar*
dino_ui_quote_model_get_message (DinoUiQuoteModel* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_message;
	result = _tmp0_;
	return result;
}

void
dino_ui_quote_model_set_message (DinoUiQuoteModel* self,
                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_quote_model_get_message (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_message);
		self->priv->_message = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_MESSAGE_PROPERTY]);
	}
}

const gchar*
dino_ui_quote_model_get_display_time (DinoUiQuoteModel* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_display_time;
	result = _tmp0_;
	return result;
}

void
dino_ui_quote_model_set_display_time (DinoUiQuoteModel* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_quote_model_get_display_time (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_display_time);
		self->priv->_display_time = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_DISPLAY_TIME_PROPERTY]);
	}
}

GDateTime*
dino_ui_quote_model_get_message_time (DinoUiQuoteModel* self)
{
	GDateTime* result;
	GDateTime* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_message_time;
	result = _tmp0_;
	return result;
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

void
dino_ui_quote_model_set_message_time (DinoUiQuoteModel* self,
                                      GDateTime* value)
{
	GDateTime* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_quote_model_get_message_time (self);
	if (old_value != value) {
		GDateTime* _tmp0_;
		_tmp0_ = _g_date_time_ref0 (value);
		_g_date_time_unref0 (self->priv->_message_time);
		self->priv->_message_time = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_MESSAGE_TIME_PROPERTY]);
	}
}

DinoStreamInteractor*
dino_ui_quote_model_get_stream_interactor (DinoUiQuoteModel* self)
{
	DinoStreamInteractor* result;
	DinoStreamInteractor* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_stream_interactor;
	result = _tmp0_;
	return result;
}

void
dino_ui_quote_model_set_stream_interactor (DinoUiQuoteModel* self,
                                           DinoStreamInteractor* value)
{
	DinoStreamInteractor* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_quote_model_get_stream_interactor (self);
	if (old_value != value) {
		DinoStreamInteractor* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_stream_interactor);
		self->priv->_stream_interactor = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_STREAM_INTERACTOR_PROPERTY]);
	}
}

DinoEntitiesConversation*
dino_ui_quote_model_get_conversation (DinoUiQuoteModel* self)
{
	DinoEntitiesConversation* result;
	DinoEntitiesConversation* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_conversation;
	result = _tmp0_;
	return result;
}

void
dino_ui_quote_model_set_conversation (DinoUiQuoteModel* self,
                                      DinoEntitiesConversation* value)
{
	DinoEntitiesConversation* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_quote_model_get_conversation (self);
	if (old_value != value) {
		DinoEntitiesConversation* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_conversation);
		self->priv->_conversation = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_CONVERSATION_PROPERTY]);
	}
}

XmppJid*
dino_ui_quote_model_get_author_jid (DinoUiQuoteModel* self)
{
	XmppJid* result;
	XmppJid* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_author_jid;
	result = _tmp0_;
	return result;
}

static gpointer
_xmpp_jid_ref0 (gpointer self)
{
	return self ? xmpp_jid_ref (self) : NULL;
}

void
dino_ui_quote_model_set_author_jid (DinoUiQuoteModel* self,
                                    XmppJid* value)
{
	XmppJid* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_quote_model_get_author_jid (self);
	if (old_value != value) {
		XmppJid* _tmp0_;
		_tmp0_ = _xmpp_jid_ref0 (value);
		_xmpp_jid_unref0 (self->priv->_author_jid);
		self->priv->_author_jid = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_AUTHOR_JID_PROPERTY]);
	}
}

gboolean
dino_ui_quote_model_get_can_abort (DinoUiQuoteModel* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_can_abort;
	return result;
}

void
dino_ui_quote_model_set_can_abort (DinoUiQuoteModel* self,
                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_quote_model_get_can_abort (self);
	if (old_value != value) {
		self->priv->_can_abort = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_CAN_ABORT_PROPERTY]);
	}
}

static void
dino_ui_quote_model_class_init (DinoUiQuoteModelClass * klass,
                                gpointer klass_data)
{
	dino_ui_quote_model_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiQuoteModel_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) dino_ui_quote_model_real_dispose;
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_quote_model_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_quote_model_set_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_quote_model_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_QUOTE_MODEL_DISPLAY_NAME_PROPERTY, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_DISPLAY_NAME_PROPERTY] = g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_QUOTE_MODEL_MESSAGE_PROPERTY, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_MESSAGE_PROPERTY] = g_param_spec_string ("message", "message", "message", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_QUOTE_MODEL_DISPLAY_TIME_PROPERTY, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_DISPLAY_TIME_PROPERTY] = g_param_spec_string ("display-time", "display-time", "display-time", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_QUOTE_MODEL_MESSAGE_TIME_PROPERTY, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_MESSAGE_TIME_PROPERTY] = g_param_spec_boxed ("message-time", "message-time", "message-time", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_QUOTE_MODEL_STREAM_INTERACTOR_PROPERTY, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_STREAM_INTERACTOR_PROPERTY] = g_param_spec_object ("stream-interactor", "stream-interactor", "stream-interactor", DINO_TYPE_STREAM_INTERACTOR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_QUOTE_MODEL_CONVERSATION_PROPERTY, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_CONVERSATION_PROPERTY] = g_param_spec_object ("conversation", "conversation", "conversation", DINO_ENTITIES_TYPE_CONVERSATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_QUOTE_MODEL_AUTHOR_JID_PROPERTY, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_AUTHOR_JID_PROPERTY] = xmpp_param_spec_jid ("author-jid", "author-jid", "author-jid", XMPP_TYPE_JID, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_QUOTE_MODEL_CAN_ABORT_PROPERTY, dino_ui_quote_model_properties[DINO_UI_QUOTE_MODEL_CAN_ABORT_PROPERTY] = g_param_spec_boolean ("can-abort", "can-abort", "can-abort", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	dino_ui_quote_model_signals[DINO_UI_QUOTE_MODEL_ABORTED_SIGNAL] = g_signal_new ("aborted", DINO_UI_QUOTE_TYPE_MODEL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dino_ui_quote_model_signals[DINO_UI_QUOTE_MODEL_JUMP_TO_SIGNAL] = g_signal_new ("jump-to", DINO_UI_QUOTE_TYPE_MODEL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
dino_ui_quote_model_instance_init (DinoUiQuoteModel * self,
                                   gpointer klass)
{
	self->priv = dino_ui_quote_model_get_instance_private (self);
	self->priv->_can_abort = FALSE;
}

static void
dino_ui_quote_model_finalize (GObject * obj)
{
	DinoUiQuoteModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_QUOTE_TYPE_MODEL, DinoUiQuoteModel);
	_g_free0 (self->priv->_display_name);
	_g_free0 (self->priv->_message);
	_g_free0 (self->priv->_display_time);
	_g_date_time_unref0 (self->priv->_message_time);
	_g_object_unref0 (self->priv->_stream_interactor);
	_g_object_unref0 (self->priv->_conversation);
	_xmpp_jid_unref0 (self->priv->_author_jid);
	G_OBJECT_CLASS (dino_ui_quote_model_parent_class)->finalize (obj);
}

static GType
dino_ui_quote_model_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiQuoteModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_quote_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiQuoteModel), 0, (GInstanceInitFunc) dino_ui_quote_model_instance_init, NULL };
	GType dino_ui_quote_model_type_id;
	dino_ui_quote_model_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoUiQuoteModel", &g_define_type_info, 0);
	DinoUiQuoteModel_private_offset = g_type_add_instance_private (dino_ui_quote_model_type_id, sizeof (DinoUiQuoteModelPrivate));
	return dino_ui_quote_model_type_id;
}

GType
dino_ui_quote_model_get_type (void)
{
	static volatile gsize dino_ui_quote_model_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_quote_model_type_id__once)) {
		GType dino_ui_quote_model_type_id;
		dino_ui_quote_model_type_id = dino_ui_quote_model_get_type_once ();
		g_once_init_leave (&dino_ui_quote_model_type_id__once, dino_ui_quote_model_type_id);
	}
	return dino_ui_quote_model_type_id__once;
}

static void
_vala_dino_ui_quote_model_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	DinoUiQuoteModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_QUOTE_TYPE_MODEL, DinoUiQuoteModel);
	switch (property_id) {
		case DINO_UI_QUOTE_MODEL_DISPLAY_NAME_PROPERTY:
		g_value_set_string (value, dino_ui_quote_model_get_display_name (self));
		break;
		case DINO_UI_QUOTE_MODEL_MESSAGE_PROPERTY:
		g_value_set_string (value, dino_ui_quote_model_get_message (self));
		break;
		case DINO_UI_QUOTE_MODEL_DISPLAY_TIME_PROPERTY:
		g_value_set_string (value, dino_ui_quote_model_get_display_time (self));
		break;
		case DINO_UI_QUOTE_MODEL_MESSAGE_TIME_PROPERTY:
		g_value_set_boxed (value, dino_ui_quote_model_get_message_time (self));
		break;
		case DINO_UI_QUOTE_MODEL_STREAM_INTERACTOR_PROPERTY:
		g_value_set_object (value, dino_ui_quote_model_get_stream_interactor (self));
		break;
		case DINO_UI_QUOTE_MODEL_CONVERSATION_PROPERTY:
		g_value_set_object (value, dino_ui_quote_model_get_conversation (self));
		break;
		case DINO_UI_QUOTE_MODEL_AUTHOR_JID_PROPERTY:
		xmpp_value_set_jid (value, dino_ui_quote_model_get_author_jid (self));
		break;
		case DINO_UI_QUOTE_MODEL_CAN_ABORT_PROPERTY:
		g_value_set_boolean (value, dino_ui_quote_model_get_can_abort (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_quote_model_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	DinoUiQuoteModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_QUOTE_TYPE_MODEL, DinoUiQuoteModel);
	switch (property_id) {
		case DINO_UI_QUOTE_MODEL_DISPLAY_NAME_PROPERTY:
		dino_ui_quote_model_set_display_name (self, g_value_get_string (value));
		break;
		case DINO_UI_QUOTE_MODEL_MESSAGE_PROPERTY:
		dino_ui_quote_model_set_message (self, g_value_get_string (value));
		break;
		case DINO_UI_QUOTE_MODEL_DISPLAY_TIME_PROPERTY:
		dino_ui_quote_model_set_display_time (self, g_value_get_string (value));
		break;
		case DINO_UI_QUOTE_MODEL_MESSAGE_TIME_PROPERTY:
		dino_ui_quote_model_set_message_time (self, g_value_get_boxed (value));
		break;
		case DINO_UI_QUOTE_MODEL_STREAM_INTERACTOR_PROPERTY:
		dino_ui_quote_model_set_stream_interactor (self, g_value_get_object (value));
		break;
		case DINO_UI_QUOTE_MODEL_CONVERSATION_PROPERTY:
		dino_ui_quote_model_set_conversation (self, g_value_get_object (value));
		break;
		case DINO_UI_QUOTE_MODEL_AUTHOR_JID_PROPERTY:
		dino_ui_quote_model_set_author_jid (self, xmpp_value_get_jid (value));
		break;
		case DINO_UI_QUOTE_MODEL_CAN_ABORT_PROPERTY:
		dino_ui_quote_model_set_can_abort (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static Block39Data*
block39_data_ref (Block39Data* _data39_)
{
	g_atomic_int_inc (&_data39_->_ref_count_);
	return _data39_;
}

static void
block39_data_unref (void * _userdata_)
{
	Block39Data* _data39_;
	_data39_ = (Block39Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data39_->_ref_count_)) {
		_g_object_unref0 (_data39_->model);
		g_slice_free (Block39Data, _data39_);
	}
}

static void
__lambda33_ (Block39Data* _data39_)
{
	g_signal_emit (_data39_->model, dino_ui_quote_model_signals[DINO_UI_QUOTE_MODEL_ABORTED_SIGNAL], 0);
}

static void
___lambda33__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda33_ (self);
}

static void
__lambda34_ (Block39Data* _data39_)
{
	g_signal_emit (_data39_->model, dino_ui_quote_model_signals[DINO_UI_QUOTE_MODEL_JUMP_TO_SIGNAL], 0);
}

static void
___lambda34__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                        gint n_press,
                                        gdouble x,
                                        gdouble y,
                                        gpointer self)
{
	__lambda34_ (self);
}

GtkWidget*
dino_ui_quote_get_widget (DinoUiQuoteModel* model)
{
	Block39Data* _data39_;
	DinoUiQuoteModel* _tmp0_;
	GtkBuilder* builder = NULL;
	GtkBuilder* _tmp1_;
	DinoUiAvatarPicture* avatar = NULL;
	GObject* _tmp2_;
	DinoUiAvatarPicture* _tmp3_;
	GtkLabel* author = NULL;
	GObject* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* time = NULL;
	GObject* _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* message = NULL;
	GObject* _tmp8_;
	GtkLabel* _tmp9_;
	GtkButton* abort_button = NULL;
	GObject* _tmp10_;
	GtkButton* _tmp11_;
	DinoStreamInteractor* _tmp12_;
	DinoStreamInteractor* _tmp13_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp14_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp15_;
	DinoEntitiesConversation* _tmp16_;
	DinoEntitiesConversation* _tmp17_;
	XmppJid* _tmp18_;
	XmppJid* _tmp19_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp20_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp21_;
	GtkWidget* outer = NULL;
	GObject* _tmp22_;
	GtkWidget* _tmp23_;
	GtkGestureClick* gesture_click_controller = NULL;
	GtkGestureClick* _tmp24_;
	GtkEventController* _tmp25_;
	GtkWidget* result;
	g_return_val_if_fail (model != NULL, NULL);
	_data39_ = g_slice_new0 (Block39Data);
	_data39_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (model);
	_g_object_unref0 (_data39_->model);
	_data39_->model = _tmp0_;
	_tmp1_ = gtk_builder_new_from_resource ("/im/dino/Dino/quote.ui");
	builder = _tmp1_;
	_tmp2_ = gtk_builder_get_object (builder, "avatar");
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPicture));
	avatar = _tmp3_;
	_tmp4_ = gtk_builder_get_object (builder, "author");
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_label_get_type (), GtkLabel));
	author = _tmp5_;
	_tmp6_ = gtk_builder_get_object (builder, "time");
	_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_label_get_type (), GtkLabel));
	time = _tmp7_;
	_tmp8_ = gtk_builder_get_object (builder, "message");
	_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_label_get_type (), GtkLabel));
	message = _tmp9_;
	_tmp10_ = gtk_builder_get_object (builder, "abort-button");
	_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_button_get_type (), GtkButton));
	abort_button = _tmp11_;
	_tmp12_ = dino_ui_quote_model_get_stream_interactor (_data39_->model);
	_tmp13_ = _tmp12_;
	_tmp14_ = dino_ui_view_model_compat_avatar_picture_model_new (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = dino_ui_quote_model_get_conversation (_data39_->model);
	_tmp17_ = _tmp16_;
	_tmp18_ = dino_ui_quote_model_get_author_jid (_data39_->model);
	_tmp19_ = _tmp18_;
	_tmp20_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp15_, _tmp17_, _tmp19_);
	_tmp21_ = _tmp20_;
	dino_ui_avatar_picture_set_model (avatar, (DinoUiViewModelAvatarPictureModel*) _tmp21_);
	_g_object_unref0 (_tmp21_);
	_g_object_unref0 (_tmp15_);
	g_object_bind_property_with_closures ((GObject*) _data39_->model, "display-name", (GObject*) author, "label", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	g_object_bind_property_with_closures ((GObject*) _data39_->model, "display-time", (GObject*) time, "label", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	g_object_bind_property_with_closures ((GObject*) _data39_->model, "message", (GObject*) message, "label", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	g_object_bind_property_with_closures ((GObject*) _data39_->model, "can-abort", (GObject*) abort_button, "visible", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	g_signal_connect_data (abort_button, "clicked", (GCallback) ___lambda33__gtk_button_clicked, block39_data_ref (_data39_), (GClosureNotify) block39_data_unref, 0);
	_tmp22_ = gtk_builder_get_object (builder, "outer");
	_tmp23_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp22_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp22_) : NULL);
	outer = _tmp23_;
	_tmp24_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gesture_click_controller = _tmp24_;
	_tmp25_ = _g_object_ref0 ((GtkEventController*) gesture_click_controller);
	gtk_widget_add_controller (outer, _tmp25_);
	g_signal_connect_data (gesture_click_controller, "pressed", (GCallback) ___lambda34__gtk_gesture_click_pressed, block39_data_ref (_data39_), (GClosureNotify) block39_data_unref, 0);
	result = outer;
	_g_object_unref0 (gesture_click_controller);
	_g_object_unref0 (abort_button);
	_g_object_unref0 (message);
	_g_object_unref0 (time);
	_g_object_unref0 (author);
	_g_object_unref0 (avatar);
	_g_object_unref0 (builder);
	block39_data_unref (_data39_);
	_data39_ = NULL;
	return result;
}

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

