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

/*  This file is part of corebird, a Gtk+ linux Twitter client.
 *  Copyright (C) 2013 Timm Bäder
 *
 *  corebird is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  corebird is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with corebird.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gio/gio.h>


#define TYPE_SETTINGS_DIALOG (settings_dialog_get_type ())
#define SETTINGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SETTINGS_DIALOG, SettingsDialog))
#define SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SETTINGS_DIALOG, SettingsDialogClass))
#define IS_SETTINGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SETTINGS_DIALOG))
#define IS_SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SETTINGS_DIALOG))
#define SETTINGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SETTINGS_DIALOG, SettingsDialogClass))

typedef struct _SettingsDialog SettingsDialog;
typedef struct _SettingsDialogClass SettingsDialogClass;
typedef struct _SettingsDialogPrivate SettingsDialogPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_COREBIRD (corebird_get_type ())
#define COREBIRD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COREBIRD, Corebird))
#define COREBIRD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COREBIRD, CorebirdClass))
#define IS_COREBIRD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COREBIRD))
#define IS_COREBIRD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COREBIRD))
#define COREBIRD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COREBIRD, CorebirdClass))

typedef struct _Corebird Corebird;
typedef struct _CorebirdClass CorebirdClass;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))

struct _SettingsDialog {
	GtkWindow parent_instance;
	SettingsDialogPrivate * priv;
};

struct _SettingsDialogClass {
	GtkWindowClass parent_class;
};

struct _SettingsDialogPrivate {
	GtkSwitch* on_new_mentions_switch;
	GtkSwitch* round_avatar_switch;
	GtkSwitch* on_new_dms_switch;
	GtkComboBoxText* on_new_tweets_combobox;
	GtkSwitch* auto_scroll_on_new_tweets_switch;
	GtkSpinButton* max_media_size_spin_button;
	GtkStack* main_stack;
	GtkSwitch* double_click_activation_switch;
};


static gpointer settings_dialog_parent_class = NULL;

GType settings_dialog_get_type (void) G_GNUC_CONST;
#define SETTINGS_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SETTINGS_DIALOG, SettingsDialogPrivate))
enum  {
	SETTINGS_DIALOG_DUMMY_PROPERTY
};
GType corebird_get_type (void) G_GNUC_CONST;
SettingsDialog* settings_dialog_new (Corebird* application);
SettingsDialog* settings_dialog_construct (GType object_type, Corebird* application);
GSettings* settings_get (void);
static void __lambda7_ (SettingsDialog* self);
static void ___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void settings_dialog_add_accels (SettingsDialog* self);
static void settings_dialog_load_geometry (SettingsDialog* self);
static gboolean settings_dialog_window_destroy_cb (SettingsDialog* self);
static void settings_dialog_save_geometry (SettingsDialog* self);
static gboolean _settings_dialog_window_destroy_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self);
static gboolean __lambda8_ (SettingsDialog* self);
static gboolean ___lambda8__gtk_accel_group_activate (GtkAccelGroup* accel_group, GObject* acceleratable, guint keyval, GdkModifierType modifier, gpointer self);
static gboolean __lambda9_ (SettingsDialog* self);
static gboolean ___lambda9__gtk_accel_group_activate (GtkAccelGroup* accel_group, GObject* acceleratable, guint keyval, GdkModifierType modifier, gpointer self);
static gboolean __lambda10_ (SettingsDialog* self);
static gboolean ___lambda10__gtk_accel_group_activate (GtkAccelGroup* accel_group, GObject* acceleratable, guint keyval, GdkModifierType modifier, gpointer self);
static void settings_dialog_finalize (GObject* obj);


static void __lambda7_ (SettingsDialog* self) {
	GtkComboBoxText* _tmp0_ = NULL;
	GtkSwitch* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	_tmp0_ = self->priv->on_new_tweets_combobox;
	_tmp1_ = self->priv->auto_scroll_on_new_tweets_switch;
	_tmp2_ = gtk_switch_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), !_tmp3_);
}


static void ___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda7_ ((SettingsDialog*) self);
}


SettingsDialog* settings_dialog_construct (GType object_type, Corebird* application) {
	SettingsDialog * self = NULL;
	Corebird* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	GSettings* _tmp2_ = NULL;
	GtkSwitch* _tmp3_ = NULL;
	GSettings* _tmp4_ = NULL;
	GSettings* _tmp5_ = NULL;
	GtkComboBoxText* _tmp6_ = NULL;
	GSettings* _tmp7_ = NULL;
	GSettings* _tmp8_ = NULL;
	GtkSwitch* _tmp9_ = NULL;
	GSettings* _tmp10_ = NULL;
	GSettings* _tmp11_ = NULL;
	GtkSwitch* _tmp12_ = NULL;
	GtkSwitch* _tmp13_ = NULL;
	GSettings* _tmp14_ = NULL;
	GSettings* _tmp15_ = NULL;
	GtkSwitch* _tmp16_ = NULL;
	GSettings* _tmp17_ = NULL;
	GSettings* _tmp18_ = NULL;
	GtkSpinButton* _tmp19_ = NULL;
	GSettings* _tmp20_ = NULL;
	GSettings* _tmp21_ = NULL;
	GtkSwitch* _tmp22_ = NULL;
	g_return_val_if_fail (IS_COREBIRD (application), NULL);
	self = (SettingsDialog*) g_object_new (object_type, NULL);
	_tmp0_ = application;
	gtk_window_set_application (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_application_get_type (), GtkApplication));
	gtk_window_set_type_hint (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GDK_WINDOW_TYPE_HINT_DIALOG);
	_tmp1_ = settings_get ();
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->round_avatar_switch;
	g_settings_bind (_tmp2_, "round-avatars", G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, G_TYPE_OBJECT, GObject), "active", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp2_);
	_tmp4_ = settings_get ();
	_tmp5_ = _tmp4_;
	_tmp6_ = self->priv->on_new_tweets_combobox;
	g_settings_bind (_tmp5_, "new-tweets-notify", G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, G_TYPE_OBJECT, GObject), "active-id", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp5_);
	_tmp7_ = settings_get ();
	_tmp8_ = _tmp7_;
	_tmp9_ = self->priv->on_new_mentions_switch;
	g_settings_bind (_tmp8_, "new-mentions-notify", G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, G_TYPE_OBJECT, GObject), "active", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp8_);
	_tmp10_ = settings_get ();
	_tmp11_ = _tmp10_;
	_tmp12_ = self->priv->on_new_dms_switch;
	g_settings_bind (_tmp11_, "new-dms-notify", G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, G_TYPE_OBJECT, GObject), "active", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp11_);
	_tmp13_ = self->priv->auto_scroll_on_new_tweets_switch;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, G_TYPE_OBJECT, GObject), "notify::active", (GCallback) ___lambda7__g_object_notify, self, 0);
	_tmp14_ = settings_get ();
	_tmp15_ = _tmp14_;
	_tmp16_ = self->priv->auto_scroll_on_new_tweets_switch;
	g_settings_bind (_tmp15_, "auto-scroll-on-new-tweets", G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, G_TYPE_OBJECT, GObject), "active", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp15_);
	_tmp17_ = settings_get ();
	_tmp18_ = _tmp17_;
	_tmp19_ = self->priv->max_media_size_spin_button;
	g_settings_bind (_tmp18_, "max-media-size", G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, G_TYPE_OBJECT, GObject), "value", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp18_);
	_tmp20_ = settings_get ();
	_tmp21_ = _tmp20_;
	_tmp22_ = self->priv->double_click_activation_switch;
	g_settings_bind (_tmp21_, "double-click-activation", G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, G_TYPE_OBJECT, GObject), "active", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp21_);
	settings_dialog_add_accels (self);
	settings_dialog_load_geometry (self);
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	return self;
}


SettingsDialog* settings_dialog_new (Corebird* application) {
	return settings_dialog_construct (TYPE_SETTINGS_DIALOG, application);
}


static gboolean settings_dialog_window_destroy_cb (SettingsDialog* self) {
	gboolean result = FALSE;
	g_return_val_if_fail (IS_SETTINGS_DIALOG (self), FALSE);
	settings_dialog_save_geometry (self);
	result = FALSE;
	return result;
}


static gboolean _settings_dialog_window_destroy_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) {
	gboolean result;
	result = settings_dialog_window_destroy_cb ((SettingsDialog*) self);
	return result;
}


static void settings_dialog_load_geometry (SettingsDialog* self) {
	GVariant* geom = NULL;
	GSettings* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	GVariant* _tmp2_ = NULL;
	GVariant* _tmp3_ = NULL;
	gint x = 0;
	gint y = 0;
	gint w = 0;
	gint h = 0;
	GVariant* _tmp4_ = NULL;
	GVariant* _tmp5_ = NULL;
	GVariant* _tmp6_ = NULL;
	gint32 _tmp7_ = 0;
	GVariant* _tmp8_ = NULL;
	GVariant* _tmp9_ = NULL;
	GVariant* _tmp10_ = NULL;
	gint32 _tmp11_ = 0;
	GVariant* _tmp12_ = NULL;
	GVariant* _tmp13_ = NULL;
	GVariant* _tmp14_ = NULL;
	gint32 _tmp15_ = 0;
	GVariant* _tmp16_ = NULL;
	GVariant* _tmp17_ = NULL;
	GVariant* _tmp18_ = NULL;
	gint32 _tmp19_ = 0;
	gboolean _tmp20_ = FALSE;
	gint _tmp21_ = 0;
	gint _tmp23_ = 0;
	gint _tmp24_ = 0;
	gint _tmp25_ = 0;
	gint _tmp26_ = 0;
	g_return_if_fail (IS_SETTINGS_DIALOG (self));
	_tmp0_ = settings_get ();
	_tmp1_ = _tmp0_;
	_tmp2_ = g_settings_get_value (_tmp1_, "settings-geometry");
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp1_);
	geom = _tmp3_;
	x = 0;
	y = 0;
	w = 0;
	h = 0;
	_tmp4_ = geom;
	_tmp5_ = g_variant_get_child_value (_tmp4_, (gsize) 0);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_variant_get_int32 (_tmp6_);
	x = (gint) _tmp7_;
	_g_variant_unref0 (_tmp6_);
	_tmp8_ = geom;
	_tmp9_ = g_variant_get_child_value (_tmp8_, (gsize) 1);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_variant_get_int32 (_tmp10_);
	y = (gint) _tmp11_;
	_g_variant_unref0 (_tmp10_);
	_tmp12_ = geom;
	_tmp13_ = g_variant_get_child_value (_tmp12_, (gsize) 2);
	_tmp14_ = _tmp13_;
	_tmp15_ = g_variant_get_int32 (_tmp14_);
	w = (gint) _tmp15_;
	_g_variant_unref0 (_tmp14_);
	_tmp16_ = geom;
	_tmp17_ = g_variant_get_child_value (_tmp16_, (gsize) 3);
	_tmp18_ = _tmp17_;
	_tmp19_ = g_variant_get_int32 (_tmp18_);
	h = (gint) _tmp19_;
	_g_variant_unref0 (_tmp18_);
	_tmp21_ = w;
	if (_tmp21_ == 0) {
		_tmp20_ = TRUE;
	} else {
		gint _tmp22_ = 0;
		_tmp22_ = h;
		_tmp20_ = _tmp22_ == 0;
	}
	if (_tmp20_) {
		_g_variant_unref0 (geom);
		return;
	}
	_tmp23_ = x;
	_tmp24_ = y;
	gtk_window_move (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _tmp23_, _tmp24_);
	_tmp25_ = w;
	_tmp26_ = h;
	gtk_window_resize (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _tmp25_, _tmp26_);
	_g_variant_unref0 (geom);
}


static void settings_dialog_save_geometry (SettingsDialog* self) {
	GVariantBuilder* builder = NULL;
	const GVariantType* _tmp0_ = NULL;
	GVariantBuilder* _tmp1_ = NULL;
	gint x = 0;
	gint y = 0;
	gint w = 0;
	gint h = 0;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	GVariant* _tmp7_ = NULL;
	GVariant* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	GVariant* _tmp10_ = NULL;
	GVariant* _tmp11_ = NULL;
	gint _tmp12_ = 0;
	GVariant* _tmp13_ = NULL;
	GVariant* _tmp14_ = NULL;
	gint _tmp15_ = 0;
	GVariant* _tmp16_ = NULL;
	GVariant* _tmp17_ = NULL;
	GSettings* _tmp18_ = NULL;
	GSettings* _tmp19_ = NULL;
	GVariant* _tmp20_ = NULL;
	GVariant* _tmp21_ = NULL;
	g_return_if_fail (IS_SETTINGS_DIALOG (self));
	_tmp0_ = G_VARIANT_TYPE_TUPLE;
	_tmp1_ = g_variant_builder_new (_tmp0_);
	builder = _tmp1_;
	x = 0;
	y = 0;
	w = 0;
	h = 0;
	gtk_window_get_position (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), &_tmp2_, &_tmp3_);
	x = _tmp2_;
	y = _tmp3_;
	_tmp4_ = gtk_widget_get_allocated_width (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	w = _tmp4_;
	_tmp5_ = gtk_widget_get_allocated_height (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	h = _tmp5_;
	_tmp6_ = x;
	_tmp7_ = g_variant_new_int32 ((gint32) _tmp6_);
	g_variant_ref_sink (_tmp7_);
	_tmp8_ = _tmp7_;
	g_variant_builder_add_value (builder, _tmp8_);
	_g_variant_unref0 (_tmp8_);
	_tmp9_ = y;
	_tmp10_ = g_variant_new_int32 ((gint32) _tmp9_);
	g_variant_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	g_variant_builder_add_value (builder, _tmp11_);
	_g_variant_unref0 (_tmp11_);
	_tmp12_ = w;
	_tmp13_ = g_variant_new_int32 ((gint32) _tmp12_);
	g_variant_ref_sink (_tmp13_);
	_tmp14_ = _tmp13_;
	g_variant_builder_add_value (builder, _tmp14_);
	_g_variant_unref0 (_tmp14_);
	_tmp15_ = h;
	_tmp16_ = g_variant_new_int32 ((gint32) _tmp15_);
	g_variant_ref_sink (_tmp16_);
	_tmp17_ = _tmp16_;
	g_variant_builder_add_value (builder, _tmp17_);
	_g_variant_unref0 (_tmp17_);
	_tmp18_ = settings_get ();
	_tmp19_ = _tmp18_;
	_tmp20_ = g_variant_builder_end (builder);
	g_variant_ref_sink (_tmp20_);
	_tmp21_ = _tmp20_;
	g_settings_set_value (_tmp19_, "settings-geometry", _tmp21_);
	_g_variant_unref0 (_tmp21_);
	_g_object_unref0 (_tmp19_);
	_g_variant_builder_unref0 (builder);
}


static gboolean __lambda8_ (SettingsDialog* self) {
	gboolean result = FALSE;
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	result = TRUE;
	return result;
}


static gboolean ___lambda8__gtk_accel_group_activate (GtkAccelGroup* accel_group, GObject* acceleratable, guint keyval, GdkModifierType modifier, gpointer self) {
	gboolean result;
	result = __lambda8_ ((SettingsDialog*) self);
	return result;
}


static gboolean __lambda9_ (SettingsDialog* self) {
	gboolean result = FALSE;
	GtkStack* _tmp0_ = NULL;
	_tmp0_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "interface");
	result = TRUE;
	return result;
}


static gboolean ___lambda9__gtk_accel_group_activate (GtkAccelGroup* accel_group, GObject* acceleratable, guint keyval, GdkModifierType modifier, gpointer self) {
	gboolean result;
	result = __lambda9_ ((SettingsDialog*) self);
	return result;
}


static gboolean __lambda10_ (SettingsDialog* self) {
	gboolean result = FALSE;
	GtkStack* _tmp0_ = NULL;
	_tmp0_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "notifications");
	result = TRUE;
	return result;
}


static gboolean ___lambda10__gtk_accel_group_activate (GtkAccelGroup* accel_group, GObject* acceleratable, guint keyval, GdkModifierType modifier, gpointer self) {
	gboolean result;
	result = __lambda10_ ((SettingsDialog*) self);
	return result;
}


static void settings_dialog_add_accels (SettingsDialog* self) {
	GtkAccelGroup* ag = NULL;
	GtkAccelGroup* _tmp0_ = NULL;
	g_return_if_fail (IS_SETTINGS_DIALOG (self));
	_tmp0_ = gtk_accel_group_new ();
	ag = _tmp0_;
	gtk_accel_group_connect (ag, (guint) GDK_KEY_Escape, 0, GTK_ACCEL_LOCKED, (GClosure*) ((___lambda8__gtk_accel_group_activate == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda8__gtk_accel_group_activate, g_object_ref (self), g_object_unref)));
	gtk_accel_group_connect (ag, (guint) GDK_KEY_1, GDK_MOD1_MASK, GTK_ACCEL_LOCKED, (GClosure*) ((___lambda9__gtk_accel_group_activate == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda9__gtk_accel_group_activate, g_object_ref (self), g_object_unref)));
	gtk_accel_group_connect (ag, (guint) GDK_KEY_2, GDK_MOD1_MASK, GTK_ACCEL_LOCKED, (GClosure*) ((___lambda10__gtk_accel_group_activate == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda10__gtk_accel_group_activate, g_object_ref (self), g_object_unref)));
	gtk_window_add_accel_group (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), ag);
	_g_object_unref0 (ag);
}


static void settings_dialog_class_init (SettingsDialogClass * klass) {
	gint SettingsDialog_private_offset;
	settings_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (SettingsDialogPrivate));
	G_OBJECT_CLASS (klass)->finalize = settings_dialog_finalize;
	SettingsDialog_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/baedert/corebird/ui/settings-dialog.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "on_new_mentions_switch", FALSE, SettingsDialog_private_offset + G_STRUCT_OFFSET (SettingsDialogPrivate, on_new_mentions_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "round_avatar_switch", FALSE, SettingsDialog_private_offset + G_STRUCT_OFFSET (SettingsDialogPrivate, round_avatar_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "on_new_dms_switch", FALSE, SettingsDialog_private_offset + G_STRUCT_OFFSET (SettingsDialogPrivate, on_new_dms_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "on_new_tweets_combobox", FALSE, SettingsDialog_private_offset + G_STRUCT_OFFSET (SettingsDialogPrivate, on_new_tweets_combobox));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "auto_scroll_on_new_tweets_switch", FALSE, SettingsDialog_private_offset + G_STRUCT_OFFSET (SettingsDialogPrivate, auto_scroll_on_new_tweets_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "max_media_size_spin_button", FALSE, SettingsDialog_private_offset + G_STRUCT_OFFSET (SettingsDialogPrivate, max_media_size_spin_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_stack", FALSE, SettingsDialog_private_offset + G_STRUCT_OFFSET (SettingsDialogPrivate, main_stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "double_click_activation_switch", FALSE, SettingsDialog_private_offset + G_STRUCT_OFFSET (SettingsDialogPrivate, double_click_activation_switch));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "window_destroy_cb", G_CALLBACK(_settings_dialog_window_destroy_cb_gtk_widget_delete_event));
}


static void settings_dialog_instance_init (SettingsDialog * self) {
	self->priv = SETTINGS_DIALOG_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void settings_dialog_finalize (GObject* obj) {
	SettingsDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SETTINGS_DIALOG, SettingsDialog);
	_g_object_unref0 (self->priv->on_new_mentions_switch);
	_g_object_unref0 (self->priv->round_avatar_switch);
	_g_object_unref0 (self->priv->on_new_dms_switch);
	_g_object_unref0 (self->priv->on_new_tweets_combobox);
	_g_object_unref0 (self->priv->auto_scroll_on_new_tweets_switch);
	_g_object_unref0 (self->priv->max_media_size_spin_button);
	_g_object_unref0 (self->priv->main_stack);
	_g_object_unref0 (self->priv->double_click_activation_switch);
	G_OBJECT_CLASS (settings_dialog_parent_class)->finalize (obj);
}


GType settings_dialog_get_type (void) {
	static volatile gsize settings_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&settings_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SettingsDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) settings_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingsDialog), 0, (GInstanceInitFunc) settings_dialog_instance_init, NULL };
		GType settings_dialog_type_id;
		settings_dialog_type_id = g_type_register_static (gtk_window_get_type (), "SettingsDialog", &g_define_type_info, 0);
		g_once_init_leave (&settings_dialog_type_id__volatile, settings_dialog_type_id);
	}
	return settings_dialog_type_id__volatile;
}



