/* gitg-preferences-history.c generated by valac 0.27.1.26-9b1a5-dirty, the Vala compiler
 * generated from gitg-preferences-history.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2012 - Jesse van den Kieboom
 *
 * gitg 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 2 of the License, or
 * (at your option) any later version.
 *
 * gitg 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 gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include "libgitg-ext/libgitg-ext.h"
#include <stdlib.h>
#include <string.h>
#include <config.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>


#define GITG_TYPE_PREFERENCES_HISTORY (gitg_preferences_history_get_type ())
#define GITG_PREFERENCES_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistory))
#define GITG_PREFERENCES_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistoryClass))
#define GITG_IS_PREFERENCES_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_PREFERENCES_HISTORY))
#define GITG_IS_PREFERENCES_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_PREFERENCES_HISTORY))
#define GITG_PREFERENCES_HISTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistoryClass))

typedef struct _GitgPreferencesHistory GitgPreferencesHistory;
typedef struct _GitgPreferencesHistoryClass GitgPreferencesHistoryClass;
typedef struct _GitgPreferencesHistoryPrivate GitgPreferencesHistoryPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block50Data Block50Data;

struct _GitgPreferencesHistory {
	GtkGrid parent_instance;
	GitgPreferencesHistoryPrivate * priv;
};

struct _GitgPreferencesHistoryClass {
	GtkGridClass parent_class;
};

struct _GitgPreferencesHistoryPrivate {
	gboolean d_block;
	GtkCheckButton* d_collapse_inactive_lanes_enabled;
	GtkAdjustment* d_adjustment_collapse;
	GtkScale* d_collapse_inactive_lanes;
	GtkCheckButton* d_topological_order;
	GtkCheckButton* d_mainline_head;
};

struct _Block50Data {
	int _ref_count_;
	GitgPreferencesHistory* self;
	GSettings* settings;
	gulong monsig;
};


static gpointer gitg_preferences_history_parent_class = NULL;
static GitgExtPreferencesIface* gitg_preferences_history_gitg_ext_preferences_parent_iface = NULL;

GType gitg_preferences_history_get_type (void) G_GNUC_CONST;
#define GITG_PREFERENCES_HISTORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistoryPrivate))
enum  {
	GITG_PREFERENCES_HISTORY_DUMMY_PROPERTY,
	GITG_PREFERENCES_HISTORY_WIDGET,
	GITG_PREFERENCES_HISTORY_ID,
	GITG_PREFERENCES_HISTORY_DISPLAY_NAME
};
#define GITG_PREFERENCES_HISTORY_version VERSION
static gint gitg_preferences_history_round_val (gdouble val);
static void gitg_preferences_history_update_collapse_inactive_lanes (GitgPreferencesHistory* self, GSettings* settings);
GitgPreferencesHistory* gitg_preferences_history_new (void);
GitgPreferencesHistory* gitg_preferences_history_construct (GType object_type);
static GObject * gitg_preferences_history_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static Block50Data* block50_data_ref (Block50Data* _data50_);
static void block50_data_unref (void * _userdata_);
static void _gitg_preferences_history___lambda64_ (Block50Data* _data50_, GtkAdjustment* adj);
static void __gitg_preferences_history___lambda64__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self);
static void _gitg_preferences_history___lambda65_ (Block50Data* _data50_, GSettings* s, const gchar* k);
static void __gitg_preferences_history___lambda65__g_settings_changed (GSettings* _sender, const gchar* key, gpointer self);
static void _gitg_preferences_history___lambda66_ (Block50Data* _data50_, GtkWidget* w);
static void __gitg_preferences_history___lambda66__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
static void gitg_preferences_history_finalize (GObject* obj);
static void _vala_gitg_preferences_history_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


static gint gitg_preferences_history_round_val (gdouble val) {
	gint result = 0;
	gint ival = 0;
	gdouble _tmp0_ = 0.0;
	gdouble _tmp1_ = 0.0;
#line 46 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = val;
#line 46 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	ival = (gint) _tmp0_;
#line 48 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = val;
#line 48 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = ival + ((gint) ((_tmp1_ - ival) > 0.5));
#line 48 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 120 "gitg-preferences-history.c"
}


static void gitg_preferences_history_update_collapse_inactive_lanes (GitgPreferencesHistory* self, GSettings* settings) {
	gint val = 0;
	GtkScale* _tmp0_ = NULL;
	gdouble _tmp1_ = 0.0;
	gint _tmp2_ = 0;
	gint nval = 0;
	GSettings* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
#line 102 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (self != NULL);
#line 102 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (settings != NULL);
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = self->priv->d_collapse_inactive_lanes;
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = gtk_range_get_value ((GtkRange*) _tmp0_);
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp2_ = gitg_preferences_history_round_val (_tmp1_);
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	val = _tmp2_;
#line 105 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp3_ = settings;
#line 105 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp4_ = g_settings_get_int (_tmp3_, "collapse-inactive-lanes");
#line 105 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	nval = _tmp4_;
#line 107 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp5_ = val;
#line 107 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp6_ = nval;
#line 107 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	if (_tmp5_ != _tmp6_) {
#line 158 "gitg-preferences-history.c"
		GtkScale* _tmp7_ = NULL;
		gint _tmp8_ = 0;
#line 109 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp7_ = self->priv->d_collapse_inactive_lanes;
#line 109 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp8_ = nval;
#line 109 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		gtk_range_set_value ((GtkRange*) _tmp7_, (gdouble) _tmp8_);
#line 167 "gitg-preferences-history.c"
	}
}


GitgPreferencesHistory* gitg_preferences_history_construct (GType object_type) {
	GitgPreferencesHistory * self = NULL;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = (GitgPreferencesHistory*) g_object_new (object_type, NULL);
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	return self;
#line 178 "gitg-preferences-history.c"
}


GitgPreferencesHistory* gitg_preferences_history_new (void) {
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	return gitg_preferences_history_construct (GITG_TYPE_PREFERENCES_HISTORY);
#line 185 "gitg-preferences-history.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 117 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	return self ? g_object_ref (self) : NULL;
#line 192 "gitg-preferences-history.c"
}


static GtkWidget* gitg_preferences_history_real_get_widget (GitgExtPreferences* base) {
	GtkWidget* result;
	GitgPreferencesHistory* self;
	GtkWidget* _tmp0_ = NULL;
#line 115 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = (GitgPreferencesHistory*) base;
#line 117 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = _g_object_ref0 ((GtkWidget*) self);
#line 117 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = _tmp0_;
#line 117 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 208 "gitg-preferences-history.c"
}


static gchar* gitg_preferences_history_real_get_id (GitgExtPreferences* base) {
	gchar* result;
	GitgPreferencesHistory* self;
	gchar* _tmp0_ = NULL;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = (GitgPreferencesHistory*) base;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = g_strdup ("/org/gnome/gitg/Preferences/History");
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = _tmp0_;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 224 "gitg-preferences-history.c"
}


static gchar* gitg_preferences_history_real_get_display_name (GitgExtPreferences* base) {
	gchar* result;
	GitgPreferencesHistory* self;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = (GitgPreferencesHistory*) base;
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = _ ("History");
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = _tmp1_;
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 243 "gitg-preferences-history.c"
}


static Block50Data* block50_data_ref (Block50Data* _data50_) {
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_atomic_int_inc (&_data50_->_ref_count_);
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	return _data50_;
#line 252 "gitg-preferences-history.c"
}


static void block50_data_unref (void * _userdata_) {
	Block50Data* _data50_;
	_data50_ = (Block50Data*) _userdata_;
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	if (g_atomic_int_dec_and_test (&_data50_->_ref_count_)) {
#line 261 "gitg-preferences-history.c"
		GitgPreferencesHistory* self;
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		self = _data50_->self;
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		_g_object_unref0 (_data50_->settings);
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		_g_object_unref0 (self);
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_slice_free (Block50Data, _data50_);
#line 271 "gitg-preferences-history.c"
	}
}


static void _gitg_preferences_history___lambda64_ (Block50Data* _data50_, GtkAdjustment* adj) {
	GitgPreferencesHistory* self;
	gboolean _tmp0_ = FALSE;
	gint nval = 0;
	GtkAdjustment* _tmp1_ = NULL;
	gdouble _tmp2_ = 0.0;
	gint _tmp3_ = 0;
	gint val = 0;
	GSettings* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
	GtkAdjustment* _tmp10_ = NULL;
	gint _tmp11_ = 0;
#line 70 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = _data50_->self;
#line 70 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (adj != NULL);
#line 71 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = self->priv->d_block;
#line 71 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	if (_tmp0_) {
#line 73 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		return;
#line 300 "gitg-preferences-history.c"
	}
#line 76 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = adj;
#line 76 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp2_ = gtk_adjustment_get_value (_tmp1_);
#line 76 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp3_ = gitg_preferences_history_round_val (_tmp2_);
#line 76 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	nval = _tmp3_;
#line 77 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp4_ = _data50_->settings;
#line 77 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp5_ = g_settings_get_int (_tmp4_, "collapse-inactive-lanes");
#line 77 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	val = _tmp5_;
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp6_ = val;
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp7_ = nval;
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	if (_tmp6_ != _tmp7_) {
#line 322 "gitg-preferences-history.c"
		GSettings* _tmp8_ = NULL;
		gint _tmp9_ = 0;
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp8_ = _data50_->settings;
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp9_ = nval;
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_settings_set_int (_tmp8_, "collapse-inactive-lanes", _tmp9_);
#line 331 "gitg-preferences-history.c"
	}
#line 84 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_block = TRUE;
#line 85 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp10_ = adj;
#line 85 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp11_ = nval;
#line 85 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_adjustment_set_value (_tmp10_, (gdouble) _tmp11_);
#line 86 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_block = FALSE;
#line 343 "gitg-preferences-history.c"
}


static void __gitg_preferences_history___lambda64__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) {
#line 70 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_gitg_preferences_history___lambda64_ (self, _sender);
#line 350 "gitg-preferences-history.c"
}


static void _gitg_preferences_history___lambda65_ (Block50Data* _data50_, GSettings* s, const gchar* k) {
	GitgPreferencesHistory* self;
	GSettings* _tmp0_ = NULL;
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = _data50_->self;
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (s != NULL);
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (k != NULL);
#line 90 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_block = TRUE;
#line 91 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = _data50_->settings;
#line 91 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gitg_preferences_history_update_collapse_inactive_lanes (self, _tmp0_);
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_block = FALSE;
#line 371 "gitg-preferences-history.c"
}


static void __gitg_preferences_history___lambda65__g_settings_changed (GSettings* _sender, const gchar* key, gpointer self) {
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_gitg_preferences_history___lambda65_ (self, _sender, key);
#line 378 "gitg-preferences-history.c"
}


static void _gitg_preferences_history___lambda66_ (Block50Data* _data50_, GtkWidget* w) {
	GitgPreferencesHistory* self;
	GSettings* _tmp0_ = NULL;
	gulong _tmp1_ = 0UL;
#line 95 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = _data50_->self;
#line 95 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (w != NULL);
#line 96 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = _data50_->settings;
#line 96 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = _data50_->monsig;
#line 96 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
#line 396 "gitg-preferences-history.c"
}


static void __gitg_preferences_history___lambda66__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
#line 95 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_gitg_preferences_history___lambda66_ (self, _sender);
#line 403 "gitg-preferences-history.c"
}


static GObject * gitg_preferences_history_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GitgPreferencesHistory * self;
	Block50Data* _data50_;
	GSettings* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	GtkCheckButton* _tmp2_ = NULL;
	GSettings* _tmp3_ = NULL;
	GtkCheckButton* _tmp4_ = NULL;
	GSettings* _tmp5_ = NULL;
	GtkCheckButton* _tmp6_ = NULL;
	GtkAdjustment* _tmp7_ = NULL;
	GSettings* _tmp8_ = NULL;
	gulong _tmp9_ = 0UL;
	GSettings* _tmp10_ = NULL;
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	parent_class = G_OBJECT_CLASS (gitg_preferences_history_parent_class);
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistory);
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data50_ = g_slice_new0 (Block50Data);
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data50_->_ref_count_ = 1;
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data50_->self = g_object_ref (self);
#line 53 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = g_settings_new ("org.gnome.gitg.preferences.history");
#line 53 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data50_->settings = _tmp0_;
#line 55 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = _data50_->settings;
#line 55 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp2_ = self->priv->d_collapse_inactive_lanes_enabled;
#line 55 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_settings_bind (_tmp1_, "collapse-inactive-lanes-enabled", (GObject*) _tmp2_, "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
#line 60 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp3_ = _data50_->settings;
#line 60 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp4_ = self->priv->d_topological_order;
#line 60 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_settings_bind (_tmp3_, "topological-order", (GObject*) _tmp4_, "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp5_ = _data50_->settings;
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp6_ = self->priv->d_mainline_head;
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_settings_bind (_tmp5_, "mainline-head", (GObject*) _tmp6_, "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
#line 70 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp7_ = self->priv->d_adjustment_collapse;
#line 70 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_signal_connect_data (_tmp7_, "value-changed", (GCallback) __gitg_preferences_history___lambda64__gtk_adjustment_value_changed, block50_data_ref (_data50_), (GClosureNotify) block50_data_unref, 0);
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp8_ = _data50_->settings;
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp9_ = g_signal_connect_data (_tmp8_, "changed::collapse-inactive-lanes", (GCallback) __gitg_preferences_history___lambda65__g_settings_changed, block50_data_ref (_data50_), (GClosureNotify) block50_data_unref, 0);
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data50_->monsig = _tmp9_;
#line 95 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) __gitg_preferences_history___lambda66__gtk_widget_destroy, block50_data_ref (_data50_), (GClosureNotify) block50_data_unref, 0);
#line 99 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp10_ = _data50_->settings;
#line 99 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gitg_preferences_history_update_collapse_inactive_lanes (self, _tmp10_);
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	block50_data_unref (_data50_);
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data50_ = NULL;
#line 51 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	return obj;
#line 479 "gitg-preferences-history.c"
}


static void gitg_preferences_history_class_init (GitgPreferencesHistoryClass * klass) {
	gint GitgPreferencesHistory_private_offset;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gitg_preferences_history_parent_class = g_type_class_peek_parent (klass);
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_type_class_add_private (klass, sizeof (GitgPreferencesHistoryPrivate));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_preferences_history_get_property;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	G_OBJECT_CLASS (klass)->constructor = gitg_preferences_history_constructor;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_preferences_history_finalize;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_PREFERENCES_HISTORY_WIDGET, g_param_spec_object ("widget", "widget", "widget", gtk_widget_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_PREFERENCES_HISTORY_ID, g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_PREFERENCES_HISTORY_DISPLAY_NAME, g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	GitgPreferencesHistory_private_offset = g_type_class_get_instance_private_offset (klass);
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/gitg/ui/gitg-preferences-history.ui");
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "collapse_inactive_lanes_enabled", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_collapse_inactive_lanes_enabled));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "adjustment_collapse", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_adjustment_collapse));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "collapse_inactive_lanes", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_collapse_inactive_lanes));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "topological_order", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_topological_order));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "mainline_head", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_mainline_head));
#line 515 "gitg-preferences-history.c"
}


static void gitg_preferences_history_gitg_ext_preferences_interface_init (GitgExtPreferencesIface * iface) {
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gitg_preferences_history_gitg_ext_preferences_parent_iface = g_type_interface_peek_parent (iface);
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	iface->get_widget = gitg_preferences_history_real_get_widget;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	iface->get_id = gitg_preferences_history_real_get_id;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	iface->get_display_name = gitg_preferences_history_real_get_display_name;
#line 528 "gitg-preferences-history.c"
}


static void gitg_preferences_history_instance_init (GitgPreferencesHistory * self) {
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv = GITG_PREFERENCES_HISTORY_GET_PRIVATE (self);
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 537 "gitg-preferences-history.c"
}


static void gitg_preferences_history_finalize (GObject* obj) {
	GitgPreferencesHistory * self;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistory);
#line 31 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_collapse_inactive_lanes_enabled);
#line 34 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_adjustment_collapse);
#line 36 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_collapse_inactive_lanes);
#line 39 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_topological_order);
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_mainline_head);
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	G_OBJECT_CLASS (gitg_preferences_history_parent_class)->finalize (obj);
#line 557 "gitg-preferences-history.c"
}


GType gitg_preferences_history_get_type (void) {
	static volatile gsize gitg_preferences_history_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_preferences_history_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgPreferencesHistoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_preferences_history_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgPreferencesHistory), 0, (GInstanceInitFunc) gitg_preferences_history_instance_init, NULL };
		static const GInterfaceInfo gitg_ext_preferences_info = { (GInterfaceInitFunc) gitg_preferences_history_gitg_ext_preferences_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gitg_preferences_history_type_id;
		gitg_preferences_history_type_id = g_type_register_static (gtk_grid_get_type (), "GitgPreferencesHistory", &g_define_type_info, 0);
		g_type_add_interface_static (gitg_preferences_history_type_id, GITG_EXT_TYPE_PREFERENCES, &gitg_ext_preferences_info);
		g_once_init_leave (&gitg_preferences_history_type_id__volatile, gitg_preferences_history_type_id);
	}
	return gitg_preferences_history_type_id__volatile;
}


static void _vala_gitg_preferences_history_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GitgPreferencesHistory * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistory);
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
	switch (property_id) {
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		case GITG_PREFERENCES_HISTORY_WIDGET:
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_value_take_object (value, gitg_ext_preferences_get_widget ((GitgExtPreferences*) self));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		case GITG_PREFERENCES_HISTORY_ID:
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_value_take_string (value, gitg_ext_preferences_get_id ((GitgExtPreferences*) self));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		case GITG_PREFERENCES_HISTORY_DISPLAY_NAME:
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_value_take_string (value, gitg_ext_preferences_get_display_name ((GitgExtPreferences*) self));
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 598 "gitg-preferences-history.c"
		default:
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 24 "/home/garrett/hacking/gnome/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 604 "gitg-preferences-history.c"
	}
}



