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

#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <adwaita.h>
#include "libdino.h"
#include <gio/gio.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include "xmpp-vala.h"
#include <gee.h>
#include "dino_i18n.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_TYPE_CONVERSATION_VIEW_CONTROLLER (dino_ui_conversation_view_controller_get_type ())
#define DINO_UI_CONVERSATION_VIEW_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_VIEW_CONTROLLER, DinoUiConversationViewController))
#define DINO_UI_CONVERSATION_VIEW_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_VIEW_CONTROLLER, DinoUiConversationViewControllerClass))
#define DINO_UI_IS_CONVERSATION_VIEW_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_VIEW_CONTROLLER))
#define DINO_UI_IS_CONVERSATION_VIEW_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_VIEW_CONTROLLER))
#define DINO_UI_CONVERSATION_VIEW_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_VIEW_CONTROLLER, DinoUiConversationViewControllerClass))

typedef struct _DinoUiConversationViewController DinoUiConversationViewController;
typedef struct _DinoUiConversationViewControllerClass DinoUiConversationViewControllerClass;
typedef struct _DinoUiConversationViewControllerPrivate DinoUiConversationViewControllerPrivate;

#define DINO_UI_TYPE_SEARCH_MENU_ENTRY (dino_ui_search_menu_entry_get_type ())
#define DINO_UI_SEARCH_MENU_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_SEARCH_MENU_ENTRY, DinoUiSearchMenuEntry))
#define DINO_UI_SEARCH_MENU_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_SEARCH_MENU_ENTRY, DinoUiSearchMenuEntryClass))
#define DINO_UI_IS_SEARCH_MENU_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_SEARCH_MENU_ENTRY))
#define DINO_UI_IS_SEARCH_MENU_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_SEARCH_MENU_ENTRY))
#define DINO_UI_SEARCH_MENU_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_SEARCH_MENU_ENTRY, DinoUiSearchMenuEntryClass))

typedef struct _DinoUiSearchMenuEntry DinoUiSearchMenuEntry;
typedef struct _DinoUiSearchMenuEntryClass DinoUiSearchMenuEntryClass;

#define DINO_UI_TYPE_APPLICATION (dino_ui_application_get_type ())
#define DINO_UI_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_APPLICATION, DinoUiApplication))
#define DINO_UI_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_APPLICATION, DinoUiApplicationClass))
#define DINO_UI_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_APPLICATION))
#define DINO_UI_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_APPLICATION))
#define DINO_UI_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_APPLICATION, DinoUiApplicationClass))

typedef struct _DinoUiApplication DinoUiApplication;
typedef struct _DinoUiApplicationClass DinoUiApplicationClass;

#define DINO_UI_TYPE_CONVERSATION_VIEW (dino_ui_conversation_view_get_type ())
#define DINO_UI_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationView))
#define DINO_UI_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationViewClass))
#define DINO_UI_IS_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_VIEW))
#define DINO_UI_IS_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_VIEW))
#define DINO_UI_CONVERSATION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationViewClass))

typedef struct _DinoUiConversationView DinoUiConversationView;
typedef struct _DinoUiConversationViewClass DinoUiConversationViewClass;

#define DINO_UI_TYPE_CONVERSATION_TITLEBAR (dino_ui_conversation_titlebar_get_type ())
#define DINO_UI_CONVERSATION_TITLEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_TITLEBAR, DinoUiConversationTitlebar))
#define DINO_UI_CONVERSATION_TITLEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_TITLEBAR, DinoUiConversationTitlebarClass))
#define DINO_UI_IS_CONVERSATION_TITLEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_TITLEBAR))
#define DINO_UI_IS_CONVERSATION_TITLEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_TITLEBAR))
#define DINO_UI_CONVERSATION_TITLEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_TITLEBAR, DinoUiConversationTitlebarClass))

typedef struct _DinoUiConversationTitlebar DinoUiConversationTitlebar;
typedef struct _DinoUiConversationTitlebarClass DinoUiConversationTitlebarClass;

#define DINO_UI_TYPE_CHAT_INPUT_CONTROLLER (dino_ui_chat_input_controller_get_type ())
#define DINO_UI_CHAT_INPUT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CHAT_INPUT_CONTROLLER, DinoUiChatInputController))
#define DINO_UI_CHAT_INPUT_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CHAT_INPUT_CONTROLLER, DinoUiChatInputControllerClass))
#define DINO_UI_IS_CHAT_INPUT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CHAT_INPUT_CONTROLLER))
#define DINO_UI_IS_CHAT_INPUT_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CHAT_INPUT_CONTROLLER))
#define DINO_UI_CHAT_INPUT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CHAT_INPUT_CONTROLLER, DinoUiChatInputControllerClass))

typedef struct _DinoUiChatInputController DinoUiChatInputController;
typedef struct _DinoUiChatInputControllerClass DinoUiChatInputControllerClass;
enum  {
	DINO_UI_CONVERSATION_VIEW_CONTROLLER_0_PROPERTY,
	DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_DISPLAY_NAME_PROPERTY,
	DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_TOPIC_PROPERTY,
	DINO_UI_CONVERSATION_VIEW_CONTROLLER_NUM_PROPERTIES
};
static GParamSpec* dino_ui_conversation_view_controller_properties[DINO_UI_CONVERSATION_VIEW_CONTROLLER_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block56Data Block56Data;
typedef struct _DinoUiConversationViewPrivate DinoUiConversationViewPrivate;

#define DINO_UI_CHAT_INPUT_TYPE_VIEW (dino_ui_chat_input_view_get_type ())
#define DINO_UI_CHAT_INPUT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CHAT_INPUT_TYPE_VIEW, DinoUiChatInputView))
#define DINO_UI_CHAT_INPUT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CHAT_INPUT_TYPE_VIEW, DinoUiChatInputViewClass))
#define DINO_UI_CHAT_INPUT_IS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CHAT_INPUT_TYPE_VIEW))
#define DINO_UI_CHAT_INPUT_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CHAT_INPUT_TYPE_VIEW))
#define DINO_UI_CHAT_INPUT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CHAT_INPUT_TYPE_VIEW, DinoUiChatInputViewClass))

typedef struct _DinoUiChatInputView DinoUiChatInputView;
typedef struct _DinoUiChatInputViewClass DinoUiChatInputViewClass;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW (dino_ui_conversation_summary_conversation_view_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationView))
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationViewClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW))
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationViewClass))

typedef struct _DinoUiConversationSummaryConversationView DinoUiConversationSummaryConversationView;
typedef struct _DinoUiConversationSummaryConversationViewClass DinoUiConversationSummaryConversationViewClass;
typedef struct _DinoUiConversationSummaryConversationViewPrivate DinoUiConversationSummaryConversationViewPrivate;
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))

#define DINO_UI_TYPE_MENU_ENTRY (dino_ui_menu_entry_get_type ())
#define DINO_UI_MENU_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_MENU_ENTRY, DinoUiMenuEntry))
#define DINO_UI_MENU_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_MENU_ENTRY, DinoUiMenuEntryClass))
#define DINO_UI_IS_MENU_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_MENU_ENTRY))
#define DINO_UI_IS_MENU_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_MENU_ENTRY))
#define DINO_UI_MENU_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_MENU_ENTRY, DinoUiMenuEntryClass))

typedef struct _DinoUiMenuEntry DinoUiMenuEntry;
typedef struct _DinoUiMenuEntryClass DinoUiMenuEntryClass;

#define DINO_UI_TYPE_OCCUPANTS_ENTRY (dino_ui_occupants_entry_get_type ())
#define DINO_UI_OCCUPANTS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_OCCUPANTS_ENTRY, DinoUiOccupantsEntry))
#define DINO_UI_OCCUPANTS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_OCCUPANTS_ENTRY, DinoUiOccupantsEntryClass))
#define DINO_UI_IS_OCCUPANTS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_OCCUPANTS_ENTRY))
#define DINO_UI_IS_OCCUPANTS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_OCCUPANTS_ENTRY))
#define DINO_UI_OCCUPANTS_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_OCCUPANTS_ENTRY, DinoUiOccupantsEntryClass))

typedef struct _DinoUiOccupantsEntry DinoUiOccupantsEntry;
typedef struct _DinoUiOccupantsEntryClass DinoUiOccupantsEntryClass;

#define DINO_UI_TYPE_CALL_TITLEBAR_ENTRY (dino_ui_call_titlebar_entry_get_type ())
#define DINO_UI_CALL_TITLEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CALL_TITLEBAR_ENTRY, DinoUiCallTitlebarEntry))
#define DINO_UI_CALL_TITLEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CALL_TITLEBAR_ENTRY, DinoUiCallTitlebarEntryClass))
#define DINO_UI_IS_CALL_TITLEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CALL_TITLEBAR_ENTRY))
#define DINO_UI_IS_CALL_TITLEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CALL_TITLEBAR_ENTRY))
#define DINO_UI_CALL_TITLEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CALL_TITLEBAR_ENTRY, DinoUiCallTitlebarEntryClass))

typedef struct _DinoUiCallTitlebarEntry DinoUiCallTitlebarEntry;
typedef struct _DinoUiCallTitlebarEntryClass DinoUiCallTitlebarEntryClass;
typedef struct _DinoUiConversationViewControllerUpdateFileUploadStatusData DinoUiConversationViewControllerUpdateFileUploadStatusData;
typedef struct _DinoUiConversationViewControllerOnClipboardPasteData DinoUiConversationViewControllerOnClipboardPasteData;
typedef struct _Block57Data Block57Data;

#define DINO_UI_TYPE_FILE_SEND_OVERLAY (dino_ui_file_send_overlay_get_type ())
#define DINO_UI_FILE_SEND_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_FILE_SEND_OVERLAY, DinoUiFileSendOverlay))
#define DINO_UI_FILE_SEND_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_FILE_SEND_OVERLAY, DinoUiFileSendOverlayClass))
#define DINO_UI_IS_FILE_SEND_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_FILE_SEND_OVERLAY))
#define DINO_UI_IS_FILE_SEND_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_FILE_SEND_OVERLAY))
#define DINO_UI_FILE_SEND_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_FILE_SEND_OVERLAY, DinoUiFileSendOverlayClass))

typedef struct _DinoUiFileSendOverlay DinoUiFileSendOverlay;
typedef struct _DinoUiFileSendOverlayClass DinoUiFileSendOverlayClass;
typedef struct _Block58Data Block58Data;
typedef struct _DinoUiChatInputViewPrivate DinoUiChatInputViewPrivate;

#define DINO_UI_TYPE_CHAT_TEXT_VIEW (dino_ui_chat_text_view_get_type ())
#define DINO_UI_CHAT_TEXT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CHAT_TEXT_VIEW, DinoUiChatTextView))
#define DINO_UI_CHAT_TEXT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CHAT_TEXT_VIEW, DinoUiChatTextViewClass))
#define DINO_UI_IS_CHAT_TEXT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CHAT_TEXT_VIEW))
#define DINO_UI_IS_CHAT_TEXT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CHAT_TEXT_VIEW))
#define DINO_UI_CHAT_TEXT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CHAT_TEXT_VIEW, DinoUiChatTextViewClass))

typedef struct _DinoUiChatTextView DinoUiChatTextView;
typedef struct _DinoUiChatTextViewClass DinoUiChatTextViewClass;

#define DINO_UI_TYPE_ENCRYPTION_BUTTON (dino_ui_encryption_button_get_type ())
#define DINO_UI_ENCRYPTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_ENCRYPTION_BUTTON, DinoUiEncryptionButton))
#define DINO_UI_ENCRYPTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_ENCRYPTION_BUTTON, DinoUiEncryptionButtonClass))
#define DINO_UI_IS_ENCRYPTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_ENCRYPTION_BUTTON))
#define DINO_UI_IS_ENCRYPTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_ENCRYPTION_BUTTON))
#define DINO_UI_ENCRYPTION_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_ENCRYPTION_BUTTON, DinoUiEncryptionButtonClass))

typedef struct _DinoUiEncryptionButton DinoUiEncryptionButton;
typedef struct _DinoUiEncryptionButtonClass DinoUiEncryptionButtonClass;
typedef struct _DinoUiChatTextViewPrivate DinoUiChatTextViewPrivate;

struct _DinoUiConversationViewController {
	GObject parent_instance;
	DinoUiConversationViewControllerPrivate * priv;
	DinoUiSearchMenuEntry* search_menu_entry;
	GtkListView* list_view;
};

struct _DinoUiConversationViewControllerClass {
	GObjectClass parent_class;
};

struct _DinoUiConversationViewControllerPrivate {
	gchar* _conversation_display_name;
	gchar* _conversation_topic;
	DinoUiApplication* app;
	DinoUiConversationView* view;
	GtkWidget* overlay_dialog;
	DinoUiConversationTitlebar* titlebar;
	GtkDropTarget* drop_event_controller;
	DinoUiChatInputController* chat_input_controller;
	DinoStreamInteractor* stream_interactor;
	DinoEntitiesConversation* conversation;
};

struct _Block56Data {
	int _ref_count_;
	DinoUiConversationViewController* self;
	GtkAdjustment* vadjustment;
	DinoUiConversationView* view;
	DinoStreamInteractor* stream_interactor;
};

struct _DinoUiConversationView {
	GtkWidget parent_instance;
	DinoUiConversationViewPrivate * priv;
	GtkOverlay* overlay;
	GtkRevealer* goto_end_revealer;
	GtkButton* goto_end_button;
	DinoUiChatInputView* chat_input;
	DinoUiConversationSummaryConversationView* conversation_frame;
	GtkRevealer* white_revealer;
	GtkRevealer* content_revealer;
	GtkListView* list_view;
	gboolean at_current_content;
};

struct _DinoUiConversationViewClass {
	GtkWidgetClass parent_class;
};

struct _DinoUiConversationSummaryConversationView {
	GtkWidget parent_instance;
	DinoUiConversationSummaryConversationViewPrivate * priv;
	GtkScrolledWindow* scrolled;
};

struct _DinoUiConversationSummaryConversationViewClass {
	GtkWidgetClass parent_class;
};

struct _DinoUiConversationViewControllerUpdateFileUploadStatusData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DinoUiConversationViewController* self;
	DinoEntitiesConversation* _tmp0_;
	gboolean upload_available;
	DinoStreamInteractor* _tmp1_;
	DinoModuleIdentity* _tmp2_;
	gpointer _tmp3_;
	DinoFileManager* _tmp4_;
	DinoEntitiesConversation* _tmp5_;
	gboolean _tmp6_;
	DinoUiChatInputController* _tmp7_;
	gboolean _tmp8_;
	GtkWidget* _tmp9_;
	GtkDropTarget* _tmp10_;
	GtkWidget* _tmp11_;
	GtkWidget* _tmp12_;
	DinoUiConversationView* _tmp13_;
	GtkDropTarget* _tmp14_;
	GtkEventController* _tmp15_;
	GtkDropTarget* _tmp16_;
	GtkWidget* _tmp17_;
	GtkWidget* _tmp18_;
	DinoUiConversationView* _tmp19_;
	GtkDropTarget* _tmp20_;
};

struct _DinoUiConversationViewControllerOnClipboardPasteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DinoUiConversationViewController* self;
	GdkClipboard* clipboard;
	DinoUiConversationView* _tmp0_;
	GdkClipboard* _tmp1_;
	GdkClipboard* _tmp2_;
	GdkTexture* texture;
	GdkTexture* _tmp3_;
	gchar* file_name;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	GFile* _tmp14_;
	GFile* _tmp15_;
	GError* _inner_error0_;
};

struct _Block57Data {
	int _ref_count_;
	DinoUiConversationViewController* self;
	GtkFileChooserNative* chooser;
};

struct _Block58Data {
	int _ref_count_;
	DinoUiConversationViewController* self;
	GFileInfo* file_info;
	DinoUiFileSendOverlay* overlay;
	GFile* file;
};

struct _DinoUiChatInputView {
	GtkBox parent_instance;
	DinoUiChatInputViewPrivate * priv;
	GtkFrame* frame;
	GtkBox* quote_box;
	DinoUiChatTextView* chat_text_view;
	GtkButton* file_button;
	GtkMenuButton* emoji_button;
	GtkMenuButton* encryption_button;
	GtkSeparator* file_separator;
	GtkLabel* chat_input_status;
	DinoUiEncryptionButton* encryption_widget;
};

struct _DinoUiChatInputViewClass {
	GtkBoxClass parent_class;
};

struct _DinoUiChatTextView {
	GtkBox parent_instance;
	DinoUiChatTextViewPrivate * priv;
	GtkScrolledWindow* scrolled_window;
	GtkTextView* text_view;
};

struct _DinoUiChatTextViewClass {
	GtkBoxClass parent_class;
};

static gint DinoUiConversationViewController_private_offset;
static gpointer dino_ui_conversation_view_controller_parent_class = NULL;

VALA_EXTERN GType dino_ui_conversation_view_controller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationViewController, g_object_unref)
VALA_EXTERN GType dino_ui_search_menu_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiSearchMenuEntry, g_object_unref)
VALA_EXTERN GType dino_ui_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiApplication, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationView, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_titlebar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationTitlebar, g_object_unref)
VALA_EXTERN GType dino_ui_chat_input_controller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiChatInputController, g_object_unref)
VALA_EXTERN DinoUiSearchMenuEntry* dino_ui_search_menu_entry_new (void);
VALA_EXTERN DinoUiSearchMenuEntry* dino_ui_search_menu_entry_construct (GType object_type);
VALA_EXTERN DinoUiConversationViewController* dino_ui_conversation_view_controller_new (DinoUiConversationView* view,
                                                                            DinoUiConversationTitlebar* titlebar,
                                                                            DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConversationViewController* dino_ui_conversation_view_controller_construct (GType object_type,
                                                                                  DinoUiConversationView* view,
                                                                                  DinoUiConversationTitlebar* titlebar,
                                                                                  DinoStreamInteractor* stream_interactor);
static Block56Data* block56_data_ref (Block56Data* _data56_);
static void block56_data_unref (void * _userdata_);
VALA_EXTERN GType dino_ui_chat_input_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiChatInputView, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_summary_conversation_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryConversationView, g_object_unref)
VALA_EXTERN DinoUiChatInputController* dino_ui_chat_input_controller_new (DinoUiChatInputView* chat_input,
                                                              DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiChatInputController* dino_ui_chat_input_controller_construct (GType object_type,
                                                                    DinoUiChatInputView* chat_input,
                                                                    DinoStreamInteractor* stream_interactor);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_activate_last_message_correction (DinoUiConversationSummaryConversationView* self);
static void _dino_ui_conversation_summary_conversation_view_activate_last_message_correction_dino_ui_chat_input_controller_activate_last_message_correction (DinoUiChatInputController* _sender,
                                                                                                                                                      gpointer self);
static void dino_ui_conversation_view_controller_open_file_picker (DinoUiConversationViewController* self);
static void _dino_ui_conversation_view_controller_open_file_picker_dino_ui_chat_input_controller_file_picker_selected (DinoUiChatInputController* _sender,
                                                                                                                gpointer self);
static void dino_ui_conversation_view_controller_on_clipboard_paste (DinoUiConversationViewController* self,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_);
static void dino_ui_conversation_view_controller_on_clipboard_paste_finish (DinoUiConversationViewController* self,
                                                                     GAsyncResult* _res_);
static void _dino_ui_conversation_view_controller_on_clipboard_paste_dino_ui_chat_input_controller_clipboard_pasted (DinoUiChatInputController* _sender,
                                                                                                              gpointer self);
VALA_EXTERN DinoUiConversationSummaryConversationView* dino_ui_conversation_summary_conversation_view_init (DinoUiConversationSummaryConversationView* self,
                                                                                                DinoStreamInteractor* stream_interactor);
static gboolean dino_ui_conversation_view_controller_on_drag_data_received (DinoUiConversationViewController* self,
                                                                     GtkDropTarget* target,
                                                                     GValue* val,
                                                                     gdouble x,
                                                                     gdouble y);
static gboolean _dino_ui_conversation_view_controller_on_drag_data_received_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                                                           GValue* value,
                                                                                           gdouble x,
                                                                                           gdouble y,
                                                                                           gpointer self);
static gboolean dino_ui_conversation_view_controller_forward_key_press_to_chat_input (DinoUiConversationViewController* self,
                                                                               GtkEventControllerKey* key_controller,
                                                                               guint keyval,
                                                                               guint keycode,
                                                                               GdkModifierType state);
static gboolean _dino_ui_conversation_view_controller_forward_key_press_to_chat_input_gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                                                     guint keyval,
                                                                                                                     guint keycode,
                                                                                                                     GdkModifierType state,
                                                                                                                     gpointer self);
VALA_EXTERN GtkWidget* dino_ui_conversation_titlebar_get_widget (DinoUiConversationTitlebar* self);
static void __lambda208_ (Block56Data* _data56_);
static void ___lambda208__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda209_ (Block56Data* _data56_);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_initialize_for_conversation (DinoUiConversationSummaryConversationView* self,
                                                                                 DinoEntitiesConversation* conversation);
static void ___lambda209__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda210_ (DinoUiConversationViewController* self,
                   DinoEntitiesAccount* account,
                   XmppJid* jid);
static void dino_ui_conversation_view_controller_update_conversation_display_name (DinoUiConversationViewController* self);
static void ___lambda210__dino_muc_manager_room_info_updated (DinoMucManager* _sender,
                                                       DinoEntitiesAccount* account,
                                                       XmppJid* muc_jid,
                                                       gpointer self);
static void __lambda211_ (DinoUiConversationViewController* self,
                   DinoEntitiesAccount* account,
                   XmppJid* room,
                   XmppJid* occupant);
static void ___lambda211__dino_muc_manager_private_room_occupant_updated (DinoMucManager* _sender,
                                                                   DinoEntitiesAccount* account,
                                                                   XmppJid* room,
                                                                   XmppJid* occupant,
                                                                   gpointer self);
static void __lambda212_ (DinoUiConversationViewController* self,
                   DinoEntitiesAccount* account,
                   XmppJid* jid,
                   const gchar* subject);
static void dino_ui_conversation_view_controller_update_conversation_topic (DinoUiConversationViewController* self,
                                                                     const gchar* subtitle);
static void ___lambda212__dino_muc_manager_subject_set (DinoMucManager* _sender,
                                                 DinoEntitiesAccount* account,
                                                 XmppJid* jid,
                                                 const gchar* subject,
                                                 gpointer self);
static void __lambda213_ (DinoUiConversationViewController* self,
                   DinoEntitiesAccount* account,
                   XmppJid* jid,
                   XmppRosterItem* roster_item);
static void ___lambda213__dino_roster_manager_updated_roster_item (DinoRosterManager* _sender,
                                                            DinoEntitiesAccount* account,
                                                            XmppJid* jid,
                                                            XmppRosterItem* roster_item,
                                                            gpointer self);
static void dino_ui_conversation_view_controller_update_file_upload_status (DinoUiConversationViewController* self,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_);
static void dino_ui_conversation_view_controller_update_file_upload_status_finish (DinoUiConversationViewController* self,
                                                                            GAsyncResult* _res_);
static void _dino_ui_conversation_view_controller_update_file_upload_status_dino_file_manager_upload_available (DinoFileManager* _sender,
                                                                                                         DinoEntitiesAccount* account,
                                                                                                         gpointer self);
VALA_EXTERN DinoUiMenuEntry* dino_ui_menu_entry_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiMenuEntry* dino_ui_menu_entry_construct (GType object_type,
                                               DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_menu_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiMenuEntry, g_object_unref)
VALA_EXTERN DinoUiOccupantsEntry* dino_ui_occupants_entry_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiOccupantsEntry* dino_ui_occupants_entry_construct (GType object_type,
                                                         DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_occupants_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiOccupantsEntry, g_object_unref)
VALA_EXTERN DinoUiCallTitlebarEntry* dino_ui_call_titlebar_entry_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiCallTitlebarEntry* dino_ui_call_titlebar_entry_construct (GType object_type,
                                                                DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_call_titlebar_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiCallTitlebarEntry, g_object_unref)
VALA_EXTERN void dino_ui_conversation_titlebar_insert_button (DinoUiConversationTitlebar* self,
                                                  GtkWidget* button);
static gboolean __lambda227_ (Block56Data* _data56_);
static void __lambda228_ (Block56Data* _data56_,
                   GObject* _,
                   GAsyncResult* res);
static void ___lambda228__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static gboolean ___lambda227__gtk_shortcut_func (GtkWidget* widget,
                                          GVariant* args,
                                          gpointer self);
static void __lambda229_ (Block56Data* _data56_);
static void ___lambda229__g_simple_action_activate (GSimpleAction* _sender,
                                             GVariant* parameter,
                                             gpointer self);
VALA_EXTERN void dino_ui_conversation_view_controller_select_conversation (DinoUiConversationViewController* self,
                                                               DinoEntitiesConversation* conversation,
                                                               gboolean default_initialize_conversation);
static void _dino_ui_conversation_view_controller_update_file_upload_status_g_object_notify (GObject* _sender,
                                                                                      GParamSpec* pspec,
                                                                                      gpointer self);
VALA_EXTERN void dino_ui_chat_input_controller_set_conversation (DinoUiChatInputController* self,
                                                     DinoEntitiesConversation* conversation);
VALA_EXTERN void dino_ui_conversation_view_controller_unset_conversation (DinoUiConversationViewController* self);
VALA_EXTERN void dino_ui_conversation_view_controller_set_conversation_display_name (DinoUiConversationViewController* self,
                                                                         const gchar* value);
VALA_EXTERN void dino_ui_conversation_view_controller_set_conversation_topic (DinoUiConversationViewController* self,
                                                                  const gchar* value);
static void dino_ui_conversation_view_controller_update_file_upload_status_data_free (gpointer _data);
static gboolean dino_ui_conversation_view_controller_update_file_upload_status_co (DinoUiConversationViewControllerUpdateFileUploadStatusData* _data_);
static void dino_ui_conversation_view_controller_update_file_upload_status_ready (GObject* source_object,
                                                                           GAsyncResult* _res_,
                                                                           gpointer _user_data_);
VALA_EXTERN void dino_ui_chat_input_controller_set_file_upload_active (DinoUiChatInputController* self,
                                                           gboolean active);
VALA_EXTERN gchar* dino_ui_util_get_conversation_display_name (DinoStreamInteractor* stream_interactor,
                                                   DinoEntitiesConversation* conversation);
VALA_EXTERN gchar* dino_ui_util_summarize_whitespaces_to_space (const gchar* s);
VALA_EXTERN gchar* dino_ui_util_parse_add_markup (const gchar* s_,
                                      const gchar* highlight_word,
                                      gboolean parse_links,
                                      gboolean parse_text_markup);
static void dino_ui_conversation_view_controller_on_clipboard_paste_data_free (gpointer _data);
static gboolean dino_ui_conversation_view_controller_on_clipboard_paste_co (DinoUiConversationViewControllerOnClipboardPasteData* _data_);
static void dino_ui_conversation_view_controller_on_clipboard_paste_ready (GObject* source_object,
                                                                    GAsyncResult* _res_,
                                                                    gpointer _user_data_);
static void dino_ui_conversation_view_controller_open_send_file_overlay (DinoUiConversationViewController* self,
                                                                  GFile* file);
static Block57Data* block57_data_ref (Block57Data* _data57_);
static void block57_data_unref (void * _userdata_);
static void __lambda200_ (Block57Data* _data57_,
                   gint response);
static void ___lambda200__gtk_native_dialog_response (GtkNativeDialog* _sender,
                                               gint response_id,
                                               gpointer self);
VALA_EXTERN GType dino_ui_file_send_overlay_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiFileSendOverlay, g_object_unref)
static Block58Data* block58_data_ref (Block58Data* _data58_);
static void block58_data_unref (void * _userdata_);
VALA_EXTERN DinoUiFileSendOverlay* dino_ui_file_send_overlay_new (GFile* file,
                                                      GFileInfo* file_info);
VALA_EXTERN DinoUiFileSendOverlay* dino_ui_file_send_overlay_construct (GType object_type,
                                                            GFile* file,
                                                            GFileInfo* file_info);
static void __lambda205_ (Block58Data* _data58_);
static void dino_ui_conversation_view_controller_send_file (DinoUiConversationViewController* self,
                                                     GFile* file);
static void ___lambda205__dino_ui_file_send_overlay_send_file (DinoUiFileSendOverlay* _sender,
                                                        gpointer self);
static void __lambda206_ (Block58Data* _data58_,
                   GObject* _,
                   GAsyncResult* res);
VALA_EXTERN void dino_ui_file_send_overlay_set_file_too_large (DinoUiFileSendOverlay* self);
static void ___lambda206__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void __lambda207_ (Block58Data* _data58_);
VALA_EXTERN void dino_ui_conversation_view_remove_overlay_dialog (DinoUiConversationView* self);
static void ___lambda207__dino_ui_file_send_overlay_close (DinoUiFileSendOverlay* _sender,
                                                    gpointer self);
VALA_EXTERN void dino_ui_conversation_view_add_overlay_dialog (DinoUiConversationView* self,
                                                   GtkWidget* widget);
VALA_EXTERN GtkWidget* dino_ui_file_send_overlay_get_widget (DinoUiFileSendOverlay* self);
VALA_EXTERN GType dino_ui_chat_text_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiChatTextView, g_object_unref)
VALA_EXTERN gpointer dino_ui_encryption_button_ref (gpointer instance);
VALA_EXTERN void dino_ui_encryption_button_unref (gpointer instance);
VALA_EXTERN GParamSpec* dino_ui_param_spec_encryption_button (const gchar* name,
                                                  const gchar* nick,
                                                  const gchar* blurb,
                                                  GType object_type,
                                                  GParamFlags flags);
VALA_EXTERN void dino_ui_value_set_encryption_button (GValue* value,
                                          gpointer v_object);
VALA_EXTERN void dino_ui_value_take_encryption_button (GValue* value,
                                           gpointer v_object);
VALA_EXTERN gpointer dino_ui_value_get_encryption_button (const GValue* value);
VALA_EXTERN GType dino_ui_encryption_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiEncryptionButton, dino_ui_encryption_button_unref)
VALA_EXTERN const gchar* dino_ui_conversation_view_controller_get_conversation_display_name (DinoUiConversationViewController* self);
VALA_EXTERN const gchar* dino_ui_conversation_view_controller_get_conversation_topic (DinoUiConversationViewController* self);
static void dino_ui_conversation_view_controller_finalize (GObject * obj);
static GType dino_ui_conversation_view_controller_get_type_once (void);
static void _vala_dino_ui_conversation_view_controller_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec);
static void _vala_dino_ui_conversation_view_controller_set_property (GObject * object,
                                                              guint property_id,
                                                              const GValue * value,
                                                              GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static const gchar* DINO_UI_CONVERSATION_VIEW_CONTROLLER_KEY_COMBINATION_CLOSE_CONVERSATION[2] = {"<Ctrl>W", NULL};

static inline gpointer
dino_ui_conversation_view_controller_get_instance_private (DinoUiConversationViewController* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiConversationViewController_private_offset);
}

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

static Block56Data*
block56_data_ref (Block56Data* _data56_)
{
	g_atomic_int_inc (&_data56_->_ref_count_);
	return _data56_;
}

static void
block56_data_unref (void * _userdata_)
{
	Block56Data* _data56_;
	_data56_ = (Block56Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data56_->_ref_count_)) {
		DinoUiConversationViewController* self;
		self = _data56_->self;
		_g_object_unref0 (_data56_->vadjustment);
		_g_object_unref0 (_data56_->view);
		_g_object_unref0 (_data56_->stream_interactor);
		_g_object_unref0 (self);
		g_slice_free (Block56Data, _data56_);
	}
}

static void
_dino_ui_conversation_summary_conversation_view_activate_last_message_correction_dino_ui_chat_input_controller_activate_last_message_correction (DinoUiChatInputController* _sender,
                                                                                                                                                 gpointer self)
{
	dino_ui_conversation_summary_conversation_view_activate_last_message_correction ((DinoUiConversationSummaryConversationView*) self);
}

static void
_dino_ui_conversation_view_controller_open_file_picker_dino_ui_chat_input_controller_file_picker_selected (DinoUiChatInputController* _sender,
                                                                                                           gpointer self)
{
	dino_ui_conversation_view_controller_open_file_picker ((DinoUiConversationViewController*) self);
}

static void
_dino_ui_conversation_view_controller_on_clipboard_paste_dino_ui_chat_input_controller_clipboard_pasted (DinoUiChatInputController* _sender,
                                                                                                         gpointer self)
{
	dino_ui_conversation_view_controller_on_clipboard_paste ((DinoUiConversationViewController*) self, NULL, NULL);
}

static gboolean
_dino_ui_conversation_view_controller_on_drag_data_received_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                                                  GValue* value,
                                                                                  gdouble x,
                                                                                  gdouble y,
                                                                                  gpointer self)
{
	gboolean result;
	result = dino_ui_conversation_view_controller_on_drag_data_received ((DinoUiConversationViewController*) self, _sender, value, x, y);
	return result;
}

static gboolean
_dino_ui_conversation_view_controller_forward_key_press_to_chat_input_gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                                            guint keyval,
                                                                                                            guint keycode,
                                                                                                            GdkModifierType state,
                                                                                                            gpointer self)
{
	gboolean result;
	result = dino_ui_conversation_view_controller_forward_key_press_to_chat_input ((DinoUiConversationViewController*) self, _sender, keyval, keycode, state);
	return result;
}

static void
__lambda208_ (Block56Data* _data56_)
{
	DinoUiConversationViewController* self;
	gboolean button_active = FALSE;
	GtkAdjustment* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	GtkAdjustment* _tmp6_;
	gdouble _tmp7_;
	gdouble _tmp8_;
	GtkRevealer* _tmp9_;
	GtkRevealer* _tmp10_;
	self = _data56_->self;
	_tmp0_ = _data56_->vadjustment;
	_tmp1_ = gtk_adjustment_get_value (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _data56_->vadjustment;
	_tmp4_ = gtk_adjustment_get_upper (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _data56_->vadjustment;
	_tmp7_ = gtk_adjustment_get_page_size (_tmp6_);
	_tmp8_ = _tmp7_;
	button_active = _tmp2_ < (_tmp5_ - _tmp8_);
	_tmp9_ = _data56_->view->goto_end_revealer;
	gtk_revealer_set_reveal_child (_tmp9_, button_active);
	_tmp10_ = _data56_->view->goto_end_revealer;
	gtk_widget_set_visible ((GtkWidget*) _tmp10_, button_active);
}

static void
___lambda208__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda208_ (self);
}

static void
__lambda209_ (Block56Data* _data56_)
{
	DinoUiConversationViewController* self;
	DinoUiConversationSummaryConversationView* _tmp0_;
	DinoEntitiesConversation* _tmp1_;
	self = _data56_->self;
	_tmp0_ = _data56_->view->conversation_frame;
	_tmp1_ = self->priv->conversation;
	dino_ui_conversation_summary_conversation_view_initialize_for_conversation (_tmp0_, _tmp1_);
}

static void
___lambda209__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda209_ (self);
}

static void
__lambda210_ (DinoUiConversationViewController* self,
              DinoEntitiesAccount* account,
              XmppJid* jid)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	DinoEntitiesConversation* _tmp2_;
	g_return_if_fail (account != NULL);
	g_return_if_fail (jid != NULL);
	_tmp2_ = self->priv->conversation;
	if (_tmp2_ != NULL) {
		DinoEntitiesConversation* _tmp3_;
		XmppJid* _tmp4_;
		XmppJid* _tmp5_;
		_tmp3_ = self->priv->conversation;
		_tmp4_ = dino_entities_conversation_get_counterpart (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = xmpp_jid_equals_bare (_tmp5_, jid);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		DinoEntitiesConversation* _tmp6_;
		DinoEntitiesAccount* _tmp7_;
		DinoEntitiesAccount* _tmp8_;
		_tmp6_ = self->priv->conversation;
		_tmp7_ = dino_entities_conversation_get_account (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp0_ = dino_entities_account_equals (_tmp8_, account);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		dino_ui_conversation_view_controller_update_conversation_display_name (self);
	}
}

static void
___lambda210__dino_muc_manager_room_info_updated (DinoMucManager* _sender,
                                                  DinoEntitiesAccount* account,
                                                  XmppJid* muc_jid,
                                                  gpointer self)
{
	__lambda210_ ((DinoUiConversationViewController*) self, account, muc_jid);
}

static void
__lambda211_ (DinoUiConversationViewController* self,
              DinoEntitiesAccount* account,
              XmppJid* room,
              XmppJid* occupant)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	DinoEntitiesConversation* _tmp2_;
	g_return_if_fail (account != NULL);
	g_return_if_fail (room != NULL);
	g_return_if_fail (occupant != NULL);
	_tmp2_ = self->priv->conversation;
	if (_tmp2_ != NULL) {
		DinoEntitiesConversation* _tmp3_;
		XmppJid* _tmp4_;
		XmppJid* _tmp5_;
		XmppJid* _tmp6_;
		XmppJid* _tmp7_;
		XmppJid* _tmp8_;
		_tmp3_ = self->priv->conversation;
		_tmp4_ = dino_entities_conversation_get_counterpart (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = xmpp_jid_get_bare_jid (room);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp1_ = xmpp_jid_equals_bare (_tmp5_, _tmp8_);
		_xmpp_jid_unref0 (_tmp8_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		DinoEntitiesConversation* _tmp9_;
		DinoEntitiesAccount* _tmp10_;
		DinoEntitiesAccount* _tmp11_;
		_tmp9_ = self->priv->conversation;
		_tmp10_ = dino_entities_conversation_get_account (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp0_ = dino_entities_account_equals (_tmp11_, account);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		dino_ui_conversation_view_controller_update_conversation_display_name (self);
	}
}

static void
___lambda211__dino_muc_manager_private_room_occupant_updated (DinoMucManager* _sender,
                                                              DinoEntitiesAccount* account,
                                                              XmppJid* room,
                                                              XmppJid* occupant,
                                                              gpointer self)
{
	__lambda211_ ((DinoUiConversationViewController*) self, account, room, occupant);
}

static void
__lambda212_ (DinoUiConversationViewController* self,
              DinoEntitiesAccount* account,
              XmppJid* jid,
              const gchar* subject)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	DinoEntitiesConversation* _tmp2_;
	g_return_if_fail (account != NULL);
	g_return_if_fail (jid != NULL);
	_tmp2_ = self->priv->conversation;
	if (_tmp2_ != NULL) {
		DinoEntitiesConversation* _tmp3_;
		XmppJid* _tmp4_;
		XmppJid* _tmp5_;
		_tmp3_ = self->priv->conversation;
		_tmp4_ = dino_entities_conversation_get_counterpart (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = xmpp_jid_equals_bare (_tmp5_, jid);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		DinoEntitiesConversation* _tmp6_;
		DinoEntitiesAccount* _tmp7_;
		DinoEntitiesAccount* _tmp8_;
		_tmp6_ = self->priv->conversation;
		_tmp7_ = dino_entities_conversation_get_account (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp0_ = dino_entities_account_equals (_tmp8_, account);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		dino_ui_conversation_view_controller_update_conversation_topic (self, subject);
	}
}

static void
___lambda212__dino_muc_manager_subject_set (DinoMucManager* _sender,
                                            DinoEntitiesAccount* account,
                                            XmppJid* jid,
                                            const gchar* subject,
                                            gpointer self)
{
	__lambda212_ ((DinoUiConversationViewController*) self, account, jid, subject);
}

static void
__lambda213_ (DinoUiConversationViewController* self,
              DinoEntitiesAccount* account,
              XmppJid* jid,
              XmppRosterItem* roster_item)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	DinoEntitiesConversation* _tmp2_;
	g_return_if_fail (account != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (roster_item != NULL);
	_tmp2_ = self->priv->conversation;
	if (_tmp2_ != NULL) {
		DinoEntitiesConversation* _tmp3_;
		DinoEntitiesAccount* _tmp4_;
		DinoEntitiesAccount* _tmp5_;
		_tmp3_ = self->priv->conversation;
		_tmp4_ = dino_entities_conversation_get_account (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = dino_entities_account_equals (_tmp5_, account);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		DinoEntitiesConversation* _tmp6_;
		XmppJid* _tmp7_;
		XmppJid* _tmp8_;
		_tmp6_ = self->priv->conversation;
		_tmp7_ = dino_entities_conversation_get_counterpart (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp0_ = xmpp_jid_equals (_tmp8_, jid);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		dino_ui_conversation_view_controller_update_conversation_display_name (self);
	}
}

static void
___lambda213__dino_roster_manager_updated_roster_item (DinoRosterManager* _sender,
                                                       DinoEntitiesAccount* account,
                                                       XmppJid* jid,
                                                       XmppRosterItem* roster_item,
                                                       gpointer self)
{
	__lambda213_ ((DinoUiConversationViewController*) self, account, jid, roster_item);
}

static void
_dino_ui_conversation_view_controller_update_file_upload_status_dino_file_manager_upload_available (DinoFileManager* _sender,
                                                                                                    DinoEntitiesAccount* account,
                                                                                                    gpointer self)
{
	dino_ui_conversation_view_controller_update_file_upload_status ((DinoUiConversationViewController*) self, NULL, NULL);
}

static void
__lambda228_ (Block56Data* _data56_,
              GObject* _,
              GAsyncResult* res)
{
	DinoUiConversationViewController* self;
	DinoModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	DinoFileManager* _tmp2_;
	gboolean _tmp3_;
	self = _data56_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = dino_file_manager_IDENTITY;
	_tmp1_ = dino_stream_interactor_get_module (_data56_->stream_interactor, DINO_TYPE_FILE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (DinoFileManager*) _tmp1_;
	_tmp3_ = dino_file_manager_is_upload_available_finish (_tmp2_, res);
	_g_object_unref0 (_tmp2_);
	if (_tmp3_) {
		dino_ui_conversation_view_controller_open_file_picker (self);
	}
}

static void
___lambda228__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda228_ (self, source_object, res);
	block56_data_unref (self);
}

static gboolean
__lambda227_ (Block56Data* _data56_)
{
	DinoUiConversationViewController* self;
	DinoEntitiesConversation* _tmp0_;
	DinoModuleIdentity* _tmp1_;
	gpointer _tmp2_;
	DinoFileManager* _tmp3_;
	DinoEntitiesConversation* _tmp4_;
	gboolean result;
	self = _data56_->self;
	_tmp0_ = self->priv->conversation;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = dino_file_manager_IDENTITY;
	_tmp2_ = dino_stream_interactor_get_module (_data56_->stream_interactor, DINO_TYPE_FILE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
	_tmp3_ = (DinoFileManager*) _tmp2_;
	_tmp4_ = self->priv->conversation;
	dino_file_manager_is_upload_available (_tmp3_, _tmp4_, ___lambda228__gasync_ready_callback, block56_data_ref (_data56_));
	_g_object_unref0 (_tmp3_);
	result = FALSE;
	return result;
}

static gboolean
___lambda227__gtk_shortcut_func (GtkWidget* widget,
                                 GVariant* args,
                                 gpointer self)
{
	gboolean result;
	result = __lambda227_ (self);
	return result;
}

static void
__lambda229_ (Block56Data* _data56_)
{
	DinoUiConversationViewController* self;
	DinoModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	DinoConversationManager* _tmp2_;
	DinoEntitiesConversation* _tmp3_;
	self = _data56_->self;
	_tmp0_ = dino_conversation_manager_IDENTITY;
	_tmp1_ = dino_stream_interactor_get_module (_data56_->stream_interactor, DINO_TYPE_CONVERSATION_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (DinoConversationManager*) _tmp1_;
	_tmp3_ = self->priv->conversation;
	dino_conversation_manager_close_conversation (_tmp2_, _tmp3_);
	_g_object_unref0 (_tmp2_);
}

static void
___lambda229__g_simple_action_activate (GSimpleAction* _sender,
                                        GVariant* parameter,
                                        gpointer self)
{
	__lambda229_ (self);
}

DinoUiConversationViewController*
dino_ui_conversation_view_controller_construct (GType object_type,
                                                DinoUiConversationView* view,
                                                DinoUiConversationTitlebar* titlebar,
                                                DinoStreamInteractor* stream_interactor)
{
	DinoUiConversationViewController * self = NULL;
	Block56Data* _data56_;
	DinoUiConversationView* _tmp0_;
	DinoStreamInteractor* _tmp1_;
	DinoUiConversationView* _tmp2_;
	DinoUiConversationTitlebar* _tmp3_;
	DinoStreamInteractor* _tmp4_;
	GApplication* _tmp5_;
	DinoUiApplication* _tmp6_;
	DinoUiChatInputView* _tmp7_;
	DinoUiChatInputController* _tmp8_;
	DinoUiChatInputController* _tmp9_;
	DinoUiConversationSummaryConversationView* _tmp10_;
	DinoUiChatInputController* _tmp11_;
	DinoUiChatInputController* _tmp12_;
	DinoUiConversationSummaryConversationView* _tmp13_;
	DinoUiConversationSummaryConversationView* _tmp14_;
	DinoUiConversationSummaryConversationView* _tmp15_;
	GtkDropTarget* _tmp16_;
	GtkEventControllerKey* key_controller = NULL;
	gchar* _tmp17_;
	GtkEventControllerKey* _tmp18_ = NULL;
	GtkEventControllerKey* _tmp19_;
	DinoUiConversationSummaryConversationView* _tmp20_;
	GtkEventControllerKey* _tmp21_;
	GtkEventController* _tmp22_;
	GtkEventControllerKey* key_controller2 = NULL;
	gchar* _tmp23_;
	GtkEventControllerKey* _tmp24_ = NULL;
	GtkEventControllerKey* _tmp25_;
	DinoUiChatInputView* _tmp26_;
	GtkEventControllerKey* _tmp27_;
	GtkEventController* _tmp28_;
	GtkEventControllerKey* key_controller3 = NULL;
	gchar* _tmp29_;
	GtkEventControllerKey* _tmp30_ = NULL;
	GtkEventControllerKey* _tmp31_;
	GtkWidget* _tmp32_;
	GtkWidget* _tmp33_;
	GtkEventControllerKey* _tmp34_;
	GtkEventController* _tmp35_;
	DinoUiConversationSummaryConversationView* _tmp36_;
	GtkScrolledWindow* _tmp37_;
	GtkAdjustment* _tmp38_;
	GtkAdjustment* _tmp39_;
	GtkAdjustment* _tmp40_;
	GtkAdjustment* _tmp41_;
	GtkButton* _tmp42_;
	DinoModuleIdentity* _tmp43_;
	gpointer _tmp44_;
	DinoMucManager* _tmp45_;
	DinoModuleIdentity* _tmp46_;
	gpointer _tmp47_;
	DinoMucManager* _tmp48_;
	DinoModuleIdentity* _tmp49_;
	gpointer _tmp50_;
	DinoMucManager* _tmp51_;
	DinoModuleIdentity* _tmp52_;
	gpointer _tmp53_;
	DinoRosterManager* _tmp54_;
	DinoModuleIdentity* _tmp55_;
	gpointer _tmp56_;
	DinoFileManager* _tmp57_;
	DinoUiApplication* _tmp58_;
	DinoPluginsRegistry* _tmp59_;
	DinoPluginsRegistry* _tmp60_;
	DinoUiMenuEntry* _tmp61_;
	DinoUiMenuEntry* _tmp62_;
	DinoUiApplication* _tmp63_;
	DinoPluginsRegistry* _tmp64_;
	DinoPluginsRegistry* _tmp65_;
	DinoUiSearchMenuEntry* _tmp66_;
	DinoUiApplication* _tmp67_;
	DinoPluginsRegistry* _tmp68_;
	DinoPluginsRegistry* _tmp69_;
	DinoUiOccupantsEntry* _tmp70_;
	DinoUiOccupantsEntry* _tmp71_;
	DinoUiApplication* _tmp72_;
	DinoPluginsRegistry* _tmp73_;
	DinoPluginsRegistry* _tmp74_;
	DinoUiCallTitlebarEntry* _tmp75_;
	DinoUiCallTitlebarEntry* _tmp76_;
	GtkShortcut* shortcut = NULL;
	GtkKeyvalTrigger* _tmp90_;
	GtkCallbackAction* _tmp91_;
	GtkShortcut* _tmp92_;
	GtkRoot* _tmp93_;
	GSimpleAction* close_conversation_action = NULL;
	GSimpleAction* _tmp94_;
	DinoUiApplication* _tmp95_;
	DinoUiApplication* _tmp96_;
	g_return_val_if_fail (view != NULL, NULL);
	g_return_val_if_fail (titlebar != NULL, NULL);
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	_data56_ = g_slice_new0 (Block56Data);
	_data56_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (view);
	_g_object_unref0 (_data56_->view);
	_data56_->view = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (_data56_->stream_interactor);
	_data56_->stream_interactor = _tmp1_;
	self = (DinoUiConversationViewController*) g_object_new (object_type, NULL);
	_data56_->self = g_object_ref (self);
	_tmp2_ = _g_object_ref0 (_data56_->view);
	_g_object_unref0 (self->priv->view);
	self->priv->view = _tmp2_;
	_tmp3_ = _g_object_ref0 (titlebar);
	_g_object_unref0 (self->priv->titlebar);
	self->priv->titlebar = _tmp3_;
	_tmp4_ = _g_object_ref0 (_data56_->stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp4_;
	_tmp5_ = g_application_get_default ();
	_tmp6_ = _g_object_ref0 (DINO_UI_IS_APPLICATION (_tmp5_) ? ((DinoUiApplication*) _tmp5_) : NULL);
	_g_object_unref0 (self->priv->app);
	self->priv->app = _tmp6_;
	_tmp7_ = _data56_->view->chat_input;
	_tmp8_ = dino_ui_chat_input_controller_new (_tmp7_, _data56_->stream_interactor);
	_g_object_unref0 (self->priv->chat_input_controller);
	self->priv->chat_input_controller = _tmp8_;
	_tmp9_ = self->priv->chat_input_controller;
	_tmp10_ = _data56_->view->conversation_frame;
	g_signal_connect_object (_tmp9_, "activate-last-message-correction", (GCallback) _dino_ui_conversation_summary_conversation_view_activate_last_message_correction_dino_ui_chat_input_controller_activate_last_message_correction, _tmp10_, 0);
	_tmp11_ = self->priv->chat_input_controller;
	g_signal_connect_object (_tmp11_, "file-picker-selected", (GCallback) _dino_ui_conversation_view_controller_open_file_picker_dino_ui_chat_input_controller_file_picker_selected, self, 0);
	_tmp12_ = self->priv->chat_input_controller;
	g_signal_connect_object (_tmp12_, "clipboard-pasted", (GCallback) _dino_ui_conversation_view_controller_on_clipboard_paste_dino_ui_chat_input_controller_clipboard_pasted, self, 0);
	_tmp13_ = _data56_->view->conversation_frame;
	_tmp14_ = dino_ui_conversation_summary_conversation_view_init (_tmp13_, _data56_->stream_interactor);
	_tmp15_ = _tmp14_;
	_g_object_unref0 (_tmp15_);
	_tmp16_ = self->priv->drop_event_controller;
	g_signal_connect_object (_tmp16_, "drop", (GCallback) _dino_ui_conversation_view_controller_on_drag_data_received_gtk_drop_target_drop, self, 0);
	_tmp17_ = g_strdup ("dino-forward-to-input-key-events-1");
	_tmp18_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	gtk_event_controller_set_name ((GtkEventController*) _tmp18_, _tmp17_);
	_g_free0 (_tmp17_);
	key_controller = _tmp18_;
	_tmp19_ = key_controller;
	g_signal_connect_object (_tmp19_, "key-pressed", (GCallback) _dino_ui_conversation_view_controller_forward_key_press_to_chat_input_gtk_event_controller_key_key_pressed, self, 0);
	_tmp20_ = _data56_->view->conversation_frame;
	_tmp21_ = key_controller;
	_tmp22_ = _g_object_ref0 ((GtkEventController*) _tmp21_);
	gtk_widget_add_controller ((GtkWidget*) _tmp20_, _tmp22_);
	_tmp23_ = g_strdup ("dino-forward-to-input-key-events-2");
	_tmp24_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	gtk_event_controller_set_name ((GtkEventController*) _tmp24_, _tmp23_);
	_g_free0 (_tmp23_);
	key_controller2 = _tmp24_;
	_tmp25_ = key_controller2;
	g_signal_connect_object (_tmp25_, "key-pressed", (GCallback) _dino_ui_conversation_view_controller_forward_key_press_to_chat_input_gtk_event_controller_key_key_pressed, self, 0);
	_tmp26_ = _data56_->view->chat_input;
	_tmp27_ = key_controller2;
	_tmp28_ = _g_object_ref0 ((GtkEventController*) _tmp27_);
	gtk_widget_add_controller ((GtkWidget*) _tmp26_, _tmp28_);
	_tmp29_ = g_strdup ("dino-forward-to-input-key-events-3");
	_tmp30_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	gtk_event_controller_set_name ((GtkEventController*) _tmp30_, _tmp29_);
	_g_free0 (_tmp29_);
	key_controller3 = _tmp30_;
	_tmp31_ = key_controller3;
	g_signal_connect_object (_tmp31_, "key-pressed", (GCallback) _dino_ui_conversation_view_controller_forward_key_press_to_chat_input_gtk_event_controller_key_key_pressed, self, 0);
	_tmp32_ = dino_ui_conversation_titlebar_get_widget (titlebar);
	_tmp33_ = _tmp32_;
	_tmp34_ = key_controller3;
	_tmp35_ = _g_object_ref0 ((GtkEventController*) _tmp34_);
	gtk_widget_add_controller (_tmp33_, _tmp35_);
	_g_object_unref0 (_tmp33_);
	_tmp36_ = _data56_->view->conversation_frame;
	_tmp37_ = _tmp36_->scrolled;
	_tmp38_ = gtk_scrolled_window_get_vadjustment (_tmp37_);
	_tmp39_ = _tmp38_;
	_tmp40_ = _g_object_ref0 (_tmp39_);
	_data56_->vadjustment = _tmp40_;
	_tmp41_ = _data56_->vadjustment;
	g_signal_connect_data ((GObject*) _tmp41_, "notify::value", (GCallback) ___lambda208__g_object_notify, block56_data_ref (_data56_), (GClosureNotify) block56_data_unref, 0);
	_tmp42_ = _data56_->view->goto_end_button;
	g_signal_connect_data (_tmp42_, "clicked", (GCallback) ___lambda209__gtk_button_clicked, block56_data_ref (_data56_), (GClosureNotify) block56_data_unref, 0);
	g_object_bind_property_with_closures ((GObject*) self, "conversation-display-name", (GObject*) titlebar, "title", G_BINDING_DEFAULT, (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*) self, "conversation-topic", (GObject*) titlebar, "subtitle", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp43_ = dino_muc_manager_IDENTITY;
	_tmp44_ = dino_stream_interactor_get_module (_data56_->stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp43_);
	_tmp45_ = (DinoMucManager*) _tmp44_;
	g_signal_connect_object (_tmp45_, "room-info-updated", (GCallback) ___lambda210__dino_muc_manager_room_info_updated, self, 0);
	_g_object_unref0 (_tmp45_);
	_tmp46_ = dino_muc_manager_IDENTITY;
	_tmp47_ = dino_stream_interactor_get_module (_data56_->stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp46_);
	_tmp48_ = (DinoMucManager*) _tmp47_;
	g_signal_connect_object (_tmp48_, "private-room-occupant-updated", (GCallback) ___lambda211__dino_muc_manager_private_room_occupant_updated, self, 0);
	_g_object_unref0 (_tmp48_);
	_tmp49_ = dino_muc_manager_IDENTITY;
	_tmp50_ = dino_stream_interactor_get_module (_data56_->stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp49_);
	_tmp51_ = (DinoMucManager*) _tmp50_;
	g_signal_connect_object (_tmp51_, "subject-set", (GCallback) ___lambda212__dino_muc_manager_subject_set, self, 0);
	_g_object_unref0 (_tmp51_);
	_tmp52_ = dino_roster_manager_IDENTITY;
	_tmp53_ = dino_stream_interactor_get_module (_data56_->stream_interactor, DINO_TYPE_ROSTER_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp52_);
	_tmp54_ = (DinoRosterManager*) _tmp53_;
	g_signal_connect_object (_tmp54_, "updated-roster-item", (GCallback) ___lambda213__dino_roster_manager_updated_roster_item, self, 0);
	_g_object_unref0 (_tmp54_);
	_tmp55_ = dino_file_manager_IDENTITY;
	_tmp56_ = dino_stream_interactor_get_module (_data56_->stream_interactor, DINO_TYPE_FILE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp55_);
	_tmp57_ = (DinoFileManager*) _tmp56_;
	g_signal_connect_object (_tmp57_, "upload-available", (GCallback) _dino_ui_conversation_view_controller_update_file_upload_status_dino_file_manager_upload_available, self, 0);
	_g_object_unref0 (_tmp57_);
	_tmp58_ = self->priv->app;
	_tmp59_ = dino_application_get_plugin_registry ((DinoApplication*) _tmp58_);
	_tmp60_ = _tmp59_;
	_tmp61_ = dino_ui_menu_entry_new (_data56_->stream_interactor);
	_tmp62_ = _tmp61_;
	dino_plugins_registry_register_contact_titlebar_entry (_tmp60_, (DinoPluginsConversationTitlebarEntry*) _tmp62_);
	_g_object_unref0 (_tmp62_);
	_tmp63_ = self->priv->app;
	_tmp64_ = dino_application_get_plugin_registry ((DinoApplication*) _tmp63_);
	_tmp65_ = _tmp64_;
	_tmp66_ = self->search_menu_entry;
	dino_plugins_registry_register_contact_titlebar_entry (_tmp65_, (DinoPluginsConversationTitlebarEntry*) _tmp66_);
	_tmp67_ = self->priv->app;
	_tmp68_ = dino_application_get_plugin_registry ((DinoApplication*) _tmp67_);
	_tmp69_ = _tmp68_;
	_tmp70_ = dino_ui_occupants_entry_new (_data56_->stream_interactor);
	_tmp71_ = _tmp70_;
	dino_plugins_registry_register_contact_titlebar_entry (_tmp69_, (DinoPluginsConversationTitlebarEntry*) _tmp71_);
	_g_object_unref0 (_tmp71_);
	_tmp72_ = self->priv->app;
	_tmp73_ = dino_application_get_plugin_registry ((DinoApplication*) _tmp72_);
	_tmp74_ = _tmp73_;
	_tmp75_ = dino_ui_call_titlebar_entry_new (_data56_->stream_interactor);
	_tmp76_ = _tmp75_;
	dino_plugins_registry_register_contact_titlebar_entry (_tmp74_, (DinoPluginsConversationTitlebarEntry*) _tmp76_);
	_g_object_unref0 (_tmp76_);
	{
		GeeIterator* _entry_it = NULL;
		DinoUiApplication* _tmp77_;
		DinoPluginsRegistry* _tmp78_;
		DinoPluginsRegistry* _tmp79_;
		GeeCollection* _tmp80_;
		GeeIterator* _tmp81_;
		_tmp77_ = self->priv->app;
		_tmp78_ = dino_application_get_plugin_registry ((DinoApplication*) _tmp77_);
		_tmp79_ = _tmp78_;
		_tmp80_ = _tmp79_->conversation_titlebar_entries;
		_tmp81_ = gee_iterable_iterator ((GeeIterable*) _tmp80_);
		_entry_it = _tmp81_;
		while (TRUE) {
			GeeIterator* _tmp82_;
			DinoPluginsConversationTitlebarEntry* entry = NULL;
			GeeIterator* _tmp83_;
			gpointer _tmp84_;
			GtkWidget* button = NULL;
			DinoPluginsConversationTitlebarEntry* _tmp85_;
			GObject* _tmp86_;
			GtkWidget* _tmp87_;
			GtkWidget* _tmp88_;
			GtkWidget* _tmp89_;
			_tmp82_ = _entry_it;
			if (!gee_iterator_next (_tmp82_)) {
				break;
			}
			_tmp83_ = _entry_it;
			_tmp84_ = gee_iterator_get (_tmp83_);
			entry = (DinoPluginsConversationTitlebarEntry*) _tmp84_;
			_tmp85_ = entry;
			_tmp86_ = dino_plugins_conversation_titlebar_entry_get_widget (_tmp85_, DINO_PLUGINS_WIDGET_TYPE_GTK4);
			_tmp87_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp86_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp86_) : NULL;
			if (_tmp87_ == NULL) {
				_g_object_unref0 (_tmp86_);
			}
			button = _tmp87_;
			_tmp88_ = button;
			if (_tmp88_ == NULL) {
				_g_object_unref0 (button);
				_g_object_unref0 (entry);
				continue;
			}
			_tmp89_ = button;
			dino_ui_conversation_titlebar_insert_button (titlebar, _tmp89_);
			_g_object_unref0 (button);
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp90_ = (GtkKeyvalTrigger*) gtk_keyval_trigger_new (GDK_KEY_U, GDK_CONTROL_MASK);
	_tmp91_ = (GtkCallbackAction*) gtk_callback_action_new (___lambda227__gtk_shortcut_func, block56_data_ref (_data56_), block56_data_unref);
	_tmp92_ = gtk_shortcut_new ((GtkShortcutTrigger*) _tmp90_, (GtkShortcutAction*) _tmp91_);
	shortcut = _tmp92_;
	_tmp93_ = gtk_widget_get_root ((GtkWidget*) _data56_->view);
	gtk_widget_class_add_shortcut (G_TYPE_INSTANCE_GET_CLASS (G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, gtk_window_get_type (), GtkWindow), gtk_widget_get_type (), GtkWidgetClass), shortcut);
	_tmp94_ = g_simple_action_new ("close-current-conversation", NULL);
	close_conversation_action = _tmp94_;
	g_signal_connect_data (close_conversation_action, "activate", (GCallback) ___lambda229__g_simple_action_activate, block56_data_ref (_data56_), (GClosureNotify) block56_data_unref, 0);
	_tmp95_ = self->priv->app;
	g_action_map_add_action ((GActionMap*) _tmp95_, (GAction*) close_conversation_action);
	_tmp96_ = self->priv->app;
	gtk_application_set_accels_for_action ((GtkApplication*) _tmp96_, "app.close-current-conversation", DINO_UI_CONVERSATION_VIEW_CONTROLLER_KEY_COMBINATION_CLOSE_CONVERSATION);
	_g_object_unref0 (close_conversation_action);
	_g_object_unref0 (shortcut);
	_g_object_unref0 (key_controller3);
	_g_object_unref0 (key_controller2);
	_g_object_unref0 (key_controller);
	block56_data_unref (_data56_);
	_data56_ = NULL;
	return self;
}

DinoUiConversationViewController*
dino_ui_conversation_view_controller_new (DinoUiConversationView* view,
                                          DinoUiConversationTitlebar* titlebar,
                                          DinoStreamInteractor* stream_interactor)
{
	return dino_ui_conversation_view_controller_construct (DINO_UI_TYPE_CONVERSATION_VIEW_CONTROLLER, view, titlebar, stream_interactor);
}

static void
_dino_ui_conversation_view_controller_update_file_upload_status_g_object_notify (GObject* _sender,
                                                                                 GParamSpec* pspec,
                                                                                 gpointer self)
{
	dino_ui_conversation_view_controller_update_file_upload_status ((DinoUiConversationViewController*) self, NULL, NULL);
}

void
dino_ui_conversation_view_controller_select_conversation (DinoUiConversationViewController* self,
                                                          DinoEntitiesConversation* conversation,
                                                          gboolean default_initialize_conversation)
{
	DinoEntitiesConversation* _tmp0_;
	GtkWidget* _tmp3_;
	DinoEntitiesConversation* _tmp5_;
	DinoUiChatInputController* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->conversation;
	if (_tmp0_ != NULL) {
		guint _tmp1_;
		GQuark _tmp2_;
		g_signal_parse_name ("notify::encryption", G_TYPE_OBJECT, &_tmp1_, &_tmp2_, TRUE);
		g_signal_handlers_disconnect_matched ((GObject*) conversation, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, _tmp2_, NULL, (GCallback) _dino_ui_conversation_view_controller_update_file_upload_status_g_object_notify, self);
	}
	_tmp3_ = self->priv->overlay_dialog;
	if (_tmp3_ != NULL) {
		GtkWidget* _tmp4_;
		_tmp4_ = self->priv->overlay_dialog;
		g_signal_emit_by_name (_tmp4_, "destroy");
	}
	_tmp5_ = _g_object_ref0 (conversation);
	_g_object_unref0 (self->priv->conversation);
	self->priv->conversation = _tmp5_;
	g_signal_connect_object ((GObject*) conversation, "notify::encryption", (GCallback) _dino_ui_conversation_view_controller_update_file_upload_status_g_object_notify, self, 0);
	_tmp6_ = self->priv->chat_input_controller;
	dino_ui_chat_input_controller_set_conversation (_tmp6_, conversation);
	dino_ui_conversation_view_controller_update_conversation_display_name (self);
	dino_ui_conversation_view_controller_update_conversation_topic (self, NULL);
	{
		GeeIterator* _e_it = NULL;
		DinoUiApplication* _tmp7_;
		DinoPluginsRegistry* _tmp8_;
		DinoPluginsRegistry* _tmp9_;
		GeeCollection* _tmp10_;
		GeeIterator* _tmp11_;
		_tmp7_ = self->priv->app;
		_tmp8_ = dino_application_get_plugin_registry ((DinoApplication*) _tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = _tmp9_->conversation_titlebar_entries;
		_tmp11_ = gee_iterable_iterator ((GeeIterable*) _tmp10_);
		_e_it = _tmp11_;
		while (TRUE) {
			GeeIterator* _tmp12_;
			DinoPluginsConversationTitlebarEntry* e = NULL;
			GeeIterator* _tmp13_;
			gpointer _tmp14_;
			DinoPluginsConversationTitlebarEntry* _tmp15_;
			_tmp12_ = _e_it;
			if (!gee_iterator_next (_tmp12_)) {
				break;
			}
			_tmp13_ = _e_it;
			_tmp14_ = gee_iterator_get (_tmp13_);
			e = (DinoPluginsConversationTitlebarEntry*) _tmp14_;
			_tmp15_ = e;
			dino_plugins_conversation_titlebar_entry_set_conversation (_tmp15_, conversation);
			_g_object_unref0 (e);
		}
		_g_object_unref0 (_e_it);
	}
	if (default_initialize_conversation) {
		DinoUiConversationView* _tmp16_;
		DinoUiConversationSummaryConversationView* _tmp17_;
		_tmp16_ = self->priv->view;
		_tmp17_ = _tmp16_->conversation_frame;
		dino_ui_conversation_summary_conversation_view_initialize_for_conversation (_tmp17_, conversation);
	}
	dino_ui_conversation_view_controller_update_file_upload_status (self, NULL, NULL);
}

void
dino_ui_conversation_view_controller_unset_conversation (DinoUiConversationViewController* self)
{
	g_return_if_fail (self != NULL);
	dino_ui_conversation_view_controller_set_conversation_display_name (self, NULL);
	dino_ui_conversation_view_controller_set_conversation_topic (self, NULL);
}

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

static void
dino_ui_conversation_view_controller_update_file_upload_status (DinoUiConversationViewController* self,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_)
{
	DinoUiConversationViewControllerUpdateFileUploadStatusData* _data_;
	DinoUiConversationViewController* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DinoUiConversationViewControllerUpdateFileUploadStatusData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dino_ui_conversation_view_controller_update_file_upload_status_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dino_ui_conversation_view_controller_update_file_upload_status_co (_data_);
}

static void
dino_ui_conversation_view_controller_update_file_upload_status_finish (DinoUiConversationViewController* self,
                                                                       GAsyncResult* _res_)
{
	DinoUiConversationViewControllerUpdateFileUploadStatusData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dino_ui_conversation_view_controller_update_file_upload_status_ready (GObject* source_object,
                                                                      GAsyncResult* _res_,
                                                                      gpointer _user_data_)
{
	DinoUiConversationViewControllerUpdateFileUploadStatusData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dino_ui_conversation_view_controller_update_file_upload_status_co (_data_);
}

static gboolean
dino_ui_conversation_view_controller_update_file_upload_status_co (DinoUiConversationViewControllerUpdateFileUploadStatusData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->conversation;
	if (_data_->_tmp0_ == NULL) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = _data_->self->priv->stream_interactor;
	_data_->_tmp2_ = dino_file_manager_IDENTITY;
	_data_->_tmp3_ = dino_stream_interactor_get_module (_data_->_tmp1_, DINO_TYPE_FILE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp2_);
	_data_->_tmp4_ = (DinoFileManager*) _data_->_tmp3_;
	_data_->_tmp5_ = _data_->self->priv->conversation;
	_data_->_state_ = 1;
	dino_file_manager_is_upload_available (_data_->_tmp4_, _data_->_tmp5_, dino_ui_conversation_view_controller_update_file_upload_status_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp6_ = dino_file_manager_is_upload_available_finish (_data_->_tmp4_, _data_->_res_);
	_g_object_unref0 (_data_->_tmp4_);
	_data_->upload_available = _data_->_tmp6_;
	_data_->_tmp7_ = _data_->self->priv->chat_input_controller;
	dino_ui_chat_input_controller_set_file_upload_active (_data_->_tmp7_, _data_->upload_available);
	if (_data_->upload_available) {
		_data_->_tmp9_ = _data_->self->priv->overlay_dialog;
		_data_->_tmp8_ = _data_->_tmp9_ == NULL;
	} else {
		_data_->_tmp8_ = FALSE;
	}
	if (_data_->_tmp8_) {
		_data_->_tmp10_ = _data_->self->priv->drop_event_controller;
		_data_->_tmp11_ = gtk_event_controller_get_widget ((GtkEventController*) _data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		if (_data_->_tmp12_ == NULL) {
			_data_->_tmp13_ = _data_->self->priv->view;
			_data_->_tmp14_ = _data_->self->priv->drop_event_controller;
			_data_->_tmp15_ = _g_object_ref0 ((GtkEventController*) _data_->_tmp14_);
			gtk_widget_add_controller ((GtkWidget*) _data_->_tmp13_, _data_->_tmp15_);
		}
	} else {
		_data_->_tmp16_ = _data_->self->priv->drop_event_controller;
		_data_->_tmp17_ = gtk_event_controller_get_widget ((GtkEventController*) _data_->_tmp16_);
		_data_->_tmp18_ = _data_->_tmp17_;
		if (_data_->_tmp18_ != NULL) {
			_data_->_tmp19_ = _data_->self->priv->view;
			_data_->_tmp20_ = _data_->self->priv->drop_event_controller;
			gtk_widget_remove_controller ((GtkWidget*) _data_->_tmp19_, (GtkEventController*) _data_->_tmp20_);
		}
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dino_ui_conversation_view_controller_update_conversation_display_name (DinoUiConversationViewController* self)
{
	DinoStreamInteractor* _tmp0_;
	DinoEntitiesConversation* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stream_interactor;
	_tmp1_ = self->priv->conversation;
	_tmp2_ = dino_ui_util_get_conversation_display_name (_tmp0_, _tmp1_);
	_tmp3_ = _tmp2_;
	dino_ui_conversation_view_controller_set_conversation_display_name (self, _tmp3_);
	_g_free0 (_tmp3_);
}

static void
dino_ui_conversation_view_controller_update_conversation_topic (DinoUiConversationViewController* self,
                                                                const gchar* subtitle)
{
	g_return_if_fail (self != NULL);
	if (subtitle != NULL) {
		gchar* summarized_topic = NULL;
		gchar* _tmp0_;
		const gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp0_ = dino_ui_util_summarize_whitespaces_to_space (subtitle);
		summarized_topic = _tmp0_;
		_tmp1_ = summarized_topic;
		_tmp2_ = dino_ui_util_parse_add_markup (_tmp1_, NULL, TRUE, TRUE);
		_tmp3_ = _tmp2_;
		dino_ui_conversation_view_controller_set_conversation_topic (self, _tmp3_);
		_g_free0 (_tmp3_);
		_g_free0 (summarized_topic);
	} else {
		DinoEntitiesConversation* _tmp4_;
		DinoEntitiesConversationType _tmp5_;
		DinoEntitiesConversationType _tmp6_;
		_tmp4_ = self->priv->conversation;
		_tmp5_ = dino_entities_conversation_get_type_ (_tmp4_);
		_tmp6_ = _tmp5_;
		if (_tmp6_ == DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT) {
			gchar* subject = NULL;
			DinoStreamInteractor* _tmp7_;
			DinoModuleIdentity* _tmp8_;
			gpointer _tmp9_;
			DinoMucManager* _tmp10_;
			DinoEntitiesConversation* _tmp11_;
			XmppJid* _tmp12_;
			XmppJid* _tmp13_;
			DinoEntitiesConversation* _tmp14_;
			DinoEntitiesAccount* _tmp15_;
			DinoEntitiesAccount* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			const gchar* _tmp19_;
			_tmp7_ = self->priv->stream_interactor;
			_tmp8_ = dino_muc_manager_IDENTITY;
			_tmp9_ = dino_stream_interactor_get_module (_tmp7_, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp8_);
			_tmp10_ = (DinoMucManager*) _tmp9_;
			_tmp11_ = self->priv->conversation;
			_tmp12_ = dino_entities_conversation_get_counterpart (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = self->priv->conversation;
			_tmp15_ = dino_entities_conversation_get_account (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = dino_muc_manager_get_groupchat_subject (_tmp10_, _tmp13_, _tmp16_);
			_tmp18_ = _tmp17_;
			_g_object_unref0 (_tmp10_);
			subject = _tmp18_;
			_tmp19_ = subject;
			if (_tmp19_ != NULL) {
				gchar* summarized_topic = NULL;
				const gchar* _tmp20_;
				gchar* _tmp21_;
				const gchar* _tmp22_;
				gchar* _tmp23_;
				gchar* _tmp24_;
				_tmp20_ = subject;
				_tmp21_ = dino_ui_util_summarize_whitespaces_to_space (_tmp20_);
				summarized_topic = _tmp21_;
				_tmp22_ = summarized_topic;
				_tmp23_ = dino_ui_util_parse_add_markup (_tmp22_, NULL, TRUE, TRUE);
				_tmp24_ = _tmp23_;
				dino_ui_conversation_view_controller_set_conversation_topic (self, _tmp24_);
				_g_free0 (_tmp24_);
				_g_free0 (summarized_topic);
			} else {
				dino_ui_conversation_view_controller_set_conversation_topic (self, NULL);
			}
			_g_free0 (subject);
		} else {
			dino_ui_conversation_view_controller_set_conversation_topic (self, NULL);
		}
	}
}

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

static void
dino_ui_conversation_view_controller_on_clipboard_paste (DinoUiConversationViewController* self,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_)
{
	DinoUiConversationViewControllerOnClipboardPasteData* _data_;
	DinoUiConversationViewController* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DinoUiConversationViewControllerOnClipboardPasteData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dino_ui_conversation_view_controller_on_clipboard_paste_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dino_ui_conversation_view_controller_on_clipboard_paste_co (_data_);
}

static void
dino_ui_conversation_view_controller_on_clipboard_paste_finish (DinoUiConversationViewController* self,
                                                                GAsyncResult* _res_)
{
	DinoUiConversationViewControllerOnClipboardPasteData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dino_ui_conversation_view_controller_on_clipboard_paste_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_data_)
{
	DinoUiConversationViewControllerOnClipboardPasteData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dino_ui_conversation_view_controller_on_clipboard_paste_co (_data_);
}

static gboolean
dino_ui_conversation_view_controller_on_clipboard_paste_co (DinoUiConversationViewControllerOnClipboardPasteData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->view;
		_data_->_tmp1_ = gtk_widget_get_clipboard ((GtkWidget*) _data_->_tmp0_);
		_data_->_tmp2_ = _g_object_ref0 (_data_->_tmp1_);
		_data_->clipboard = _data_->_tmp2_;
		_data_->_state_ = 1;
		gdk_clipboard_read_texture_async (_data_->clipboard, NULL, dino_ui_conversation_view_controller_on_clipboard_paste_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp3_ = gdk_clipboard_read_texture_finish (_data_->clipboard, _data_->_res_, &_data_->_inner_error0_);
		_data_->texture = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->clipboard);
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
				goto __catch0_g_io_error_not_supported;
			}
			goto __finally0;
		}
		_data_->_tmp4_ = dino_file_manager_get_storage_dir ();
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_tmp6_ = xmpp_random_uuid ();
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp8_ = g_strconcat (_data_->_tmp7_, ".png", NULL);
		_data_->_tmp9_ = _data_->_tmp8_;
		_data_->_tmp10_ = g_build_filename (_data_->_tmp5_, _data_->_tmp9_, NULL);
		_data_->_tmp11_ = _data_->_tmp10_;
		_g_free0 (_data_->_tmp9_);
		_g_free0 (_data_->_tmp7_);
		_g_free0 (_data_->_tmp5_);
		_data_->file_name = _data_->_tmp11_;
		_data_->_tmp12_ = _data_->file_name;
		gdk_texture_save_to_png (_data_->texture, _data_->_tmp12_);
		_data_->_tmp13_ = _data_->file_name;
		_data_->_tmp14_ = g_file_new_for_path (_data_->_tmp13_);
		_data_->_tmp15_ = _data_->_tmp14_;
		dino_ui_conversation_view_controller_open_send_file_overlay (_data_->self, _data_->_tmp15_);
		_g_object_unref0 (_data_->_tmp15_);
		_g_free0 (_data_->file_name);
		_g_object_unref0 (_data_->texture);
		_g_object_unref0 (_data_->clipboard);
	}
	goto __finally0;
	__catch0_g_io_error_not_supported:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static gboolean
dino_ui_conversation_view_controller_on_drag_data_received (DinoUiConversationViewController* self,
                                                            GtkDropTarget* target,
                                                            GValue* val,
                                                            gdouble x,
                                                            gdouble y)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (target != NULL, FALSE);
	g_return_val_if_fail (val != NULL, FALSE);
	if (G_VALUE_TYPE (val) == g_file_get_type ()) {
		GValue _tmp0_;
		_tmp0_ = *val;
		dino_ui_conversation_view_controller_open_send_file_overlay (self, g_value_get_object (&_tmp0_));
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}

static Block57Data*
block57_data_ref (Block57Data* _data57_)
{
	g_atomic_int_inc (&_data57_->_ref_count_);
	return _data57_;
}

static void
block57_data_unref (void * _userdata_)
{
	Block57Data* _data57_;
	_data57_ = (Block57Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data57_->_ref_count_)) {
		DinoUiConversationViewController* self;
		self = _data57_->self;
		_g_object_unref0 (_data57_->chooser);
		_g_object_unref0 (self);
		g_slice_free (Block57Data, _data57_);
	}
}

static void
__lambda200_ (Block57Data* _data57_,
              gint response)
{
	DinoUiConversationViewController* self;
	self = _data57_->self;
	if (response == ((gint) GTK_RESPONSE_ACCEPT)) {
		GFile* _tmp0_;
		GFile* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		GFile* _tmp4_;
		GFile* _tmp5_;
		_tmp0_ = gtk_file_chooser_get_file ((GtkFileChooser*) _data57_->chooser);
		_tmp1_ = _tmp0_;
		_tmp2_ = g_file_get_path (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_file_new_for_path (_tmp3_);
		_tmp5_ = _tmp4_;
		dino_ui_conversation_view_controller_open_send_file_overlay (self, _tmp5_);
		_g_object_unref0 (_tmp5_);
		_g_free0 (_tmp3_);
		_g_object_unref0 (_tmp1_);
	}
}

static void
___lambda200__gtk_native_dialog_response (GtkNativeDialog* _sender,
                                          gint response_id,
                                          gpointer self)
{
	__lambda200_ (self, response_id);
}

static void
dino_ui_conversation_view_controller_open_file_picker (DinoUiConversationViewController* self)
{
	Block57Data* _data57_;
	const gchar* _tmp0_;
	DinoUiConversationView* _tmp1_;
	GtkRoot* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GtkFileChooserNative* _tmp5_;
	g_return_if_fail (self != NULL);
	_data57_ = g_slice_new0 (Block57Data);
	_data57_->_ref_count_ = 1;
	_data57_->self = g_object_ref (self);
	_tmp0_ = dino_gettext ("Select file");
	_tmp1_ = self->priv->view;
	_tmp2_ = gtk_widget_get_root ((GtkWidget*) _tmp1_);
	_tmp3_ = dino_gettext ("Select");
	_tmp4_ = dino_gettext ("Cancel");
	_tmp5_ = gtk_file_chooser_native_new (_tmp0_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp2_) : NULL, GTK_FILE_CHOOSER_ACTION_OPEN, _tmp3_, _tmp4_);
	_data57_->chooser = _tmp5_;
	g_signal_connect_data ((GtkNativeDialog*) _data57_->chooser, "response", (GCallback) ___lambda200__gtk_native_dialog_response, block57_data_ref (_data57_), (GClosureNotify) block57_data_unref, 0);
	gtk_native_dialog_show ((GtkNativeDialog*) _data57_->chooser);
	block57_data_unref (_data57_);
	_data57_ = NULL;
}

static Block58Data*
block58_data_ref (Block58Data* _data58_)
{
	g_atomic_int_inc (&_data58_->_ref_count_);
	return _data58_;
}

static void
block58_data_unref (void * _userdata_)
{
	Block58Data* _data58_;
	_data58_ = (Block58Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data58_->_ref_count_)) {
		DinoUiConversationViewController* self;
		self = _data58_->self;
		_g_object_unref0 (_data58_->overlay);
		_g_object_unref0 (_data58_->file_info);
		_g_object_unref0 (_data58_->file);
		_g_object_unref0 (self);
		g_slice_free (Block58Data, _data58_);
	}
}

static void
__lambda205_ (Block58Data* _data58_)
{
	DinoUiConversationViewController* self;
	self = _data58_->self;
	dino_ui_conversation_view_controller_send_file (self, _data58_->file);
}

static void
___lambda205__dino_ui_file_send_overlay_send_file (DinoUiFileSendOverlay* _sender,
                                                   gpointer self)
{
	__lambda205_ (self);
}

static void
__lambda206_ (Block58Data* _data58_,
              GObject* _,
              GAsyncResult* res)
{
	DinoUiConversationViewController* self;
	GeeHashMap* limits = NULL;
	DinoStreamInteractor* _tmp0_;
	DinoModuleIdentity* _tmp1_;
	gpointer _tmp2_;
	DinoFileManager* _tmp3_;
	GeeHashMap* _tmp4_;
	GeeHashMap* _tmp5_;
	gboolean something_works = FALSE;
	gboolean _tmp16_ = FALSE;
	self = _data58_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->stream_interactor;
	_tmp1_ = dino_file_manager_IDENTITY;
	_tmp2_ = dino_stream_interactor_get_module (_tmp0_, DINO_TYPE_FILE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
	_tmp3_ = (DinoFileManager*) _tmp2_;
	_tmp4_ = dino_file_manager_get_file_size_limits_finish (_tmp3_, res);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp3_);
	limits = _tmp5_;
	something_works = FALSE;
	{
		GeeIterator* _limit_it = NULL;
		GeeHashMap* _tmp6_;
		GeeCollection* _tmp7_;
		GeeCollection* _tmp8_;
		GeeCollection* _tmp9_;
		GeeIterator* _tmp10_;
		GeeIterator* _tmp11_;
		_tmp6_ = limits;
		_tmp7_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = _tmp8_;
		_tmp10_ = gee_iterable_iterator ((GeeIterable*) _tmp9_);
		_tmp11_ = _tmp10_;
		_g_object_unref0 (_tmp9_);
		_limit_it = _tmp11_;
		while (TRUE) {
			GeeIterator* _tmp12_;
			glong limit = 0L;
			GeeIterator* _tmp13_;
			gpointer _tmp14_;
			GFileInfo* _tmp15_;
			_tmp12_ = _limit_it;
			if (!gee_iterator_next (_tmp12_)) {
				break;
			}
			_tmp13_ = _limit_it;
			_tmp14_ = gee_iterator_get (_tmp13_);
			limit = (glong) ((gintptr) _tmp14_);
			_tmp15_ = _data58_->file_info;
			if (((gint64) limit) >= g_file_info_get_size (_tmp15_)) {
				something_works = TRUE;
			}
		}
		_g_object_unref0 (_limit_it);
	}
	if (!something_works) {
		GeeHashMap* _tmp17_;
		_tmp17_ = limits;
		_tmp16_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp17_, (gpointer) ((gintptr) 0));
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		gboolean _tmp18_ = FALSE;
		gboolean _tmp19_ = FALSE;
		if (!something_works) {
			GFileInfo* _tmp20_;
			GeeHashMap* _tmp21_;
			gpointer _tmp22_;
			_tmp20_ = _data58_->file_info;
			_tmp21_ = limits;
			_tmp22_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp21_, (gpointer) ((gintptr) 0));
			_tmp19_ = g_file_info_get_size (_tmp20_) > ((gint64) ((glong) ((gintptr) _tmp22_)));
		} else {
			_tmp19_ = FALSE;
		}
		if (_tmp19_) {
			DinoUiFileSendOverlay* _tmp23_;
			_tmp23_ = _data58_->overlay;
			_tmp18_ = _tmp23_ != NULL;
		} else {
			_tmp18_ = FALSE;
		}
		if (_tmp18_) {
			DinoUiFileSendOverlay* _tmp24_;
			_tmp24_ = _data58_->overlay;
			dino_ui_file_send_overlay_set_file_too_large (_tmp24_);
		}
	}
	_g_object_unref0 (limits);
}

static void
___lambda206__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda206_ (self, source_object, res);
	block58_data_unref (self);
}

static void
__lambda207_ (Block58Data* _data58_)
{
	DinoUiConversationViewController* self;
	DinoUiConversationView* _tmp0_;
	self = _data58_->self;
	_tmp0_ = self->priv->view;
	dino_ui_conversation_view_remove_overlay_dialog (_tmp0_);
	_g_object_unref0 (self->priv->overlay_dialog);
	self->priv->overlay_dialog = NULL;
	dino_ui_conversation_view_controller_update_file_upload_status (self, NULL, NULL);
	_g_object_unref0 (_data58_->overlay);
	_data58_->overlay = NULL;
}

static void
___lambda207__dino_ui_file_send_overlay_close (DinoUiFileSendOverlay* _sender,
                                               gpointer self)
{
	__lambda207_ (self);
}

static void
dino_ui_conversation_view_controller_open_send_file_overlay (DinoUiConversationViewController* self,
                                                             GFile* file)
{
	Block58Data* _data58_;
	GFile* _tmp0_;
	GFileInfo* _tmp4_;
	DinoUiFileSendOverlay* _tmp5_;
	DinoUiFileSendOverlay* _tmp6_;
	DinoStreamInteractor* _tmp7_;
	DinoModuleIdentity* _tmp8_;
	gpointer _tmp9_;
	DinoFileManager* _tmp10_;
	DinoEntitiesConversation* _tmp11_;
	DinoUiFileSendOverlay* _tmp12_;
	DinoUiConversationView* _tmp13_;
	DinoUiFileSendOverlay* _tmp14_;
	GtkWidget* _tmp15_;
	GtkWidget* _tmp16_;
	DinoUiFileSendOverlay* _tmp17_;
	GtkWidget* _tmp18_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_data58_ = g_slice_new0 (Block58Data);
	_data58_->_ref_count_ = 1;
	_data58_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (file);
	_g_object_unref0 (_data58_->file);
	_data58_->file = _tmp0_;
	{
		GFileInfo* _tmp1_ = NULL;
		GFileInfo* _tmp2_;
		GFileInfo* _tmp3_;
		_tmp2_ = g_file_query_info (_data58_->file, "*", G_FILE_QUERY_INFO_NONE, NULL, &_inner_error0_);
		_tmp1_ = _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp3_ = _tmp1_;
		_tmp1_ = NULL;
		_g_object_unref0 (_data58_->file_info);
		_data58_->file_info = _tmp3_;
		_g_object_unref0 (_tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		block58_data_unref (_data58_);
		_data58_ = NULL;
		return;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		block58_data_unref (_data58_);
		_data58_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_tmp4_ = _data58_->file_info;
	_tmp5_ = dino_ui_file_send_overlay_new (_data58_->file, _tmp4_);
	_data58_->overlay = _tmp5_;
	_tmp6_ = _data58_->overlay;
	g_signal_connect_data (_tmp6_, "send-file", (GCallback) ___lambda205__dino_ui_file_send_overlay_send_file, block58_data_ref (_data58_), (GClosureNotify) block58_data_unref, 0);
	_tmp7_ = self->priv->stream_interactor;
	_tmp8_ = dino_file_manager_IDENTITY;
	_tmp9_ = dino_stream_interactor_get_module (_tmp7_, DINO_TYPE_FILE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp8_);
	_tmp10_ = (DinoFileManager*) _tmp9_;
	_tmp11_ = self->priv->conversation;
	dino_file_manager_get_file_size_limits (_tmp10_, _tmp11_, ___lambda206__gasync_ready_callback, block58_data_ref (_data58_));
	_g_object_unref0 (_tmp10_);
	_tmp12_ = _data58_->overlay;
	g_signal_connect_data (_tmp12_, "close", (GCallback) ___lambda207__dino_ui_file_send_overlay_close, block58_data_ref (_data58_), (GClosureNotify) block58_data_unref, 0);
	_tmp13_ = self->priv->view;
	_tmp14_ = _data58_->overlay;
	_tmp15_ = dino_ui_file_send_overlay_get_widget (_tmp14_);
	_tmp16_ = _tmp15_;
	dino_ui_conversation_view_add_overlay_dialog (_tmp13_, _tmp16_);
	_g_object_unref0 (_tmp16_);
	_tmp17_ = _data58_->overlay;
	_tmp18_ = dino_ui_file_send_overlay_get_widget (_tmp17_);
	_g_object_unref0 (self->priv->overlay_dialog);
	self->priv->overlay_dialog = _tmp18_;
	dino_ui_conversation_view_controller_update_file_upload_status (self, NULL, NULL);
	block58_data_unref (_data58_);
	_data58_ = NULL;
}

static void
dino_ui_conversation_view_controller_send_file (DinoUiConversationViewController* self,
                                                GFile* file)
{
	DinoStreamInteractor* _tmp0_;
	DinoModuleIdentity* _tmp1_;
	gpointer _tmp2_;
	DinoFileManager* _tmp3_;
	DinoEntitiesConversation* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = self->priv->stream_interactor;
	_tmp1_ = dino_file_manager_IDENTITY;
	_tmp2_ = dino_stream_interactor_get_module (_tmp0_, DINO_TYPE_FILE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
	_tmp3_ = (DinoFileManager*) _tmp2_;
	_tmp4_ = self->priv->conversation;
	dino_file_manager_send_file (_tmp3_, file, _tmp4_, NULL, NULL);
	_g_object_unref0 (_tmp3_);
}

static gboolean
dino_ui_conversation_view_controller_forward_key_press_to_chat_input (DinoUiConversationViewController* self,
                                                                      GtkEventControllerKey* key_controller,
                                                                      guint keyval,
                                                                      guint keycode,
                                                                      GdkModifierType state)
{
	DinoUiConversationView* _tmp0_;
	GtkRoot* _tmp1_;
	GtkWidget* _tmp2_;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	DinoUiConversationView* _tmp6_;
	DinoUiChatInputView* _tmp7_;
	DinoUiChatTextView* _tmp8_;
	GtkTextView* _tmp9_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (key_controller != NULL, FALSE);
	_tmp0_ = self->priv->view;
	_tmp1_ = gtk_widget_get_root ((GtkWidget*) _tmp0_);
	_tmp2_ = gtk_root_get_focus (_tmp1_);
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_text_view_get_type ())) {
		result = FALSE;
		return result;
	}
	if (keyval == GDK_KEY_Control_L) {
		_tmp5_ = TRUE;
	} else {
		_tmp5_ = keyval == GDK_KEY_Control_R;
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		_tmp4_ = keyval == GDK_KEY_Alt_L;
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = keyval == GDK_KEY_Alt_R;
	}
	if (_tmp3_) {
		result = FALSE;
		return result;
	}
	if ((state & GDK_CONTROL_MASK) > 0) {
		result = FALSE;
		return result;
	}
	_tmp6_ = self->priv->view;
	_tmp7_ = _tmp6_->chat_input;
	_tmp8_ = _tmp7_->chat_text_view;
	_tmp9_ = _tmp8_->text_view;
	result = gtk_event_controller_key_forward (key_controller, (GtkWidget*) _tmp9_);
	return result;
}

const gchar*
dino_ui_conversation_view_controller_get_conversation_display_name (DinoUiConversationViewController* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_conversation_display_name;
	result = _tmp0_;
	return result;
}

void
dino_ui_conversation_view_controller_set_conversation_display_name (DinoUiConversationViewController* self,
                                                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_conversation_view_controller_get_conversation_display_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_conversation_display_name);
		self->priv->_conversation_display_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_conversation_view_controller_properties[DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_DISPLAY_NAME_PROPERTY]);
	}
}

const gchar*
dino_ui_conversation_view_controller_get_conversation_topic (DinoUiConversationViewController* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_conversation_topic;
	result = _tmp0_;
	return result;
}

void
dino_ui_conversation_view_controller_set_conversation_topic (DinoUiConversationViewController* self,
                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_conversation_view_controller_get_conversation_topic (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_conversation_topic);
		self->priv->_conversation_topic = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_conversation_view_controller_properties[DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_TOPIC_PROPERTY]);
	}
}

static void
dino_ui_conversation_view_controller_class_init (DinoUiConversationViewControllerClass * klass,
                                                 gpointer klass_data)
{
	dino_ui_conversation_view_controller_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiConversationViewController_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_conversation_view_controller_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_conversation_view_controller_set_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_conversation_view_controller_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_DISPLAY_NAME_PROPERTY, dino_ui_conversation_view_controller_properties[DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_DISPLAY_NAME_PROPERTY] = g_param_spec_string ("conversation-display-name", "conversation-display-name", "conversation-display-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_TOPIC_PROPERTY, dino_ui_conversation_view_controller_properties[DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_TOPIC_PROPERTY] = g_param_spec_string ("conversation-topic", "conversation-topic", "conversation-topic", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
dino_ui_conversation_view_controller_instance_init (DinoUiConversationViewController * self,
                                                    gpointer klass)
{
	DinoUiSearchMenuEntry* _tmp0_;
	GtkListView* _tmp1_;
	GtkDropTarget* _tmp2_;
	self->priv = dino_ui_conversation_view_controller_get_instance_private (self);
	_tmp0_ = dino_ui_search_menu_entry_new ();
	self->search_menu_entry = _tmp0_;
	_tmp1_ = (GtkListView*) gtk_list_view_new (NULL, NULL);
	g_object_ref_sink (_tmp1_);
	self->list_view = _tmp1_;
	_tmp2_ = gtk_drop_target_new (g_file_get_type (), GDK_ACTION_COPY);
	self->priv->drop_event_controller = _tmp2_;
}

static void
dino_ui_conversation_view_controller_finalize (GObject * obj)
{
	DinoUiConversationViewController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_CONVERSATION_VIEW_CONTROLLER, DinoUiConversationViewController);
	_g_free0 (self->priv->_conversation_display_name);
	_g_free0 (self->priv->_conversation_topic);
	_g_object_unref0 (self->priv->app);
	_g_object_unref0 (self->priv->view);
	_g_object_unref0 (self->priv->overlay_dialog);
	_g_object_unref0 (self->priv->titlebar);
	_g_object_unref0 (self->search_menu_entry);
	_g_object_unref0 (self->list_view);
	_g_object_unref0 (self->priv->drop_event_controller);
	_g_object_unref0 (self->priv->chat_input_controller);
	_g_object_unref0 (self->priv->stream_interactor);
	_g_object_unref0 (self->priv->conversation);
	G_OBJECT_CLASS (dino_ui_conversation_view_controller_parent_class)->finalize (obj);
}

static GType
dino_ui_conversation_view_controller_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiConversationViewControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_conversation_view_controller_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiConversationViewController), 0, (GInstanceInitFunc) dino_ui_conversation_view_controller_instance_init, NULL };
	GType dino_ui_conversation_view_controller_type_id;
	dino_ui_conversation_view_controller_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoUiConversationViewController", &g_define_type_info, 0);
	DinoUiConversationViewController_private_offset = g_type_add_instance_private (dino_ui_conversation_view_controller_type_id, sizeof (DinoUiConversationViewControllerPrivate));
	return dino_ui_conversation_view_controller_type_id;
}

GType
dino_ui_conversation_view_controller_get_type (void)
{
	static volatile gsize dino_ui_conversation_view_controller_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_conversation_view_controller_type_id__once)) {
		GType dino_ui_conversation_view_controller_type_id;
		dino_ui_conversation_view_controller_type_id = dino_ui_conversation_view_controller_get_type_once ();
		g_once_init_leave (&dino_ui_conversation_view_controller_type_id__once, dino_ui_conversation_view_controller_type_id);
	}
	return dino_ui_conversation_view_controller_type_id__once;
}

static void
_vala_dino_ui_conversation_view_controller_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec)
{
	DinoUiConversationViewController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_CONVERSATION_VIEW_CONTROLLER, DinoUiConversationViewController);
	switch (property_id) {
		case DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_DISPLAY_NAME_PROPERTY:
		g_value_set_string (value, dino_ui_conversation_view_controller_get_conversation_display_name (self));
		break;
		case DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_TOPIC_PROPERTY:
		g_value_set_string (value, dino_ui_conversation_view_controller_get_conversation_topic (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_conversation_view_controller_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec)
{
	DinoUiConversationViewController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_CONVERSATION_VIEW_CONTROLLER, DinoUiConversationViewController);
	switch (property_id) {
		case DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_DISPLAY_NAME_PROPERTY:
		dino_ui_conversation_view_controller_set_conversation_display_name (self, g_value_get_string (value));
		break;
		case DINO_UI_CONVERSATION_VIEW_CONTROLLER_CONVERSATION_TOPIC_PROPERTY:
		dino_ui_conversation_view_controller_set_conversation_topic (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

