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

#include <gtk/gtk.h>
#include <glib-object.h>
#include "libdino.h"
#include <glib.h>
#include "dino_i18n.h"
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include "xmpp-vala.h"
#include <float.h>
#include <math.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define DINO_UI_TYPE_ADD_CONFERENCE_DIALOG (dino_ui_add_conference_dialog_get_type ())
#define DINO_UI_ADD_CONFERENCE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_ADD_CONFERENCE_DIALOG, DinoUiAddConferenceDialog))
#define DINO_UI_ADD_CONFERENCE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_ADD_CONFERENCE_DIALOG, DinoUiAddConferenceDialogClass))
#define DINO_UI_IS_ADD_CONFERENCE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_ADD_CONFERENCE_DIALOG))
#define DINO_UI_IS_ADD_CONFERENCE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_ADD_CONFERENCE_DIALOG))
#define DINO_UI_ADD_CONFERENCE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_ADD_CONFERENCE_DIALOG, DinoUiAddConferenceDialogClass))

typedef struct _DinoUiAddConferenceDialog DinoUiAddConferenceDialog;
typedef struct _DinoUiAddConferenceDialogClass DinoUiAddConferenceDialogClass;
typedef struct _DinoUiAddConferenceDialogPrivate DinoUiAddConferenceDialogPrivate;

#define DINO_UI_TYPE_SELECT_JID_FRAGMENT (dino_ui_select_jid_fragment_get_type ())
#define DINO_UI_SELECT_JID_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_SELECT_JID_FRAGMENT, DinoUiSelectJidFragment))
#define DINO_UI_SELECT_JID_FRAGMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_SELECT_JID_FRAGMENT, DinoUiSelectJidFragmentClass))
#define DINO_UI_IS_SELECT_JID_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_SELECT_JID_FRAGMENT))
#define DINO_UI_IS_SELECT_JID_FRAGMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_SELECT_JID_FRAGMENT))
#define DINO_UI_SELECT_JID_FRAGMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_SELECT_JID_FRAGMENT, DinoUiSelectJidFragmentClass))

typedef struct _DinoUiSelectJidFragment DinoUiSelectJidFragment;
typedef struct _DinoUiSelectJidFragmentClass DinoUiSelectJidFragmentClass;

#define DINO_UI_TYPE_CONFERENCE_DETAILS_FRAGMENT (dino_ui_conference_details_fragment_get_type ())
#define DINO_UI_CONFERENCE_DETAILS_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONFERENCE_DETAILS_FRAGMENT, DinoUiConferenceDetailsFragment))
#define DINO_UI_CONFERENCE_DETAILS_FRAGMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONFERENCE_DETAILS_FRAGMENT, DinoUiConferenceDetailsFragmentClass))
#define DINO_UI_IS_CONFERENCE_DETAILS_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONFERENCE_DETAILS_FRAGMENT))
#define DINO_UI_IS_CONFERENCE_DETAILS_FRAGMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONFERENCE_DETAILS_FRAGMENT))
#define DINO_UI_CONFERENCE_DETAILS_FRAGMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONFERENCE_DETAILS_FRAGMENT, DinoUiConferenceDetailsFragmentClass))

typedef struct _DinoUiConferenceDetailsFragment DinoUiConferenceDetailsFragment;
typedef struct _DinoUiConferenceDetailsFragmentClass DinoUiConferenceDetailsFragmentClass;

#define DINO_UI_TYPE_CONFERENCE_LIST (dino_ui_conference_list_get_type ())
#define DINO_UI_CONFERENCE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONFERENCE_LIST, DinoUiConferenceList))
#define DINO_UI_CONFERENCE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONFERENCE_LIST, DinoUiConferenceListClass))
#define DINO_UI_IS_CONFERENCE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONFERENCE_LIST))
#define DINO_UI_IS_CONFERENCE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONFERENCE_LIST))
#define DINO_UI_CONFERENCE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONFERENCE_LIST, DinoUiConferenceListClass))

typedef struct _DinoUiConferenceList DinoUiConferenceList;
typedef struct _DinoUiConferenceListClass DinoUiConferenceListClass;
enum  {
	DINO_UI_ADD_CONFERENCE_DIALOG_0_PROPERTY,
	DINO_UI_ADD_CONFERENCE_DIALOG_NUM_PROPERTIES
};
static GParamSpec* dino_ui_add_conference_dialog_properties[DINO_UI_ADD_CONFERENCE_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _dino_ui_conference_list_unref0(var) ((var == NULL) ? NULL : (var = (dino_ui_conference_list_unref (var), NULL)))

#define DINO_UI_TYPE_ADD_GROUPCHAT_DIALOG (dino_ui_add_groupchat_dialog_get_type ())
#define DINO_UI_ADD_GROUPCHAT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_ADD_GROUPCHAT_DIALOG, DinoUiAddGroupchatDialog))
#define DINO_UI_ADD_GROUPCHAT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_ADD_GROUPCHAT_DIALOG, DinoUiAddGroupchatDialogClass))
#define DINO_UI_IS_ADD_GROUPCHAT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_ADD_GROUPCHAT_DIALOG))
#define DINO_UI_IS_ADD_GROUPCHAT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_ADD_GROUPCHAT_DIALOG))
#define DINO_UI_ADD_GROUPCHAT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_ADD_GROUPCHAT_DIALOG, DinoUiAddGroupchatDialogClass))

typedef struct _DinoUiAddGroupchatDialog DinoUiAddGroupchatDialog;
typedef struct _DinoUiAddGroupchatDialogClass DinoUiAddGroupchatDialogClass;

#define DINO_UI_TYPE_LIST_ROW (dino_ui_list_row_get_type ())
#define DINO_UI_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_LIST_ROW, DinoUiListRow))
#define DINO_UI_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_LIST_ROW, DinoUiListRowClass))
#define DINO_UI_IS_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_LIST_ROW))
#define DINO_UI_IS_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_LIST_ROW))
#define DINO_UI_LIST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_LIST_ROW, DinoUiListRowClass))

typedef struct _DinoUiListRow DinoUiListRow;
typedef struct _DinoUiListRowClass DinoUiListRowClass;

#define DINO_UI_TYPE_CONFERENCE_LIST_ROW (dino_ui_conference_list_row_get_type ())
#define DINO_UI_CONFERENCE_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONFERENCE_LIST_ROW, DinoUiConferenceListRow))
#define DINO_UI_CONFERENCE_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONFERENCE_LIST_ROW, DinoUiConferenceListRowClass))
#define DINO_UI_IS_CONFERENCE_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONFERENCE_LIST_ROW))
#define DINO_UI_IS_CONFERENCE_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONFERENCE_LIST_ROW))
#define DINO_UI_CONFERENCE_LIST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONFERENCE_LIST_ROW, DinoUiConferenceListRowClass))

typedef struct _DinoUiConferenceListRow DinoUiConferenceListRow;
typedef struct _DinoUiConferenceListRowClass DinoUiConferenceListRowClass;
typedef struct _DinoUiListRowPrivate DinoUiListRowPrivate;

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

typedef struct _DinoUiAvatarPicture DinoUiAvatarPicture;
typedef struct _DinoUiAvatarPictureClass DinoUiAvatarPictureClass;
typedef struct _DinoUiConferenceListRowPrivate DinoUiConferenceListRowPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block1Data Block1Data;
#define _g_timer_destroy0(var) ((var == NULL) ? NULL : (var = (g_timer_destroy (var), NULL)))

struct _DinoUiAddConferenceDialog {
	GtkDialog parent_instance;
	DinoUiAddConferenceDialogPrivate * priv;
};

struct _DinoUiAddConferenceDialogClass {
	GtkDialogClass parent_class;
};

struct _DinoUiAddConferenceDialogPrivate {
	GtkStack* stack;
	GtkButton* cancel_button;
	GtkButton* ok_button;
	DinoUiSelectJidFragment* select_fragment;
	DinoUiConferenceDetailsFragment* details_fragment;
	DinoUiConferenceList* conference_list;
	GtkListBox* conference_list_box;
	DinoStreamInteractor* stream_interactor;
};

struct _DinoUiListRow {
	GtkWidget parent_instance;
	DinoUiListRowPrivate * priv;
	GtkBox* outer_box;
	DinoUiAvatarPicture* picture;
	GtkLabel* name_label;
	GtkImage* status_dot;
	GtkLabel* via_label;
	DinoStreamInteractor* stream_interactor;
	XmppJid* jid;
	DinoEntitiesAccount* account;
};

struct _DinoUiListRowClass {
	GtkWidgetClass parent_class;
};

struct _DinoUiConferenceListRow {
	DinoUiListRow parent_instance;
	DinoUiConferenceListRowPrivate * priv;
	XmppConference* bookmark;
};

struct _DinoUiConferenceListRowClass {
	DinoUiListRowClass parent_class;
};

struct _Block1Data {
	int _ref_count_;
	DinoUiAddConferenceDialog* self;
	gint curr_height;
	gint difference;
	GTimer* timer;
};

static gint DinoUiAddConferenceDialog_private_offset;
static gpointer dino_ui_add_conference_dialog_parent_class = NULL;

VALA_EXTERN GType dino_ui_add_conference_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAddConferenceDialog, g_object_unref)
VALA_EXTERN GType dino_ui_select_jid_fragment_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiSelectJidFragment, g_object_unref)
VALA_EXTERN GType dino_ui_conference_details_fragment_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConferenceDetailsFragment, g_object_unref)
VALA_EXTERN gpointer dino_ui_conference_list_ref (gpointer instance);
VALA_EXTERN void dino_ui_conference_list_unref (gpointer instance);
VALA_EXTERN GParamSpec* dino_ui_param_spec_conference_list (const gchar* name,
                                                const gchar* nick,
                                                const gchar* blurb,
                                                GType object_type,
                                                GParamFlags flags);
VALA_EXTERN void dino_ui_value_set_conference_list (GValue* value,
                                        gpointer v_object);
VALA_EXTERN void dino_ui_value_take_conference_list (GValue* value,
                                         gpointer v_object);
VALA_EXTERN gpointer dino_ui_value_get_conference_list (const GValue* value);
VALA_EXTERN GType dino_ui_conference_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConferenceList, dino_ui_conference_list_unref)
VALA_EXTERN DinoUiAddConferenceDialog* dino_ui_add_conference_dialog_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiAddConferenceDialog* dino_ui_add_conference_dialog_construct (GType object_type,
                                                                    DinoStreamInteractor* stream_interactor);
static void dino_ui_add_conference_dialog_setup_headerbar (DinoUiAddConferenceDialog* self);
static void dino_ui_add_conference_dialog_setup_jid_add_view (DinoUiAddConferenceDialog* self);
static void dino_ui_add_conference_dialog_setup_conference_details_view (DinoUiAddConferenceDialog* self);
static void dino_ui_add_conference_dialog_show_jid_add_view (DinoUiAddConferenceDialog* self);
static void _dino_ui_add_conference_dialog_show_jid_add_view_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self);
static void dino_ui_add_conference_dialog_on_cancel (DinoUiAddConferenceDialog* self);
static void _dino_ui_add_conference_dialog_on_cancel_gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self);
VALA_EXTERN gboolean dino_ui_select_jid_fragment_get_done (DinoUiSelectJidFragment* self);
static void dino_ui_add_conference_dialog_on_next_button_clicked (DinoUiAddConferenceDialog* self);
static void _dino_ui_add_conference_dialog_on_next_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                               gpointer self);
VALA_EXTERN void dino_ui_conference_details_fragment_set_fragment_active (DinoUiConferenceDetailsFragment* self,
                                                              gboolean value);
static void dino_ui_add_conference_dialog_set_ok_sensitive_from_details (DinoUiAddConferenceDialog* self);
static void _dino_ui_add_conference_dialog_set_ok_sensitive_from_details_g_object_notify (GObject* _sender,
                                                                                   GParamSpec* pspec,
                                                                                   gpointer self);
static void dino_ui_add_conference_dialog_set_ok_sensitive_from_select (DinoUiAddConferenceDialog* self);
static void _dino_ui_add_conference_dialog_set_ok_sensitive_from_select_g_object_notify (GObject* _sender,
                                                                                  GParamSpec* pspec,
                                                                                  gpointer self);
static void dino_ui_add_conference_dialog_show_conference_details_view (DinoUiAddConferenceDialog* self);
VALA_EXTERN gboolean dino_ui_conference_details_fragment_get_done (DinoUiConferenceDetailsFragment* self);
static void dino_ui_add_conference_dialog_animate_window_resize (DinoUiAddConferenceDialog* self,
                                                          GtkWidget* widget);
VALA_EXTERN DinoUiConferenceList* dino_ui_conference_list_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConferenceList* dino_ui_conference_list_construct (GType object_type,
                                                         DinoStreamInteractor* stream_interactor);
VALA_EXTERN GtkListBox* dino_ui_conference_list_get_list_box (DinoUiConferenceList* self);
static void __lambda302_ (DinoUiAddConferenceDialog* self);
static void ___lambda302__gtk_list_box_row_activated (GtkListBox* _sender,
                                               GtkListBoxRow* row,
                                               gpointer self);
VALA_EXTERN DinoUiSelectJidFragment* dino_ui_select_jid_fragment_new (DinoStreamInteractor* stream_interactor,
                                                          GtkListBox* list,
                                                          GeeList* accounts);
VALA_EXTERN DinoUiSelectJidFragment* dino_ui_select_jid_fragment_construct (GType object_type,
                                                                DinoStreamInteractor* stream_interactor,
                                                                GtkListBox* list,
                                                                GeeList* accounts);
static void __lambda303_ (DinoUiAddConferenceDialog* self,
                   DinoUiSelectJidFragment* row);
VALA_EXTERN GType dino_ui_add_groupchat_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAddGroupchatDialog, g_object_unref)
VALA_EXTERN DinoUiAddGroupchatDialog* dino_ui_add_groupchat_dialog_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiAddGroupchatDialog* dino_ui_add_groupchat_dialog_construct (GType object_type,
                                                                  DinoStreamInteractor* stream_interactor);
static void ___lambda303__dino_ui_select_jid_fragment_add_jid (DinoUiSelectJidFragment* _sender,
                                                        gpointer self);
VALA_EXTERN GType dino_ui_list_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiListRow, g_object_unref)
static void __lambda305_ (DinoUiAddConferenceDialog* self,
                   DinoUiListRow* row);
VALA_EXTERN GType dino_ui_conference_list_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConferenceListRow, g_object_unref)
VALA_EXTERN GType dino_ui_avatar_picture_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAvatarPicture, g_object_unref)
static void ___lambda305__dino_ui_select_jid_fragment_remove_jid (DinoUiSelectJidFragment* _sender,
                                                           DinoUiListRow* row,
                                                           gpointer self);
VALA_EXTERN DinoUiConferenceDetailsFragment* dino_ui_conference_details_fragment_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConferenceDetailsFragment* dino_ui_conference_details_fragment_construct (GType object_type,
                                                                                DinoStreamInteractor* stream_interactor);
VALA_EXTERN void dino_ui_conference_details_fragment_set_ok_button (DinoUiConferenceDetailsFragment* self,
                                                        GtkButton* value);
static void __lambda306_ (DinoUiAddConferenceDialog* self);
static void ___lambda306__dino_ui_conference_details_fragment_joined (DinoUiConferenceDetailsFragment* _sender,
                                                               gpointer self);
VALA_EXTERN void dino_ui_conference_details_fragment_clear (DinoUiConferenceDetailsFragment* self);
VALA_EXTERN void dino_ui_conference_details_fragment_set_account (DinoUiConferenceDetailsFragment* self,
                                                      DinoEntitiesAccount* value);
VALA_EXTERN void dino_ui_conference_details_fragment_set_jid (DinoUiConferenceDetailsFragment* self,
                                                  const gchar* value);
VALA_EXTERN void dino_ui_conference_details_fragment_set_nick (DinoUiConferenceDetailsFragment* self,
                                                   const gchar* value);
VALA_EXTERN void dino_ui_conference_details_fragment_set_password (DinoUiConferenceDetailsFragment* self,
                                                       const gchar* value);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static gboolean __lambda307_ (Block1Data* _data1_);
static gboolean ___lambda307__gsource_func (gpointer self);
static void dino_ui_add_conference_dialog_finalize (GObject * obj);
static GType dino_ui_add_conference_dialog_get_type_once (void);

static inline gpointer
dino_ui_add_conference_dialog_get_instance_private (DinoUiAddConferenceDialog* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiAddConferenceDialog_private_offset);
}

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

DinoUiAddConferenceDialog*
dino_ui_add_conference_dialog_construct (GType object_type,
                                         DinoStreamInteractor* stream_interactor)
{
	DinoUiAddConferenceDialog * self = NULL;
	const gchar* _tmp0_;
	DinoStreamInteractor* _tmp1_;
	GtkStack* _tmp2_;
	GtkStack* _tmp3_;
	GtkBox* _tmp4_;
	GtkStack* _tmp5_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	self = (DinoUiAddConferenceDialog*) g_object_new (object_type, "use-header-bar", 1, NULL);
	_tmp0_ = dino_gettext ("Join Channel");
	gtk_window_set_title ((GtkWindow*) self, _tmp0_);
	gtk_window_set_modal ((GtkWindow*) self, TRUE);
	g_object_set ((GtkWindow*) self, "default-width", 460, NULL);
	g_object_set ((GtkWindow*) self, "default-height", 550, NULL);
	_tmp1_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp1_;
	_tmp2_ = self->priv->stack;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, TRUE);
	_tmp3_ = self->priv->stack;
	gtk_stack_set_vhomogeneous (_tmp3_, FALSE);
	_tmp4_ = gtk_dialog_get_content_area ((GtkDialog*) self);
	_tmp5_ = self->priv->stack;
	gtk_box_append (_tmp4_, (GtkWidget*) _tmp5_);
	dino_ui_add_conference_dialog_setup_headerbar (self);
	dino_ui_add_conference_dialog_setup_jid_add_view (self);
	dino_ui_add_conference_dialog_setup_conference_details_view (self);
	dino_ui_add_conference_dialog_show_jid_add_view (self);
	return self;
}

DinoUiAddConferenceDialog*
dino_ui_add_conference_dialog_new (DinoStreamInteractor* stream_interactor)
{
	return dino_ui_add_conference_dialog_construct (DINO_UI_TYPE_ADD_CONFERENCE_DIALOG, stream_interactor);
}

static void
_dino_ui_add_conference_dialog_show_jid_add_view_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self)
{
	dino_ui_add_conference_dialog_show_jid_add_view ((DinoUiAddConferenceDialog*) self);
}

static void
_dino_ui_add_conference_dialog_on_cancel_gtk_button_clicked (GtkButton* _sender,
                                                             gpointer self)
{
	dino_ui_add_conference_dialog_on_cancel ((DinoUiAddConferenceDialog*) self);
}

static void
_dino_ui_add_conference_dialog_on_next_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self)
{
	dino_ui_add_conference_dialog_on_next_button_clicked ((DinoUiAddConferenceDialog*) self);
}

static void
_dino_ui_add_conference_dialog_set_ok_sensitive_from_details_g_object_notify (GObject* _sender,
                                                                              GParamSpec* pspec,
                                                                              gpointer self)
{
	dino_ui_add_conference_dialog_set_ok_sensitive_from_details ((DinoUiAddConferenceDialog*) self);
}

static void
_dino_ui_add_conference_dialog_set_ok_sensitive_from_select_g_object_notify (GObject* _sender,
                                                                             GParamSpec* pspec,
                                                                             gpointer self)
{
	dino_ui_add_conference_dialog_set_ok_sensitive_from_select ((DinoUiAddConferenceDialog*) self);
}

static void
dino_ui_add_conference_dialog_show_jid_add_view (DinoUiAddConferenceDialog* self)
{
	GtkButton* _tmp0_;
	const gchar* _tmp1_;
	GtkButton* _tmp2_;
	guint _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	const gchar* _tmp6_;
	GtkButton* _tmp7_;
	DinoUiSelectJidFragment* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	GtkButton* _tmp11_;
	DinoUiConferenceDetailsFragment* _tmp12_;
	DinoUiConferenceDetailsFragment* _tmp13_;
	guint _tmp14_;
	GQuark _tmp15_;
	DinoUiSelectJidFragment* _tmp16_;
	GtkStack* _tmp17_;
	GtkStack* _tmp18_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->cancel_button;
	_tmp1_ = dino_gettext ("Cancel");
	gtk_button_set_label (_tmp0_, _tmp1_);
	_tmp2_ = self->priv->cancel_button;
	g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _dino_ui_add_conference_dialog_show_jid_add_view_gtk_button_clicked, self);
	_tmp4_ = self->priv->cancel_button;
	g_signal_connect_object (_tmp4_, "clicked", (GCallback) _dino_ui_add_conference_dialog_on_cancel_gtk_button_clicked, self, 0);
	_tmp5_ = self->priv->ok_button;
	_tmp6_ = dino_gettext ("Next");
	gtk_button_set_label (_tmp5_, _tmp6_);
	_tmp7_ = self->priv->ok_button;
	_tmp8_ = self->priv->select_fragment;
	_tmp9_ = dino_ui_select_jid_fragment_get_done (_tmp8_);
	_tmp10_ = _tmp9_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp7_, _tmp10_);
	_tmp11_ = self->priv->ok_button;
	g_signal_connect_object (_tmp11_, "clicked", (GCallback) _dino_ui_add_conference_dialog_on_next_button_clicked_gtk_button_clicked, self, 0);
	_tmp12_ = self->priv->details_fragment;
	dino_ui_conference_details_fragment_set_fragment_active (_tmp12_, FALSE);
	_tmp13_ = self->priv->details_fragment;
	g_signal_parse_name ("notify::done", G_TYPE_OBJECT, &_tmp14_, &_tmp15_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp13_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, _tmp15_, NULL, (GCallback) _dino_ui_add_conference_dialog_set_ok_sensitive_from_details_g_object_notify, self);
	_tmp16_ = self->priv->select_fragment;
	g_signal_connect_object ((GObject*) _tmp16_, "notify::done", (GCallback) _dino_ui_add_conference_dialog_set_ok_sensitive_from_select_g_object_notify, self, 0);
	_tmp17_ = self->priv->stack;
	gtk_stack_set_transition_type (_tmp17_, GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT);
	_tmp18_ = self->priv->stack;
	gtk_stack_set_visible_child_name (_tmp18_, "select");
}

static void
dino_ui_add_conference_dialog_show_conference_details_view (DinoUiAddConferenceDialog* self)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	guint _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	const gchar* _tmp5_;
	GtkButton* _tmp6_;
	DinoUiConferenceDetailsFragment* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	GtkButton* _tmp10_;
	guint _tmp11_;
	DinoUiConferenceDetailsFragment* _tmp12_;
	DinoUiSelectJidFragment* _tmp13_;
	guint _tmp14_;
	GQuark _tmp15_;
	DinoUiConferenceDetailsFragment* _tmp16_;
	GtkStack* _tmp17_;
	GtkStack* _tmp18_;
	DinoUiConferenceDetailsFragment* _tmp19_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->cancel_button;
	gtk_button_set_icon_name (_tmp0_, "go-previous-symbolic");
	_tmp1_ = self->priv->cancel_button;
	g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp2_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _dino_ui_add_conference_dialog_on_cancel_gtk_button_clicked, self);
	_tmp3_ = self->priv->cancel_button;
	g_signal_connect_object (_tmp3_, "clicked", (GCallback) _dino_ui_add_conference_dialog_show_jid_add_view_gtk_button_clicked, self, 0);
	_tmp4_ = self->priv->ok_button;
	_tmp5_ = dino_gettext ("Join");
	gtk_button_set_label (_tmp4_, _tmp5_);
	_tmp6_ = self->priv->ok_button;
	_tmp7_ = self->priv->details_fragment;
	_tmp8_ = dino_ui_conference_details_fragment_get_done (_tmp7_);
	_tmp9_ = _tmp8_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, _tmp9_);
	_tmp10_ = self->priv->ok_button;
	g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp11_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _dino_ui_add_conference_dialog_on_next_button_clicked_gtk_button_clicked, self);
	_tmp12_ = self->priv->details_fragment;
	dino_ui_conference_details_fragment_set_fragment_active (_tmp12_, TRUE);
	_tmp13_ = self->priv->select_fragment;
	g_signal_parse_name ("notify::done", G_TYPE_OBJECT, &_tmp14_, &_tmp15_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp13_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, _tmp15_, NULL, (GCallback) _dino_ui_add_conference_dialog_set_ok_sensitive_from_select_g_object_notify, self);
	_tmp16_ = self->priv->details_fragment;
	g_signal_connect_object ((GObject*) _tmp16_, "notify::done", (GCallback) _dino_ui_add_conference_dialog_set_ok_sensitive_from_details_g_object_notify, self, 0);
	_tmp17_ = self->priv->stack;
	gtk_stack_set_transition_type (_tmp17_, GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT);
	_tmp18_ = self->priv->stack;
	gtk_stack_set_visible_child_name (_tmp18_, "details");
	_tmp19_ = self->priv->details_fragment;
	dino_ui_add_conference_dialog_animate_window_resize (self, (GtkWidget*) _tmp19_);
}

static void
dino_ui_add_conference_dialog_setup_headerbar (DinoUiAddConferenceDialog* self)
{
	GtkButton* _tmp0_ = NULL;
	GtkButton* _tmp1_;
	GtkHeaderBar* header_bar = NULL;
	GtkHeaderBar* _tmp2_;
	GtkHeaderBar* _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_can_focus ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->ok_button);
	self->priv->ok_button = _tmp0_;
	_tmp1_ = self->priv->ok_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "suggested-action");
	_tmp2_ = gtk_dialog_get_header_bar ((GtkDialog*) self);
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_header_bar_get_type ()) ? ((GtkHeaderBar*) _tmp2_) : NULL);
	header_bar = _tmp3_;
	gtk_header_bar_set_show_title_buttons (header_bar, FALSE);
	_tmp4_ = self->priv->cancel_button;
	gtk_header_bar_pack_start (header_bar, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->ok_button;
	gtk_header_bar_pack_end (header_bar, (GtkWidget*) _tmp5_);
	_g_object_unref0 (header_bar);
}

static void
__lambda302_ (DinoUiAddConferenceDialog* self)
{
	GtkButton* _tmp0_;
	_tmp0_ = self->priv->ok_button;
	g_signal_emit_by_name (_tmp0_, "clicked");
}

static void
___lambda302__gtk_list_box_row_activated (GtkListBox* _sender,
                                          GtkListBoxRow* row,
                                          gpointer self)
{
	__lambda302_ ((DinoUiAddConferenceDialog*) self);
}

static void
__lambda303_ (DinoUiAddConferenceDialog* self,
              DinoUiSelectJidFragment* row)
{
	DinoUiAddGroupchatDialog* dialog = NULL;
	DinoStreamInteractor* _tmp0_;
	DinoUiAddGroupchatDialog* _tmp1_;
	g_return_if_fail (row != NULL);
	_tmp0_ = self->priv->stream_interactor;
	_tmp1_ = dino_ui_add_groupchat_dialog_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	dialog = _tmp1_;
	gtk_window_set_transient_for ((GtkWindow*) dialog, (GtkWindow*) self);
	gtk_window_present ((GtkWindow*) dialog);
	_g_object_unref0 (dialog);
}

static void
___lambda303__dino_ui_select_jid_fragment_add_jid (DinoUiSelectJidFragment* _sender,
                                                   gpointer self)
{
	__lambda303_ ((DinoUiAddConferenceDialog*) self, _sender);
}

static void
__lambda305_ (DinoUiAddConferenceDialog* self,
              DinoUiListRow* row)
{
	DinoUiConferenceListRow* conference_row = NULL;
	DinoUiConferenceListRow* _tmp0_;
	DinoUiConferenceListRow* _tmp1_;
	DinoStreamInteractor* _tmp2_;
	DinoModuleIdentity* _tmp3_;
	gpointer _tmp4_;
	DinoMucManager* _tmp5_;
	DinoUiConferenceListRow* _tmp6_;
	DinoEntitiesAccount* _tmp7_;
	DinoUiConferenceListRow* _tmp8_;
	XmppConference* _tmp9_;
	g_return_if_fail (row != NULL);
	_tmp0_ = _g_object_ref0 (DINO_UI_IS_CONFERENCE_LIST_ROW (row) ? ((DinoUiConferenceListRow*) row) : NULL);
	conference_row = _tmp0_;
	_tmp1_ = conference_row;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (conference_row);
		return;
	}
	_tmp2_ = self->priv->stream_interactor;
	_tmp3_ = dino_muc_manager_IDENTITY;
	_tmp4_ = dino_stream_interactor_get_module (_tmp2_, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp3_);
	_tmp5_ = (DinoMucManager*) _tmp4_;
	_tmp6_ = conference_row;
	_tmp7_ = ((DinoUiListRow*) _tmp6_)->account;
	_tmp8_ = conference_row;
	_tmp9_ = _tmp8_->bookmark;
	dino_muc_manager_remove_bookmark (_tmp5_, _tmp7_, _tmp9_);
	_g_object_unref0 (_tmp5_);
	_g_object_unref0 (conference_row);
}

static void
___lambda305__dino_ui_select_jid_fragment_remove_jid (DinoUiSelectJidFragment* _sender,
                                                      DinoUiListRow* row,
                                                      gpointer self)
{
	__lambda305_ ((DinoUiAddConferenceDialog*) self, row);
}

static void
dino_ui_add_conference_dialog_setup_jid_add_view (DinoUiAddConferenceDialog* self)
{
	DinoStreamInteractor* _tmp0_;
	DinoUiConferenceList* _tmp1_;
	DinoUiConferenceList* _tmp2_;
	GtkListBox* _tmp3_;
	GtkListBox* _tmp4_;
	DinoStreamInteractor* _tmp5_;
	GtkListBox* _tmp6_;
	DinoStreamInteractor* _tmp7_;
	GeeArrayList* _tmp8_;
	GeeArrayList* _tmp9_;
	DinoUiSelectJidFragment* _tmp10_;
	DinoUiSelectJidFragment* _tmp11_;
	DinoUiSelectJidFragment* _tmp12_;
	GtkBox* wrap_box = NULL;
	GtkBox* _tmp13_;
	DinoUiSelectJidFragment* _tmp14_;
	GtkStack* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stream_interactor;
	_tmp1_ = dino_ui_conference_list_new (_tmp0_);
	_dino_ui_conference_list_unref0 (self->priv->conference_list);
	self->priv->conference_list = _tmp1_;
	_tmp2_ = self->priv->conference_list;
	_tmp3_ = dino_ui_conference_list_get_list_box (_tmp2_);
	_g_object_unref0 (self->priv->conference_list_box);
	self->priv->conference_list_box = _tmp3_;
	_tmp4_ = self->priv->conference_list_box;
	g_signal_connect_object (_tmp4_, "row-activated", (GCallback) ___lambda302__gtk_list_box_row_activated, self, 0);
	_tmp5_ = self->priv->stream_interactor;
	_tmp6_ = self->priv->conference_list_box;
	_tmp7_ = self->priv->stream_interactor;
	_tmp8_ = dino_stream_interactor_get_accounts (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = dino_ui_select_jid_fragment_new (_tmp5_, _tmp6_, (GeeList*) _tmp9_);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->select_fragment);
	self->priv->select_fragment = _tmp10_;
	_g_object_unref0 (_tmp9_);
	_tmp11_ = self->priv->select_fragment;
	g_signal_connect_object (_tmp11_, "add-jid", (GCallback) ___lambda303__dino_ui_select_jid_fragment_add_jid, self, 0);
	_tmp12_ = self->priv->select_fragment;
	g_signal_connect_object (_tmp12_, "remove-jid", (GCallback) ___lambda305__dino_ui_select_jid_fragment_remove_jid, self, 0);
	_tmp13_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp13_);
	wrap_box = _tmp13_;
	_tmp14_ = self->priv->select_fragment;
	gtk_box_append (wrap_box, (GtkWidget*) _tmp14_);
	_tmp15_ = self->priv->stack;
	gtk_stack_add_named (_tmp15_, (GtkWidget*) wrap_box, "select");
	_g_object_unref0 (wrap_box);
}

static void
__lambda306_ (DinoUiAddConferenceDialog* self)
{
	g_signal_emit_by_name ((GtkDialog*) self, "close");
}

static void
___lambda306__dino_ui_conference_details_fragment_joined (DinoUiConferenceDetailsFragment* _sender,
                                                          gpointer self)
{
	__lambda306_ ((DinoUiAddConferenceDialog*) self);
}

static void
dino_ui_add_conference_dialog_setup_conference_details_view (DinoUiAddConferenceDialog* self)
{
	DinoStreamInteractor* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	DinoUiConferenceDetailsFragment* _tmp3_ = NULL;
	DinoUiConferenceDetailsFragment* _tmp4_;
	GtkBox* wrap_box = NULL;
	GtkBox* _tmp5_;
	DinoUiConferenceDetailsFragment* _tmp6_;
	GtkStack* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stream_interactor;
	_tmp1_ = self->priv->ok_button;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_tmp3_ = dino_ui_conference_details_fragment_new (_tmp0_);
	dino_ui_conference_details_fragment_set_ok_button (_tmp3_, _tmp2_);
	_g_object_unref0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->details_fragment);
	self->priv->details_fragment = _tmp3_;
	_tmp4_ = self->priv->details_fragment;
	g_signal_connect_object (_tmp4_, "joined", (GCallback) ___lambda306__dino_ui_conference_details_fragment_joined, self, 0);
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp5_);
	wrap_box = _tmp5_;
	_tmp6_ = self->priv->details_fragment;
	gtk_box_append (wrap_box, (GtkWidget*) _tmp6_);
	_tmp7_ = self->priv->stack;
	gtk_stack_add_named (_tmp7_, (GtkWidget*) wrap_box, "details");
	_g_object_unref0 (wrap_box);
}

static void
dino_ui_add_conference_dialog_set_ok_sensitive_from_select (DinoUiAddConferenceDialog* self)
{
	GtkButton* _tmp0_;
	DinoUiSelectJidFragment* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->ok_button;
	_tmp1_ = self->priv->select_fragment;
	_tmp2_ = dino_ui_select_jid_fragment_get_done (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp3_);
}

static void
dino_ui_add_conference_dialog_set_ok_sensitive_from_details (DinoUiAddConferenceDialog* self)
{
	GtkButton* _tmp0_;
	DinoUiConferenceDetailsFragment* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->ok_button;
	_tmp1_ = self->priv->details_fragment;
	_tmp2_ = dino_ui_conference_details_fragment_get_done (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp3_);
}

static void
dino_ui_add_conference_dialog_on_next_button_clicked (DinoUiAddConferenceDialog* self)
{
	DinoUiConferenceDetailsFragment* _tmp0_;
	DinoUiListRow* _tmp1_ = NULL;
	GtkListBox* _tmp2_;
	GtkListBoxRow* _tmp3_;
	DinoUiListRow* row = NULL;
	DinoUiListRow* _tmp7_;
	DinoUiConferenceListRow* _tmp8_ = NULL;
	GtkListBox* _tmp9_;
	GtkListBoxRow* _tmp10_;
	DinoUiConferenceListRow* conference_row = NULL;
	DinoUiConferenceListRow* _tmp14_;
	DinoUiConferenceListRow* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->details_fragment;
	dino_ui_conference_details_fragment_clear (_tmp0_);
	_tmp2_ = self->priv->conference_list_box;
	_tmp3_ = gtk_list_box_get_selected_row (_tmp2_);
	if (_tmp3_ != NULL) {
		GtkListBox* _tmp4_;
		GtkListBoxRow* _tmp5_;
		GtkWidget* _tmp6_;
		_tmp4_ = self->priv->conference_list_box;
		_tmp5_ = gtk_list_box_get_selected_row (_tmp4_);
		_tmp6_ = gtk_list_box_row_get_child (_tmp5_);
		_tmp1_ = DINO_UI_IS_LIST_ROW (_tmp6_) ? ((DinoUiListRow*) _tmp6_) : NULL;
	} else {
		_tmp1_ = NULL;
	}
	_tmp7_ = _g_object_ref0 (_tmp1_);
	row = _tmp7_;
	_tmp9_ = self->priv->conference_list_box;
	_tmp10_ = gtk_list_box_get_selected_row (_tmp9_);
	if (_tmp10_ != NULL) {
		GtkListBox* _tmp11_;
		GtkListBoxRow* _tmp12_;
		GtkWidget* _tmp13_;
		_tmp11_ = self->priv->conference_list_box;
		_tmp12_ = gtk_list_box_get_selected_row (_tmp11_);
		_tmp13_ = gtk_list_box_row_get_child (_tmp12_);
		_tmp8_ = DINO_UI_IS_CONFERENCE_LIST_ROW (_tmp13_) ? ((DinoUiConferenceListRow*) _tmp13_) : NULL;
	} else {
		_tmp8_ = NULL;
	}
	_tmp14_ = _g_object_ref0 (_tmp8_);
	conference_row = _tmp14_;
	_tmp15_ = conference_row;
	if (_tmp15_ != NULL) {
		DinoUiConferenceDetailsFragment* _tmp16_;
		DinoUiConferenceListRow* _tmp17_;
		DinoEntitiesAccount* _tmp18_;
		DinoUiConferenceDetailsFragment* _tmp19_;
		DinoUiConferenceListRow* _tmp20_;
		XmppConference* _tmp21_;
		XmppJid* _tmp22_;
		XmppJid* _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		DinoUiConferenceDetailsFragment* _tmp26_;
		DinoUiConferenceListRow* _tmp27_;
		XmppConference* _tmp28_;
		const gchar* _tmp29_;
		const gchar* _tmp30_;
		DinoUiConferenceListRow* _tmp31_;
		XmppConference* _tmp32_;
		const gchar* _tmp33_;
		const gchar* _tmp34_;
		GtkButton* _tmp40_;
		_tmp16_ = self->priv->details_fragment;
		_tmp17_ = conference_row;
		_tmp18_ = ((DinoUiListRow*) _tmp17_)->account;
		dino_ui_conference_details_fragment_set_account (_tmp16_, _tmp18_);
		_tmp19_ = self->priv->details_fragment;
		_tmp20_ = conference_row;
		_tmp21_ = _tmp20_->bookmark;
		_tmp22_ = xmpp_conference_get_jid (_tmp21_);
		_tmp23_ = _tmp22_;
		_tmp24_ = xmpp_jid_to_string (_tmp23_);
		_tmp25_ = _tmp24_;
		dino_ui_conference_details_fragment_set_jid (_tmp19_, _tmp25_);
		_g_free0 (_tmp25_);
		_tmp26_ = self->priv->details_fragment;
		_tmp27_ = conference_row;
		_tmp28_ = _tmp27_->bookmark;
		_tmp29_ = xmpp_conference_get_nick (_tmp28_);
		_tmp30_ = _tmp29_;
		dino_ui_conference_details_fragment_set_nick (_tmp26_, _tmp30_);
		_tmp31_ = conference_row;
		_tmp32_ = _tmp31_->bookmark;
		_tmp33_ = xmpp_conference_get_password (_tmp32_);
		_tmp34_ = _tmp33_;
		if (_tmp34_ != NULL) {
			DinoUiConferenceDetailsFragment* _tmp35_;
			DinoUiConferenceListRow* _tmp36_;
			XmppConference* _tmp37_;
			const gchar* _tmp38_;
			const gchar* _tmp39_;
			_tmp35_ = self->priv->details_fragment;
			_tmp36_ = conference_row;
			_tmp37_ = _tmp36_->bookmark;
			_tmp38_ = xmpp_conference_get_password (_tmp37_);
			_tmp39_ = _tmp38_;
			dino_ui_conference_details_fragment_set_password (_tmp35_, _tmp39_);
		}
		_tmp40_ = self->priv->ok_button;
		gtk_widget_grab_focus ((GtkWidget*) _tmp40_);
	} else {
		DinoUiListRow* _tmp41_;
		_tmp41_ = row;
		if (_tmp41_ != NULL) {
			DinoUiConferenceDetailsFragment* _tmp42_;
			DinoUiListRow* _tmp43_;
			DinoEntitiesAccount* _tmp44_;
			DinoUiConferenceDetailsFragment* _tmp45_;
			DinoUiListRow* _tmp46_;
			XmppJid* _tmp47_;
			gchar* _tmp48_;
			gchar* _tmp49_;
			_tmp42_ = self->priv->details_fragment;
			_tmp43_ = row;
			_tmp44_ = _tmp43_->account;
			dino_ui_conference_details_fragment_set_account (_tmp42_, _tmp44_);
			_tmp45_ = self->priv->details_fragment;
			_tmp46_ = row;
			_tmp47_ = _tmp46_->jid;
			_tmp48_ = xmpp_jid_to_string (_tmp47_);
			_tmp49_ = _tmp48_;
			dino_ui_conference_details_fragment_set_jid (_tmp45_, _tmp49_);
			_g_free0 (_tmp49_);
		}
	}
	dino_ui_add_conference_dialog_show_conference_details_view (self);
	_g_object_unref0 (conference_row);
	_g_object_unref0 (row);
}

static void
dino_ui_add_conference_dialog_on_cancel (DinoUiAddConferenceDialog* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit_by_name ((GtkDialog*) self, "close");
}

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

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

static gboolean
__lambda307_ (Block1Data* _data1_)
{
	DinoUiAddConferenceDialog* self;
	gulong microsec = 0UL;
	gulong _tmp0_ = 0UL;
	gulong millisec = 0UL;
	gdouble partial = 0.0;
	GtkStack* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	GtkStack* _tmp4_;
	guint _tmp5_;
	guint _tmp6_;
	gboolean result;
	self = _data1_->self;
	g_timer_elapsed (_data1_->timer, &_tmp0_);
	microsec = _tmp0_;
	millisec = microsec / 1000;
	_tmp1_ = self->priv->stack;
	_tmp2_ = gtk_stack_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	partial = MIN ((gdouble) 1, ((gdouble) millisec) / _tmp3_);
	g_object_set ((GtkWindow*) self, "default-height", (gint) (_data1_->curr_height + (_data1_->difference * partial)), NULL);
	_tmp4_ = self->priv->stack;
	_tmp5_ = gtk_stack_get_transition_duration (_tmp4_);
	_tmp6_ = _tmp5_;
	result = millisec < ((gulong) _tmp6_);
	return result;
}

static gboolean
___lambda307__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda307_ (self);
	return result;
}

static void
dino_ui_add_conference_dialog_animate_window_resize (DinoUiAddConferenceDialog* self,
                                                     GtkWidget* widget)
{
	Block1Data* _data1_;
	GtkRequisition natural_size = {0};
	GtkRequisition _tmp0_ = {0};
	GtkRequisition _tmp1_;
	GTimer* _tmp2_;
	GtkStack* _tmp3_;
	guint _tmp4_;
	guint _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	_data1_->curr_height = gtk_widget_get_size ((GtkWidget*) self, GTK_ORIENTATION_VERTICAL);
	memset (&natural_size, 0, sizeof (GtkRequisition));
	gtk_widget_get_preferred_size (widget, NULL, &_tmp0_);
	natural_size = _tmp0_;
	_tmp1_ = natural_size;
	_data1_->difference = _tmp1_.height - _data1_->curr_height;
	_tmp2_ = g_timer_new ();
	_data1_->timer = _tmp2_;
	_tmp3_ = self->priv->stack;
	_tmp4_ = gtk_stack_get_transition_duration (_tmp3_);
	_tmp5_ = _tmp4_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) ((gint) (_tmp5_ / 30)), ___lambda307__gsource_func, block1_data_ref (_data1_), block1_data_unref);
	block1_data_unref (_data1_);
	_data1_ = NULL;
}

static void
dino_ui_add_conference_dialog_class_init (DinoUiAddConferenceDialogClass * klass,
                                          gpointer klass_data)
{
	dino_ui_add_conference_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiAddConferenceDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = dino_ui_add_conference_dialog_finalize;
}

static void
dino_ui_add_conference_dialog_instance_init (DinoUiAddConferenceDialog * self,
                                             gpointer klass)
{
	GtkStack* _tmp0_;
	GtkButton* _tmp1_;
	self->priv = dino_ui_add_conference_dialog_get_instance_private (self);
	_tmp0_ = (GtkStack*) gtk_stack_new ();
	g_object_ref_sink (_tmp0_);
	self->priv->stack = _tmp0_;
	_tmp1_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp1_);
	self->priv->cancel_button = _tmp1_;
}

static void
dino_ui_add_conference_dialog_finalize (GObject * obj)
{
	DinoUiAddConferenceDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_ADD_CONFERENCE_DIALOG, DinoUiAddConferenceDialog);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->cancel_button);
	_g_object_unref0 (self->priv->ok_button);
	_g_object_unref0 (self->priv->select_fragment);
	_g_object_unref0 (self->priv->details_fragment);
	_dino_ui_conference_list_unref0 (self->priv->conference_list);
	_g_object_unref0 (self->priv->conference_list_box);
	_g_object_unref0 (self->priv->stream_interactor);
	G_OBJECT_CLASS (dino_ui_add_conference_dialog_parent_class)->finalize (obj);
}

static GType
dino_ui_add_conference_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiAddConferenceDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_add_conference_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiAddConferenceDialog), 0, (GInstanceInitFunc) dino_ui_add_conference_dialog_instance_init, NULL };
	GType dino_ui_add_conference_dialog_type_id;
	dino_ui_add_conference_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "DinoUiAddConferenceDialog", &g_define_type_info, 0);
	DinoUiAddConferenceDialog_private_offset = g_type_add_instance_private (dino_ui_add_conference_dialog_type_id, sizeof (DinoUiAddConferenceDialogPrivate));
	return dino_ui_add_conference_dialog_type_id;
}

GType
dino_ui_add_conference_dialog_get_type (void)
{
	static volatile gsize dino_ui_add_conference_dialog_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_add_conference_dialog_type_id__once)) {
		GType dino_ui_add_conference_dialog_type_id;
		dino_ui_add_conference_dialog_type_id = dino_ui_add_conference_dialog_get_type_once ();
		g_once_init_leave (&dino_ui_add_conference_dialog_type_id__once, dino_ui_add_conference_dialog_type_id);
	}
	return dino_ui_add_conference_dialog_type_id__once;
}

