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

#include <glib-object.h>
#include "libdino.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "xmpp-vala.h"
#include <gtk/gtk.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_CONTACT_DETAILS_TYPE_SETTINGS_PROVIDER (dino_ui_contact_details_settings_provider_get_type ())
#define DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONTACT_DETAILS_TYPE_SETTINGS_PROVIDER, DinoUiContactDetailsSettingsProvider))
#define DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONTACT_DETAILS_TYPE_SETTINGS_PROVIDER, DinoUiContactDetailsSettingsProviderClass))
#define DINO_UI_CONTACT_DETAILS_IS_SETTINGS_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONTACT_DETAILS_TYPE_SETTINGS_PROVIDER))
#define DINO_UI_CONTACT_DETAILS_IS_SETTINGS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONTACT_DETAILS_TYPE_SETTINGS_PROVIDER))
#define DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONTACT_DETAILS_TYPE_SETTINGS_PROVIDER, DinoUiContactDetailsSettingsProviderClass))

typedef struct _DinoUiContactDetailsSettingsProvider DinoUiContactDetailsSettingsProvider;
typedef struct _DinoUiContactDetailsSettingsProviderClass DinoUiContactDetailsSettingsProviderClass;
typedef struct _DinoUiContactDetailsSettingsProviderPrivate DinoUiContactDetailsSettingsProviderPrivate;
enum  {
	DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_0_PROPERTY,
	DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_ID_PROPERTY,
	DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_TAB_PROPERTY,
	DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_NUM_PROPERTIES
};
static GParamSpec* dino_ui_contact_details_settings_provider_properties[DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block24Data Block24Data;
typedef struct _Block25Data Block25Data;
typedef struct _Block26Data Block26Data;

struct _DinoUiContactDetailsSettingsProvider {
	GObject parent_instance;
	DinoUiContactDetailsSettingsProviderPrivate * priv;
};

struct _DinoUiContactDetailsSettingsProviderClass {
	GObjectClass parent_class;
};

struct _DinoUiContactDetailsSettingsProviderPrivate {
	DinoStreamInteractor* stream_interactor;
	gchar* DETAILS_HEADLINE_CHAT;
	gchar* DETAILS_HEADLINE_ROOM;
};

struct _Block24Data {
	int _ref_count_;
	DinoUiContactDetailsSettingsProvider* self;
	DinoEntitiesConversation* conversation;
};

struct _Block25Data {
	int _ref_count_;
	Block24Data * _data24_;
	GtkComboBoxText* combobox_typing;
};

struct _Block26Data {
	int _ref_count_;
	Block24Data * _data24_;
	GtkComboBoxText* combobox_marker;
};

static gint DinoUiContactDetailsSettingsProvider_private_offset;
static gpointer dino_ui_contact_details_settings_provider_parent_class = NULL;
static DinoPluginsContactDetailsProviderIface * dino_ui_contact_details_settings_provider_dino_plugins_contact_details_provider_parent_iface = NULL;

VALA_EXTERN GType dino_ui_contact_details_settings_provider_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiContactDetailsSettingsProvider, g_object_unref)
VALA_EXTERN DinoUiContactDetailsSettingsProvider* dino_ui_contact_details_settings_provider_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiContactDetailsSettingsProvider* dino_ui_contact_details_settings_provider_construct (GType object_type,
                                                                                           DinoStreamInteractor* stream_interactor);
static void dino_ui_contact_details_settings_provider_real_populate (DinoPluginsContactDetailsProvider* base,
                                                              DinoEntitiesConversation* conversation,
                                                              DinoPluginsContactDetails* contact_details,
                                                              DinoPluginsWidgetType type);
static Block24Data* block24_data_ref (Block24Data* _data24_);
static void block24_data_unref (void * _userdata_);
static Block25Data* block25_data_ref (Block25Data* _data25_);
static void block25_data_unref (void * _userdata_);
static GtkComboBoxText* dino_ui_contact_details_settings_provider_get_combobox (DinoUiContactDetailsSettingsProvider* self,
                                                                         gboolean default_val);
static gchar* dino_ui_contact_details_settings_provider_get_setting_id (DinoUiContactDetailsSettingsProvider* self,
                                                                 DinoEntitiesConversationSetting setting);
static void ___lambda195_ (Block25Data* _data25_);
static DinoEntitiesConversationSetting dino_ui_contact_details_settings_provider_get_setting (DinoUiContactDetailsSettingsProvider* self,
                                                                                       const gchar* id);
static void ____lambda195__gtk_combo_box_changed (GtkComboBox* _sender,
                                           gpointer self);
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_data_unref (void * _userdata_);
static void ___lambda196_ (Block26Data* _data26_);
static void ____lambda196__gtk_combo_box_changed (GtkComboBox* _sender,
                                           gpointer self);
static GObject* dino_ui_contact_details_settings_provider_real_get_widget (DinoPluginsContactDetailsProvider* base,
                                                                    DinoEntitiesConversation* conversation);
static void dino_ui_contact_details_settings_provider_finalize (GObject * obj);
static GType dino_ui_contact_details_settings_provider_get_type_once (void);
static void _vala_dino_ui_contact_details_settings_provider_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_contact_details_settings_provider_get_instance_private (DinoUiContactDetailsSettingsProvider* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiContactDetailsSettingsProvider_private_offset);
}

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

DinoUiContactDetailsSettingsProvider*
dino_ui_contact_details_settings_provider_construct (GType object_type,
                                                     DinoStreamInteractor* stream_interactor)
{
	DinoUiContactDetailsSettingsProvider * self = NULL;
	DinoStreamInteractor* _tmp0_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	self = (DinoUiContactDetailsSettingsProvider*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp0_;
	return self;
}

DinoUiContactDetailsSettingsProvider*
dino_ui_contact_details_settings_provider_new (DinoStreamInteractor* stream_interactor)
{
	return dino_ui_contact_details_settings_provider_construct (DINO_UI_CONTACT_DETAILS_TYPE_SETTINGS_PROVIDER, stream_interactor);
}

static Block24Data*
block24_data_ref (Block24Data* _data24_)
{
	g_atomic_int_inc (&_data24_->_ref_count_);
	return _data24_;
}

static void
block24_data_unref (void * _userdata_)
{
	Block24Data* _data24_;
	_data24_ = (Block24Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
		DinoUiContactDetailsSettingsProvider* self;
		self = _data24_->self;
		_g_object_unref0 (_data24_->conversation);
		_g_object_unref0 (self);
		g_slice_free (Block24Data, _data24_);
	}
}

static Block25Data*
block25_data_ref (Block25Data* _data25_)
{
	g_atomic_int_inc (&_data25_->_ref_count_);
	return _data25_;
}

static void
block25_data_unref (void * _userdata_)
{
	Block25Data* _data25_;
	_data25_ = (Block25Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data25_->_ref_count_)) {
		DinoUiContactDetailsSettingsProvider* self;
		self = _data25_->_data24_->self;
		_g_object_unref0 (_data25_->combobox_typing);
		block24_data_unref (_data25_->_data24_);
		_data25_->_data24_ = NULL;
		g_slice_free (Block25Data, _data25_);
	}
}

static void
___lambda195_ (Block25Data* _data25_)
{
	Block24Data* _data24_;
	DinoUiContactDetailsSettingsProvider* self;
	GtkComboBoxText* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	_data24_ = _data25_->_data24_;
	self = _data24_->self;
	_tmp0_ = _data25_->combobox_typing;
	_tmp1_ = gtk_combo_box_get_active_id ((GtkComboBox*) _tmp0_);
	_tmp2_ = _tmp1_;
	dino_entities_conversation_set_send_typing (_data24_->conversation, dino_ui_contact_details_settings_provider_get_setting (self, _tmp2_));
}

static void
____lambda195__gtk_combo_box_changed (GtkComboBox* _sender,
                                      gpointer self)
{
	___lambda195_ (self);
}

static Block26Data*
block26_data_ref (Block26Data* _data26_)
{
	g_atomic_int_inc (&_data26_->_ref_count_);
	return _data26_;
}

static void
block26_data_unref (void * _userdata_)
{
	Block26Data* _data26_;
	_data26_ = (Block26Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
		DinoUiContactDetailsSettingsProvider* self;
		self = _data26_->_data24_->self;
		_g_object_unref0 (_data26_->combobox_marker);
		block24_data_unref (_data26_->_data24_);
		_data26_->_data24_ = NULL;
		g_slice_free (Block26Data, _data26_);
	}
}

static void
___lambda196_ (Block26Data* _data26_)
{
	Block24Data* _data24_;
	DinoUiContactDetailsSettingsProvider* self;
	GtkComboBoxText* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	_data24_ = _data26_->_data24_;
	self = _data24_->self;
	_tmp0_ = _data26_->combobox_marker;
	_tmp1_ = gtk_combo_box_get_active_id ((GtkComboBox*) _tmp0_);
	_tmp2_ = _tmp1_;
	dino_entities_conversation_set_send_marker (_data24_->conversation, dino_ui_contact_details_settings_provider_get_setting (self, _tmp2_));
}

static void
____lambda196__gtk_combo_box_changed (GtkComboBox* _sender,
                                      gpointer self)
{
	___lambda196_ (self);
}

static void
dino_ui_contact_details_settings_provider_real_populate (DinoPluginsContactDetailsProvider* base,
                                                         DinoEntitiesConversation* conversation,
                                                         DinoPluginsContactDetails* contact_details,
                                                         DinoPluginsWidgetType type)
{
	DinoUiContactDetailsSettingsProvider * self;
	Block24Data* _data24_;
	DinoEntitiesConversation* _tmp0_;
	DinoStreamInteractor* _tmp1_;
	gpointer _tmp2_;
	DinoMucManager* _tmp3_;
	DinoEntitiesAccount* _tmp4_;
	DinoEntitiesAccount* _tmp5_;
	XmppJid* _tmp6_;
	XmppJid* _tmp7_;
	gboolean _tmp8_;
	DinoEntitiesConversationType _tmp30_;
	DinoEntitiesConversationType _tmp31_;
	self = (DinoUiContactDetailsSettingsProvider*) base;
	g_return_if_fail (conversation != NULL);
	g_return_if_fail (contact_details != NULL);
	_data24_ = g_slice_new0 (Block24Data);
	_data24_->_ref_count_ = 1;
	_data24_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (conversation);
	_g_object_unref0 (_data24_->conversation);
	_data24_->conversation = _tmp0_;
	if (type != DINO_PLUGINS_WIDGET_TYPE_GTK4) {
		block24_data_unref (_data24_);
		_data24_ = NULL;
		return;
	}
	_tmp1_ = self->priv->stream_interactor;
	_tmp2_ = dino_stream_interactor_get (_tmp1_, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref);
	_tmp3_ = (DinoMucManager*) _tmp2_;
	_tmp4_ = dino_entities_conversation_get_account (_data24_->conversation);
	_tmp5_ = _tmp4_;
	_tmp6_ = dino_entities_conversation_get_counterpart (_data24_->conversation);
	_tmp7_ = _tmp6_;
	_tmp8_ = !dino_muc_manager_is_public_room (_tmp3_, _tmp5_, _tmp7_);
	_g_object_unref0 (_tmp3_);
	if (_tmp8_) {
		Block25Data* _data25_;
		const gchar* _tmp9_ = NULL;
		DinoEntitiesConversationType _tmp10_;
		DinoEntitiesConversationType _tmp11_;
		gchar* details_headline = NULL;
		gchar* _tmp14_;
		DinoApplication* _tmp15_;
		DinoEntitiesSettings* _tmp16_;
		DinoEntitiesSettings* _tmp17_;
		gboolean _tmp18_;
		gboolean _tmp19_;
		GtkComboBoxText* _tmp20_;
		GtkComboBoxText* _tmp21_;
		DinoEntitiesConversationSetting _tmp22_;
		DinoEntitiesConversationSetting _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		GtkComboBoxText* _tmp26_;
		const gchar* _tmp27_;
		const gchar* _tmp28_;
		GtkComboBoxText* _tmp29_;
		_data25_ = g_slice_new0 (Block25Data);
		_data25_->_ref_count_ = 1;
		_data25_->_data24_ = block24_data_ref (_data24_);
		_tmp10_ = dino_entities_conversation_get_type_ (_data24_->conversation);
		_tmp11_ = _tmp10_;
		if (_tmp11_ == DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT) {
			const gchar* _tmp12_;
			_tmp12_ = self->priv->DETAILS_HEADLINE_ROOM;
			_tmp9_ = _tmp12_;
		} else {
			const gchar* _tmp13_;
			_tmp13_ = self->priv->DETAILS_HEADLINE_CHAT;
			_tmp9_ = _tmp13_;
		}
		_tmp14_ = g_strdup (_tmp9_);
		details_headline = _tmp14_;
		_tmp15_ = dino_application_get_default ();
		_tmp16_ = dino_application_get_settings (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = dino_entities_settings_get_send_typing (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = dino_ui_contact_details_settings_provider_get_combobox (self, _tmp19_);
		_data25_->combobox_typing = _tmp20_;
		_tmp21_ = _data25_->combobox_typing;
		_tmp22_ = dino_entities_conversation_get_send_typing (_data24_->conversation);
		_tmp23_ = _tmp22_;
		_tmp24_ = dino_ui_contact_details_settings_provider_get_setting_id (self, _tmp23_);
		_tmp25_ = _tmp24_;
		gtk_combo_box_set_active_id ((GtkComboBox*) _tmp21_, _tmp25_);
		_g_free0 (_tmp25_);
		_tmp26_ = _data25_->combobox_typing;
		g_signal_connect_data ((GtkComboBox*) _tmp26_, "changed", (GCallback) ____lambda195__gtk_combo_box_changed, block25_data_ref (_data25_), (GClosureNotify) block25_data_unref, 0);
		_tmp27_ = details_headline;
		_tmp28_ = dino_gettext ("Send typing notifications");
		_tmp29_ = _data25_->combobox_typing;
		g_signal_emit_by_name (contact_details, "add", _tmp27_, _tmp28_, "", (GObject*) _tmp29_);
		_g_free0 (details_headline);
		block25_data_unref (_data25_);
		_data25_ = NULL;
	}
	_tmp30_ = dino_entities_conversation_get_type_ (_data24_->conversation);
	_tmp31_ = _tmp30_;
	if (_tmp31_ == DINO_ENTITIES_CONVERSATION_TYPE_CHAT) {
		Block26Data* _data26_;
		DinoApplication* _tmp32_;
		DinoEntitiesSettings* _tmp33_;
		DinoEntitiesSettings* _tmp34_;
		gboolean _tmp35_;
		gboolean _tmp36_;
		GtkComboBoxText* _tmp37_;
		const gchar* _tmp38_;
		const gchar* _tmp39_;
		GtkComboBoxText* _tmp40_;
		GtkComboBoxText* _tmp41_;
		DinoEntitiesConversationSetting _tmp42_;
		DinoEntitiesConversationSetting _tmp43_;
		gchar* _tmp44_;
		gchar* _tmp45_;
		GtkComboBoxText* _tmp46_;
		_data26_ = g_slice_new0 (Block26Data);
		_data26_->_ref_count_ = 1;
		_data26_->_data24_ = block24_data_ref (_data24_);
		_tmp32_ = dino_application_get_default ();
		_tmp33_ = dino_application_get_settings (_tmp32_);
		_tmp34_ = _tmp33_;
		_tmp35_ = dino_entities_settings_get_send_marker (_tmp34_);
		_tmp36_ = _tmp35_;
		_tmp37_ = dino_ui_contact_details_settings_provider_get_combobox (self, _tmp36_);
		_data26_->combobox_marker = _tmp37_;
		_tmp38_ = self->priv->DETAILS_HEADLINE_CHAT;
		_tmp39_ = dino_gettext ("Send read receipts");
		_tmp40_ = _data26_->combobox_marker;
		g_signal_emit_by_name (contact_details, "add", _tmp38_, _tmp39_, "", (GObject*) _tmp40_);
		_tmp41_ = _data26_->combobox_marker;
		_tmp42_ = dino_entities_conversation_get_send_marker (_data24_->conversation);
		_tmp43_ = _tmp42_;
		_tmp44_ = dino_ui_contact_details_settings_provider_get_setting_id (self, _tmp43_);
		_tmp45_ = _tmp44_;
		gtk_combo_box_set_active_id ((GtkComboBox*) _tmp41_, _tmp45_);
		_g_free0 (_tmp45_);
		_tmp46_ = _data26_->combobox_marker;
		g_signal_connect_data ((GtkComboBox*) _tmp46_, "changed", (GCallback) ____lambda196__gtk_combo_box_changed, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
		block26_data_unref (_data26_);
		_data26_ = NULL;
	}
	block24_data_unref (_data24_);
	_data24_ = NULL;
}

static DinoEntitiesConversationSetting
dino_ui_contact_details_settings_provider_get_setting (DinoUiContactDetailsSettingsProvider* self,
                                                       const gchar* id)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	DinoEntitiesConversationSetting result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (id != NULL, 0);
	_tmp0_ = id;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("default")))) {
		switch (0) {
			default:
			{
				result = DINO_ENTITIES_CONVERSATION_SETTING_DEFAULT;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("on")))) {
		switch (0) {
			default:
			{
				result = DINO_ENTITIES_CONVERSATION_SETTING_ON;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("off")))) {
		switch (0) {
			default:
			{
				result = DINO_ENTITIES_CONVERSATION_SETTING_OFF;
				return result;
			}
		}
	}
	g_assert_not_reached ();
}

static gchar*
dino_ui_contact_details_settings_provider_get_setting_id (DinoUiContactDetailsSettingsProvider* self,
                                                          DinoEntitiesConversationSetting setting)
{
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	switch (setting) {
		case DINO_ENTITIES_CONVERSATION_SETTING_DEFAULT:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("default");
			result = _tmp0_;
			return result;
		}
		case DINO_ENTITIES_CONVERSATION_SETTING_ON:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("on");
			result = _tmp1_;
			return result;
		}
		case DINO_ENTITIES_CONVERSATION_SETTING_OFF:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("off");
			result = _tmp2_;
			return result;
		}
		default:
		break;
	}
	g_assert_not_reached ();
}

static GtkComboBoxText*
dino_ui_contact_details_settings_provider_get_combobox (DinoUiContactDetailsSettingsProvider* self,
                                                        gboolean default_val)
{
	GtkComboBoxText* combobox = NULL;
	GtkComboBoxText* _tmp0_;
	GtkComboBoxText* _tmp1_;
	const gchar* _tmp2_ = NULL;
	gchar* default_setting = NULL;
	gchar* _tmp5_;
	GtkComboBoxText* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	GtkComboBoxText* _tmp10_;
	const gchar* _tmp11_;
	GtkComboBoxText* _tmp12_;
	const gchar* _tmp13_;
	GtkComboBoxText* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp0_);
	combobox = _tmp0_;
	_tmp1_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (combobox);
	combobox = _tmp1_;
	if (default_val) {
		const gchar* _tmp3_;
		_tmp3_ = dino_gettext ("On");
		_tmp2_ = _tmp3_;
	} else {
		const gchar* _tmp4_;
		_tmp4_ = dino_gettext ("Off");
		_tmp2_ = _tmp4_;
	}
	_tmp5_ = g_strdup (_tmp2_);
	default_setting = _tmp5_;
	_tmp6_ = combobox;
	_tmp7_ = dino_gettext ("Default: %s");
	_tmp8_ = g_strdup_printf (_tmp7_, default_setting);
	_tmp9_ = _tmp8_;
	gtk_combo_box_text_append (_tmp6_, "default", _tmp9_);
	_g_free0 (_tmp9_);
	_tmp10_ = combobox;
	_tmp11_ = dino_gettext ("On");
	gtk_combo_box_text_append (_tmp10_, "on", _tmp11_);
	_tmp12_ = combobox;
	_tmp13_ = dino_gettext ("Off");
	gtk_combo_box_text_append (_tmp12_, "off", _tmp13_);
	result = combobox;
	_g_free0 (default_setting);
	return result;
}

static GObject*
dino_ui_contact_details_settings_provider_real_get_widget (DinoPluginsContactDetailsProvider* base,
                                                           DinoEntitiesConversation* conversation)
{
	DinoUiContactDetailsSettingsProvider * self;
	GObject* result;
	self = (DinoUiContactDetailsSettingsProvider*) base;
	g_return_val_if_fail (conversation != NULL, NULL);
	result = NULL;
	return result;
}

static const gchar*
dino_ui_contact_details_settings_provider_real_get_id (DinoPluginsContactDetailsProvider* base)
{
	const gchar* result;
	DinoUiContactDetailsSettingsProvider* self;
	self = (DinoUiContactDetailsSettingsProvider*) base;
	result = "chat_settings";
	return result;
}

static const gchar*
dino_ui_contact_details_settings_provider_real_get_tab (DinoPluginsContactDetailsProvider* base)
{
	const gchar* result;
	DinoUiContactDetailsSettingsProvider* self;
	self = (DinoUiContactDetailsSettingsProvider*) base;
	result = "about";
	return result;
}

static void
dino_ui_contact_details_settings_provider_class_init (DinoUiContactDetailsSettingsProviderClass * klass,
                                                      gpointer klass_data)
{
	dino_ui_contact_details_settings_provider_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiContactDetailsSettingsProvider_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_contact_details_settings_provider_get_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_contact_details_settings_provider_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_ID_PROPERTY, dino_ui_contact_details_settings_provider_properties[DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_TAB_PROPERTY, dino_ui_contact_details_settings_provider_properties[DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_TAB_PROPERTY] = g_param_spec_string ("tab", "tab", "tab", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
dino_ui_contact_details_settings_provider_dino_plugins_contact_details_provider_interface_init (DinoPluginsContactDetailsProviderIface * iface,
                                                                                                gpointer iface_data)
{
	dino_ui_contact_details_settings_provider_dino_plugins_contact_details_provider_parent_iface = g_type_interface_peek_parent (iface);
	iface->populate = (void (*) (DinoPluginsContactDetailsProvider*, DinoEntitiesConversation*, DinoPluginsContactDetails*, DinoPluginsWidgetType)) dino_ui_contact_details_settings_provider_real_populate;
	iface->get_widget = (GObject* (*) (DinoPluginsContactDetailsProvider*, DinoEntitiesConversation*)) dino_ui_contact_details_settings_provider_real_get_widget;
	iface->get_id = dino_ui_contact_details_settings_provider_real_get_id;
	iface->get_tab = dino_ui_contact_details_settings_provider_real_get_tab;
}

static void
dino_ui_contact_details_settings_provider_instance_init (DinoUiContactDetailsSettingsProvider * self,
                                                         gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = dino_ui_contact_details_settings_provider_get_instance_private (self);
	_tmp0_ = g_strdup ("Settings");
	self->priv->DETAILS_HEADLINE_CHAT = _tmp0_;
	_tmp1_ = g_strdup ("Local Settings");
	self->priv->DETAILS_HEADLINE_ROOM = _tmp1_;
}

static void
dino_ui_contact_details_settings_provider_finalize (GObject * obj)
{
	DinoUiContactDetailsSettingsProvider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_CONTACT_DETAILS_TYPE_SETTINGS_PROVIDER, DinoUiContactDetailsSettingsProvider);
	_g_object_unref0 (self->priv->stream_interactor);
	_g_free0 (self->priv->DETAILS_HEADLINE_CHAT);
	_g_free0 (self->priv->DETAILS_HEADLINE_ROOM);
	G_OBJECT_CLASS (dino_ui_contact_details_settings_provider_parent_class)->finalize (obj);
}

static GType
dino_ui_contact_details_settings_provider_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiContactDetailsSettingsProviderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_contact_details_settings_provider_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiContactDetailsSettingsProvider), 0, (GInstanceInitFunc) dino_ui_contact_details_settings_provider_instance_init, NULL };
	static const GInterfaceInfo dino_plugins_contact_details_provider_info = { (GInterfaceInitFunc) dino_ui_contact_details_settings_provider_dino_plugins_contact_details_provider_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType dino_ui_contact_details_settings_provider_type_id;
	dino_ui_contact_details_settings_provider_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoUiContactDetailsSettingsProvider", &g_define_type_info, 0);
	g_type_add_interface_static (dino_ui_contact_details_settings_provider_type_id, DINO_PLUGINS_TYPE_CONTACT_DETAILS_PROVIDER, &dino_plugins_contact_details_provider_info);
	DinoUiContactDetailsSettingsProvider_private_offset = g_type_add_instance_private (dino_ui_contact_details_settings_provider_type_id, sizeof (DinoUiContactDetailsSettingsProviderPrivate));
	return dino_ui_contact_details_settings_provider_type_id;
}

GType
dino_ui_contact_details_settings_provider_get_type (void)
{
	static volatile gsize dino_ui_contact_details_settings_provider_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_contact_details_settings_provider_type_id__once)) {
		GType dino_ui_contact_details_settings_provider_type_id;
		dino_ui_contact_details_settings_provider_type_id = dino_ui_contact_details_settings_provider_get_type_once ();
		g_once_init_leave (&dino_ui_contact_details_settings_provider_type_id__once, dino_ui_contact_details_settings_provider_type_id);
	}
	return dino_ui_contact_details_settings_provider_type_id__once;
}

static void
_vala_dino_ui_contact_details_settings_provider_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec)
{
	DinoUiContactDetailsSettingsProvider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_CONTACT_DETAILS_TYPE_SETTINGS_PROVIDER, DinoUiContactDetailsSettingsProvider);
	switch (property_id) {
		case DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_ID_PROPERTY:
		g_value_set_string (value, dino_plugins_contact_details_provider_get_id ((DinoPluginsContactDetailsProvider*) self));
		break;
		case DINO_UI_CONTACT_DETAILS_SETTINGS_PROVIDER_TAB_PROPERTY:
		g_value_set_string (value, dino_plugins_contact_details_provider_get_tab ((DinoPluginsContactDetailsProvider*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

