/* gitg-preferences-history.c generated by valac 0.34.7, 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 _Block82Data Block82Data;

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;
	GtkRadioButton* d_select_current_branch;
	GtkRadioButton* d_select_all_branches;
	GtkRadioButton* d_select_all_commits;
	GtkCheckButton* d_sort_references_by_activity;
	GtkCheckButton* d_show_upstream_with_branch;
	GtkRadioButton** d_select_buttons;
	gint d_select_buttons_length1;
	gint _d_select_buttons_size_;
	gchar** d_select_names;
	gint d_select_names_length1;
	gint _d_select_names_size_;
};

struct _Block82Data {
	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_DEFAULT_SELECTION,
	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);
const gchar* gitg_preferences_history_get_default_selection (GitgPreferencesHistory* self);
void gitg_preferences_history_set_default_selection (GitgPreferencesHistory* self, const gchar* value);
static GObject * gitg_preferences_history_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static Block82Data* block82_data_ref (Block82Data* _data82_);
static void block82_data_unref (void * _userdata_);
static void _gitg_preferences_history___lambda81_ (Block82Data* _data82_, GtkAdjustment* adj);
static void __gitg_preferences_history___lambda81__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self);
static void _gitg_preferences_history___lambda82_ (Block82Data* _data82_, GSettings* s, const gchar* k);
static void __gitg_preferences_history___lambda82__g_settings_changed (GSettings* _sender, const gchar* key, gpointer self);
static void _gitg_preferences_history___lambda83_ (Block82Data* _data82_, GtkWidget* w);
static void __gitg_preferences_history___lambda83__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
static void _gitg_preferences_history______lambda84_ (GitgPreferencesHistory* self);
static void __gitg_preferences_history______lambda84__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean _gitg_preferences_history___lambda85_ (GValue* value, GVariant* variant);
static gboolean __gitg_preferences_history___lambda85__gsettings_bind_get_mapping (GValue* value, GVariant* variant, void* user_data);
static GVariant* _gitg_preferences_history___lambda86_ (GValue* value, const GVariantType* expected_type);
static GVariant* __gitg_preferences_history___lambda86__gsettings_bind_set_mapping (GValue* value, const GVariantType* expected_type, void* user_data);
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 void _vala_gitg_preferences_history_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static gint gitg_preferences_history_round_val (gdouble val) {
	gint result = 0;
	gint ival = 0;
	gdouble _tmp0_ = 0.0;
	gdouble _tmp1_ = 0.0;
#line 64 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = val;
#line 64 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	ival = (gint) _tmp0_;
#line 66 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = val;
#line 66 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = ival + ((gint) ((_tmp1_ - ival) > 0.5));
#line 66 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 143 "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 192 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (self != NULL);
#line 192 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (settings != NULL);
#line 194 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = self->priv->d_collapse_inactive_lanes;
#line 194 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = gtk_range_get_value ((GtkRange*) _tmp0_);
#line 194 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp2_ = gitg_preferences_history_round_val (_tmp1_);
#line 194 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	val = _tmp2_;
#line 195 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp3_ = settings;
#line 195 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp4_ = g_settings_get_int (_tmp3_, "collapse-inactive-lanes");
#line 195 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	nval = _tmp4_;
#line 197 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp5_ = val;
#line 197 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp6_ = nval;
#line 197 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	if (_tmp5_ != _tmp6_) {
#line 181 "gitg-preferences-history.c"
		GtkScale* _tmp7_ = NULL;
		gint _tmp8_ = 0;
#line 199 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp7_ = self->priv->d_collapse_inactive_lanes;
#line 199 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp8_ = nval;
#line 199 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		gtk_range_set_value ((GtkRange*) _tmp7_, (gdouble) _tmp8_);
#line 190 "gitg-preferences-history.c"
	}
}


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


GitgPreferencesHistory* gitg_preferences_history_new (void) {
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return gitg_preferences_history_construct (GITG_TYPE_PREFERENCES_HISTORY);
#line 208 "gitg-preferences-history.c"
}


const gchar* gitg_preferences_history_get_default_selection (GitgPreferencesHistory* self) {
	const gchar* result;
	gchar** _tmp12_ = NULL;
	gint _tmp12__length1 = 0;
	const gchar* _tmp13_ = NULL;
#line 166 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 219 "gitg-preferences-history.c"
	{
		gint i = 0;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		i = 0;
#line 224 "gitg-preferences-history.c"
		{
			gboolean _tmp0_ = FALSE;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
			_tmp0_ = TRUE;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
			while (TRUE) {
#line 231 "gitg-preferences-history.c"
				gint _tmp2_ = 0;
				GtkRadioButton** _tmp3_ = NULL;
				gint _tmp3__length1 = 0;
				GtkRadioButton** _tmp4_ = NULL;
				gint _tmp4__length1 = 0;
				gint _tmp5_ = 0;
				GtkRadioButton* _tmp6_ = NULL;
				gboolean _tmp7_ = FALSE;
				gboolean _tmp8_ = FALSE;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				if (!_tmp0_) {
#line 243 "gitg-preferences-history.c"
					gint _tmp1_ = 0;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp1_ = i;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					i = _tmp1_ + 1;
#line 249 "gitg-preferences-history.c"
				}
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp0_ = FALSE;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp2_ = i;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp3_ = self->priv->d_select_buttons;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp3__length1 = self->priv->d_select_buttons_length1;
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				if (!(_tmp2_ < _tmp3__length1)) {
#line 168 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					break;
#line 263 "gitg-preferences-history.c"
				}
#line 170 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp4_ = self->priv->d_select_buttons;
#line 170 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp4__length1 = self->priv->d_select_buttons_length1;
#line 170 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp5_ = i;
#line 170 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp6_ = _tmp4_[_tmp5_];
#line 170 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp7_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp6_);
#line 170 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp8_ = _tmp7_;
#line 170 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				if (_tmp8_) {
#line 279 "gitg-preferences-history.c"
					gchar** _tmp9_ = NULL;
					gint _tmp9__length1 = 0;
					gint _tmp10_ = 0;
					const gchar* _tmp11_ = NULL;
#line 172 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp9_ = self->priv->d_select_names;
#line 172 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp9__length1 = self->priv->d_select_names_length1;
#line 172 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp10_ = i;
#line 172 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp11_ = _tmp9_[_tmp10_];
#line 172 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					result = _tmp11_;
#line 172 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					return result;
#line 296 "gitg-preferences-history.c"
				}
			}
		}
	}
#line 176 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp12_ = self->priv->d_select_names;
#line 176 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp12__length1 = self->priv->d_select_names_length1;
#line 176 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp13_ = _tmp12_[0];
#line 176 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = _tmp13_;
#line 176 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 311 "gitg-preferences-history.c"
}


void gitg_preferences_history_set_default_selection (GitgPreferencesHistory* self, const gchar* value) {
#line 179 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (self != NULL);
#line 318 "gitg-preferences-history.c"
	{
		gint i = 0;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		i = 0;
#line 323 "gitg-preferences-history.c"
		{
			gboolean _tmp0_ = FALSE;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
			_tmp0_ = TRUE;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
			while (TRUE) {
#line 330 "gitg-preferences-history.c"
				gint _tmp2_ = 0;
				GtkRadioButton** _tmp3_ = NULL;
				gint _tmp3__length1 = 0;
				gchar** _tmp4_ = NULL;
				gint _tmp4__length1 = 0;
				gint _tmp5_ = 0;
				const gchar* _tmp6_ = NULL;
				const gchar* _tmp7_ = NULL;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				if (!_tmp0_) {
#line 341 "gitg-preferences-history.c"
					gint _tmp1_ = 0;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp1_ = i;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					i = _tmp1_ + 1;
#line 347 "gitg-preferences-history.c"
				}
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp0_ = FALSE;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp2_ = i;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp3_ = self->priv->d_select_buttons;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp3__length1 = self->priv->d_select_buttons_length1;
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				if (!(_tmp2_ < _tmp3__length1)) {
#line 181 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					break;
#line 361 "gitg-preferences-history.c"
				}
#line 183 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp4_ = self->priv->d_select_names;
#line 183 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp4__length1 = self->priv->d_select_names_length1;
#line 183 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp5_ = i;
#line 183 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp6_ = _tmp4_[_tmp5_];
#line 183 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp7_ = value;
#line 183 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				if (g_strcmp0 (_tmp6_, _tmp7_) == 0) {
#line 375 "gitg-preferences-history.c"
					GtkRadioButton** _tmp8_ = NULL;
					gint _tmp8__length1 = 0;
					gint _tmp9_ = 0;
					GtkRadioButton* _tmp10_ = NULL;
#line 185 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp8_ = self->priv->d_select_buttons;
#line 185 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp8__length1 = self->priv->d_select_buttons_length1;
#line 185 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp9_ = i;
#line 185 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp10_ = _tmp8_[_tmp9_];
#line 185 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					gtk_toggle_button_set_active ((GtkToggleButton*) _tmp10_, TRUE);
#line 186 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					return;
#line 392 "gitg-preferences-history.c"
				}
			}
		}
	}
#line 179 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_object_notify ((GObject *) self, "default-selection");
#line 399 "gitg-preferences-history.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 207 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return self ? g_object_ref (self) : NULL;
#line 406 "gitg-preferences-history.c"
}


static GtkWidget* gitg_preferences_history_real_get_widget (GitgExtPreferences* base) {
	GtkWidget* result;
	GitgPreferencesHistory* self;
	GtkWidget* _tmp0_ = NULL;
#line 205 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = (GitgPreferencesHistory*) base;
#line 207 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = _g_object_ref0 ((GtkWidget*) self);
#line 207 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = _tmp0_;
#line 207 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 422 "gitg-preferences-history.c"
}


static gchar* gitg_preferences_history_real_get_id (GitgExtPreferences* base) {
	gchar* result;
	GitgPreferencesHistory* self;
	gchar* _tmp0_ = NULL;
#line 213 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = (GitgPreferencesHistory*) base;
#line 213 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = g_strdup ("/org/gnome/gitg/Preferences/History");
#line 213 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = _tmp0_;
#line 213 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 438 "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 218 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = (GitgPreferencesHistory*) base;
#line 218 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = _ ("History");
#line 218 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 218 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = _tmp1_;
#line 218 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 457 "gitg-preferences-history.c"
}


static Block82Data* block82_data_ref (Block82Data* _data82_) {
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_atomic_int_inc (&_data82_->_ref_count_);
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return _data82_;
#line 466 "gitg-preferences-history.c"
}


static void block82_data_unref (void * _userdata_) {
	Block82Data* _data82_;
	_data82_ = (Block82Data*) _userdata_;
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	if (g_atomic_int_dec_and_test (&_data82_->_ref_count_)) {
#line 475 "gitg-preferences-history.c"
		GitgPreferencesHistory* self;
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		self = _data82_->self;
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		_g_object_unref0 (_data82_->settings);
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		_g_object_unref0 (self);
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_slice_free (Block82Data, _data82_);
#line 485 "gitg-preferences-history.c"
	}
}


static void _gitg_preferences_history___lambda81_ (Block82Data* _data82_, 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 88 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = _data82_->self;
#line 88 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (adj != NULL);
#line 89 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = self->priv->d_block;
#line 89 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	if (_tmp0_) {
#line 91 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		return;
#line 514 "gitg-preferences-history.c"
	}
#line 94 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = adj;
#line 94 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp2_ = gtk_adjustment_get_value (_tmp1_);
#line 94 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp3_ = gitg_preferences_history_round_val (_tmp2_);
#line 94 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	nval = _tmp3_;
#line 95 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp4_ = _data82_->settings;
#line 95 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp5_ = g_settings_get_int (_tmp4_, "collapse-inactive-lanes");
#line 95 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	val = _tmp5_;
#line 97 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp6_ = val;
#line 97 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp7_ = nval;
#line 97 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	if (_tmp6_ != _tmp7_) {
#line 536 "gitg-preferences-history.c"
		GSettings* _tmp8_ = NULL;
		gint _tmp9_ = 0;
#line 99 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp8_ = _data82_->settings;
#line 99 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp9_ = nval;
#line 99 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_settings_set_int (_tmp8_, "collapse-inactive-lanes", _tmp9_);
#line 545 "gitg-preferences-history.c"
	}
#line 102 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_block = TRUE;
#line 103 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp10_ = adj;
#line 103 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp11_ = nval;
#line 103 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_adjustment_set_value (_tmp10_, (gdouble) _tmp11_);
#line 104 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_block = FALSE;
#line 557 "gitg-preferences-history.c"
}


static void __gitg_preferences_history___lambda81__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) {
#line 88 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_gitg_preferences_history___lambda81_ (self, _sender);
#line 564 "gitg-preferences-history.c"
}


static void _gitg_preferences_history___lambda82_ (Block82Data* _data82_, GSettings* s, const gchar* k) {
	GitgPreferencesHistory* self;
	GSettings* _tmp0_ = NULL;
#line 107 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = _data82_->self;
#line 107 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (s != NULL);
#line 107 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (k != NULL);
#line 108 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_block = TRUE;
#line 109 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = _data82_->settings;
#line 109 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	gitg_preferences_history_update_collapse_inactive_lanes (self, _tmp0_);
#line 110 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_block = FALSE;
#line 585 "gitg-preferences-history.c"
}


static void __gitg_preferences_history___lambda82__g_settings_changed (GSettings* _sender, const gchar* key, gpointer self) {
#line 107 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_gitg_preferences_history___lambda82_ (self, _sender, key);
#line 592 "gitg-preferences-history.c"
}


static void _gitg_preferences_history___lambda83_ (Block82Data* _data82_, GtkWidget* w) {
	GitgPreferencesHistory* self;
	GSettings* _tmp0_ = NULL;
	gulong _tmp1_ = 0UL;
#line 113 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = _data82_->self;
#line 113 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_if_fail (w != NULL);
#line 114 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = _data82_->settings;
#line 114 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = _data82_->monsig;
#line 114 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
#line 610 "gitg-preferences-history.c"
}


static void __gitg_preferences_history___lambda83__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
#line 113 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_gitg_preferences_history___lambda83_ (self, _sender);
#line 617 "gitg-preferences-history.c"
}


static void _gitg_preferences_history______lambda84_ (GitgPreferencesHistory* self) {
#line 138 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_object_notify ((GObject*) self, "default-selection");
#line 624 "gitg-preferences-history.c"
}


static void __gitg_preferences_history______lambda84__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 137 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_gitg_preferences_history______lambda84_ ((GitgPreferencesHistory*) self);
#line 631 "gitg-preferences-history.c"
}


static gboolean _gitg_preferences_history___lambda85_ (GValue* value, GVariant* variant) {
	gboolean result = FALSE;
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 146 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_val_if_fail (value != NULL, FALSE);
#line 146 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_val_if_fail (variant != NULL, FALSE);
#line 147 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = variant;
#line 147 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = g_variant_get_string (_tmp0_, NULL);
#line 147 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_value_set_boolean (value, g_strcmp0 (_tmp1_, "last-activity") == 0);
#line 148 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = TRUE;
#line 148 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 653 "gitg-preferences-history.c"
}


static gboolean __gitg_preferences_history___lambda85__gsettings_bind_get_mapping (GValue* value, GVariant* variant, void* user_data) {
	gboolean result;
	result = _gitg_preferences_history___lambda85_ (value, variant);
#line 142 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 662 "gitg-preferences-history.c"
}


static GVariant* _gitg_preferences_history___lambda86_ (GValue* value, const GVariantType* expected_type) {
	GVariant* result = NULL;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GVariant* _tmp2_ = NULL;
#line 151 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_val_if_fail (value != NULL, NULL);
#line 151 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_return_val_if_fail (expected_type != NULL, NULL);
#line 152 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = g_value_get_boolean (value);
#line 152 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	if (_tmp1_) {
#line 152 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp0_ = "last-activity";
#line 681 "gitg-preferences-history.c"
	} else {
#line 152 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		_tmp0_ = "name";
#line 685 "gitg-preferences-history.c"
	}
#line 152 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp2_ = g_variant_new_string (_tmp0_);
#line 152 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_variant_ref_sink (_tmp2_);
#line 152 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	result = _tmp2_;
#line 152 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 695 "gitg-preferences-history.c"
}


static GVariant* __gitg_preferences_history___lambda86__gsettings_bind_set_mapping (GValue* value, const GVariantType* expected_type, void* user_data) {
	GVariant* result;
	result = _gitg_preferences_history___lambda86_ (value, expected_type);
#line 142 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return result;
#line 704 "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;
	Block82Data* _data82_;
	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;
	GtkRadioButton* _tmp11_ = NULL;
	GtkRadioButton* _tmp12_ = NULL;
	GtkRadioButton* _tmp13_ = NULL;
	GtkRadioButton* _tmp14_ = NULL;
	GtkRadioButton* _tmp15_ = NULL;
	GtkRadioButton* _tmp16_ = NULL;
	GtkRadioButton** _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	gchar* _tmp20_ = NULL;
	gchar** _tmp21_ = NULL;
	GSettings* _tmp22_ = NULL;
	GSettings* _tmp30_ = NULL;
	GtkCheckButton* _tmp31_ = NULL;
	GSettings* _tmp32_ = NULL;
	GtkCheckButton* _tmp33_ = NULL;
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	parent_class = G_OBJECT_CLASS (gitg_preferences_history_parent_class);
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistory);
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data82_ = g_slice_new0 (Block82Data);
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data82_->_ref_count_ = 1;
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data82_->self = g_object_ref (self);
#line 71 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp0_ = g_settings_new ("org.gnome.gitg.preferences.history");
#line 71 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data82_->settings = _tmp0_;
#line 73 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp1_ = _data82_->settings;
#line 73 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp2_ = self->priv->d_collapse_inactive_lanes_enabled;
#line 73 "/home/jesse/dev/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 78 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp3_ = _data82_->settings;
#line 78 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp4_ = self->priv->d_topological_order;
#line 78 "/home/jesse/dev/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 83 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp5_ = _data82_->settings;
#line 83 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp6_ = self->priv->d_mainline_head;
#line 83 "/home/jesse/dev/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 88 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp7_ = self->priv->d_adjustment_collapse;
#line 88 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_signal_connect_data (_tmp7_, "value-changed", (GCallback) __gitg_preferences_history___lambda81__gtk_adjustment_value_changed, block82_data_ref (_data82_), (GClosureNotify) block82_data_unref, 0);
#line 107 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp8_ = _data82_->settings;
#line 107 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp9_ = g_signal_connect_data (_tmp8_, "changed::collapse-inactive-lanes", (GCallback) __gitg_preferences_history___lambda82__g_settings_changed, block82_data_ref (_data82_), (GClosureNotify) block82_data_unref, 0);
#line 107 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data82_->monsig = _tmp9_;
#line 113 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) __gitg_preferences_history___lambda83__gtk_widget_destroy, block82_data_ref (_data82_), (GClosureNotify) block82_data_unref, 0);
#line 117 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp10_ = _data82_->settings;
#line 117 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	gitg_preferences_history_update_collapse_inactive_lanes (self, _tmp10_);
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp11_ = self->priv->d_select_current_branch;
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp12_ = _g_object_ref0 (_tmp11_);
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp13_ = self->priv->d_select_all_branches;
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp14_ = _g_object_ref0 (_tmp13_);
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp15_ = self->priv->d_select_all_commits;
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp16_ = _g_object_ref0 (_tmp15_);
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp17_ = g_new0 (GtkRadioButton*, 3 + 1);
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp17_[0] = _tmp12_;
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp17_[1] = _tmp14_;
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp17_[2] = _tmp16_;
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_select_buttons = (_vala_array_free (self->priv->d_select_buttons, self->priv->d_select_buttons_length1, (GDestroyNotify) g_object_unref), NULL);
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_select_buttons = _tmp17_;
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_select_buttons_length1 = 3;
#line 119 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->_d_select_buttons_size_ = self->priv->d_select_buttons_length1;
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp18_ = g_strdup ("current-branch");
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp19_ = g_strdup ("all-branches");
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp20_ = g_strdup ("all-commits");
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp21_ = g_new0 (gchar*, 3 + 1);
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp21_[0] = _tmp18_;
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp21_[1] = _tmp19_;
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp21_[2] = _tmp20_;
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_select_names = (_vala_array_free (self->priv->d_select_names, self->priv->d_select_names_length1, (GDestroyNotify) g_free), NULL);
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_select_names = _tmp21_;
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_select_names_length1 = 3;
#line 125 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->_d_select_names_size_ = self->priv->d_select_names_length1;
#line 131 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp22_ = _data82_->settings;
#line 131 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_settings_bind (_tmp22_, "default-selection", (GObject*) self, "default-selection", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
#line 844 "gitg-preferences-history.c"
	{
		gint i = 0;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		i = 0;
#line 849 "gitg-preferences-history.c"
		{
			gboolean _tmp23_ = FALSE;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
			_tmp23_ = TRUE;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
			while (TRUE) {
#line 856 "gitg-preferences-history.c"
				gint _tmp25_ = 0;
				GtkRadioButton** _tmp26_ = NULL;
				gint _tmp26__length1 = 0;
				GtkRadioButton** _tmp27_ = NULL;
				gint _tmp27__length1 = 0;
				gint _tmp28_ = 0;
				GtkRadioButton* _tmp29_ = NULL;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				if (!_tmp23_) {
#line 866 "gitg-preferences-history.c"
					gint _tmp24_ = 0;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					_tmp24_ = i;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					i = _tmp24_ + 1;
#line 872 "gitg-preferences-history.c"
				}
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp23_ = FALSE;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp25_ = i;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp26_ = self->priv->d_select_buttons;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp26__length1 = self->priv->d_select_buttons_length1;
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				if (!(_tmp25_ < _tmp26__length1)) {
#line 136 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
					break;
#line 886 "gitg-preferences-history.c"
				}
#line 137 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp27_ = self->priv->d_select_buttons;
#line 137 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp27__length1 = self->priv->d_select_buttons_length1;
#line 137 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp28_ = i;
#line 137 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				_tmp29_ = _tmp27_[_tmp28_];
#line 137 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
				g_signal_connect_object ((GObject*) _tmp29_, "notify::active", (GCallback) __gitg_preferences_history______lambda84__g_object_notify, self, 0);
#line 898 "gitg-preferences-history.c"
			}
		}
	}
#line 142 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp30_ = _data82_->settings;
#line 142 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp31_ = self->priv->d_sort_references_by_activity;
#line 142 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_settings_bind_with_mapping (_tmp30_, "reference-sort-order", (GObject*) _tmp31_, "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET, __gitg_preferences_history___lambda85__gsettings_bind_get_mapping, __gitg_preferences_history___lambda86__gsettings_bind_set_mapping, NULL, NULL);
#line 158 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp32_ = _data82_->settings;
#line 158 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_tmp33_ = self->priv->d_show_upstream_with_branch;
#line 158 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_settings_bind (_tmp32_, "show-upstream-with-branch", (GObject*) _tmp33_, "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	block82_data_unref (_data82_);
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_data82_ = NULL;
#line 69 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	return obj;
#line 920 "gitg-preferences-history.c"
}


static void gitg_preferences_history_class_init (GitgPreferencesHistoryClass * klass) {
	gint GitgPreferencesHistory_private_offset;
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	gitg_preferences_history_parent_class = g_type_class_peek_parent (klass);
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_type_class_add_private (klass, sizeof (GitgPreferencesHistoryPrivate));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_preferences_history_get_property;
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_preferences_history_set_property;
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	G_OBJECT_CLASS (klass)->constructor = gitg_preferences_history_constructor;
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_preferences_history_finalize;
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_PREFERENCES_HISTORY_DEFAULT_SELECTION, g_param_spec_string ("default-selection", "default-selection", "default-selection", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 24 "/home/jesse/dev/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/jesse/dev/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/jesse/dev/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/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	GitgPreferencesHistory_private_offset = g_type_class_get_instance_private_offset (klass);
#line 24 "/home/jesse/dev/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/jesse/dev/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/jesse/dev/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/jesse/dev/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/jesse/dev/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/jesse/dev/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 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "select_current_branch", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_select_current_branch));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "select_all_branches", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_select_all_branches));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "select_all_commits", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_select_all_commits));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sort_references_by_activity", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_sort_references_by_activity));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "show_upstream_with_branch", FALSE, GitgPreferencesHistory_private_offset + G_STRUCT_OFFSET (GitgPreferencesHistoryPrivate, d_show_upstream_with_branch));
#line 970 "gitg-preferences-history.c"
}


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


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


static void gitg_preferences_history_finalize (GObject* obj) {
	GitgPreferencesHistory * self;
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistory);
#line 31 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_collapse_inactive_lanes_enabled);
#line 34 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_adjustment_collapse);
#line 36 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_collapse_inactive_lanes);
#line 39 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_topological_order);
#line 42 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_mainline_head);
#line 45 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_select_current_branch);
#line 48 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_select_all_branches);
#line 51 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_select_all_commits);
#line 54 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_sort_references_by_activity);
#line 57 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	_g_object_unref0 (self->priv->d_show_upstream_with_branch);
#line 59 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_select_buttons = (_vala_array_free (self->priv->d_select_buttons, self->priv->d_select_buttons_length1, (GDestroyNotify) g_object_unref), NULL);
#line 60 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	self->priv->d_select_names = (_vala_array_free (self->priv->d_select_names, self->priv->d_select_names_length1, (GDestroyNotify) g_free), NULL);
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	G_OBJECT_CLASS (gitg_preferences_history_parent_class)->finalize (obj);
#line 1026 "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/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	switch (property_id) {
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		case GITG_PREFERENCES_HISTORY_DEFAULT_SELECTION:
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_value_set_string (value, gitg_preferences_history_get_default_selection (self));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		case GITG_PREFERENCES_HISTORY_WIDGET:
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_value_take_object (value, gitg_ext_preferences_get_widget ((GitgExtPreferences*) self));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		case GITG_PREFERENCES_HISTORY_ID:
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_value_take_string (value, gitg_ext_preferences_get_id ((GitgExtPreferences*) self));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		case GITG_PREFERENCES_HISTORY_DISPLAY_NAME:
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		g_value_take_string (value, gitg_ext_preferences_get_display_name ((GitgExtPreferences*) self));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 1073 "gitg-preferences-history.c"
		default:
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 1079 "gitg-preferences-history.c"
	}
}


static void _vala_gitg_preferences_history_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GitgPreferencesHistory * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_PREFERENCES_HISTORY, GitgPreferencesHistory);
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
	switch (property_id) {
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		case GITG_PREFERENCES_HISTORY_DEFAULT_SELECTION:
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		gitg_preferences_history_set_default_selection (self, g_value_get_string (value));
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 1095 "gitg-preferences-history.c"
		default:
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 24 "/home/jesse/dev/gitg/gitg/preferences/gitg-preferences-history.vala"
		break;
#line 1101 "gitg-preferences-history.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



