/* gitg-commit-list-view.c generated by valac 0.34.7, the Vala compiler
 * generated from gitg-commit-list-view.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 <libgit2-glib/ggit.h>


#define GITG_TYPE_COMMIT_LIST_VIEW (gitg_commit_list_view_get_type ())
#define GITG_COMMIT_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_COMMIT_LIST_VIEW, GitgCommitListView))
#define GITG_COMMIT_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_COMMIT_LIST_VIEW, GitgCommitListViewClass))
#define GITG_IS_COMMIT_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_COMMIT_LIST_VIEW))
#define GITG_IS_COMMIT_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_COMMIT_LIST_VIEW))
#define GITG_COMMIT_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_COMMIT_LIST_VIEW, GitgCommitListViewClass))

typedef struct _GitgCommitListView GitgCommitListView;
typedef struct _GitgCommitListViewClass GitgCommitListViewClass;
typedef struct _GitgCommitListViewPrivate GitgCommitListViewPrivate;

#define GITG_TYPE_COMMIT_MODEL (gitg_commit_model_get_type ())
#define GITG_COMMIT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_COMMIT_MODEL, GitgCommitModel))
#define GITG_COMMIT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_COMMIT_MODEL, GitgCommitModelClass))
#define GITG_IS_COMMIT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_COMMIT_MODEL))
#define GITG_IS_COMMIT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_COMMIT_MODEL))
#define GITG_COMMIT_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_COMMIT_MODEL, GitgCommitModelClass))

typedef struct _GitgCommitModel GitgCommitModel;
typedef struct _GitgCommitModelClass GitgCommitModelClass;

#define GITG_TYPE_REPOSITORY (gitg_repository_get_type ())
#define GITG_REPOSITORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REPOSITORY, GitgRepository))
#define GITG_REPOSITORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_REPOSITORY, GitgRepositoryClass))
#define GITG_IS_REPOSITORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REPOSITORY))
#define GITG_IS_REPOSITORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_REPOSITORY))
#define GITG_REPOSITORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_REPOSITORY, GitgRepositoryClass))

typedef struct _GitgRepository GitgRepository;
typedef struct _GitgRepositoryClass GitgRepositoryClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))

#define GITG_TYPE_CELL_RENDERER_LANES (gitg_cell_renderer_lanes_get_type ())
#define GITG_CELL_RENDERER_LANES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_CELL_RENDERER_LANES, GitgCellRendererLanes))
#define GITG_CELL_RENDERER_LANES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_CELL_RENDERER_LANES, GitgCellRendererLanesClass))
#define GITG_IS_CELL_RENDERER_LANES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_CELL_RENDERER_LANES))
#define GITG_IS_CELL_RENDERER_LANES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_CELL_RENDERER_LANES))
#define GITG_CELL_RENDERER_LANES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_CELL_RENDERER_LANES, GitgCellRendererLanesClass))

typedef struct _GitgCellRendererLanes GitgCellRendererLanes;
typedef struct _GitgCellRendererLanesClass GitgCellRendererLanesClass;

#define GITG_TYPE_COMMIT (gitg_commit_get_type ())
#define GITG_COMMIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_COMMIT, GitgCommit))
#define GITG_COMMIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_COMMIT, GitgCommitClass))
#define GITG_IS_COMMIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_COMMIT))
#define GITG_IS_COMMIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_COMMIT))
#define GITG_COMMIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_COMMIT, GitgCommitClass))

typedef struct _GitgCommit GitgCommit;
typedef struct _GitgCommitClass GitgCommitClass;

#define GITG_TYPE_REF (gitg_ref_get_type ())
#define GITG_REF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REF, GitgRef))
#define GITG_IS_REF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REF))
#define GITG_REF_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_TYPE_REF, GitgRefIface))

typedef struct _GitgRef GitgRef;
typedef struct _GitgRefIface GitgRefIface;

#define GITG_TYPE_PARSED_REF_NAME (gitg_parsed_ref_name_get_type ())
#define GITG_PARSED_REF_NAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_PARSED_REF_NAME, GitgParsedRefName))
#define GITG_PARSED_REF_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_PARSED_REF_NAME, GitgParsedRefNameClass))
#define GITG_IS_PARSED_REF_NAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_PARSED_REF_NAME))
#define GITG_IS_PARSED_REF_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_PARSED_REF_NAME))
#define GITG_PARSED_REF_NAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_PARSED_REF_NAME, GitgParsedRefNameClass))

typedef struct _GitgParsedRefName GitgParsedRefName;
typedef struct _GitgParsedRefNameClass GitgParsedRefNameClass;

#define GITG_TYPE_REF_STATE (gitg_ref_state_get_type ())
#define __vala_GgitOId_free0(var) ((var == NULL) ? NULL : (var = (_vala_GgitOId_free (var), NULL)))

struct _GitgCommitListView {
	GtkTreeView parent_instance;
	GitgCommitListViewPrivate * priv;
};

struct _GitgCommitListViewClass {
	GtkTreeViewClass parent_class;
};

typedef enum  {
	GITG_REF_STATE_NONE,
	GITG_REF_STATE_SELECTED,
	GITG_REF_STATE_PRELIGHT
} GitgRefState;

struct _GitgRefIface {
	GTypeInterface parent_iface;
	GitgRepository* (*get_owner) (GitgRef* self);
	GitgParsedRefName* (*get_d_parsed_name) (GitgRef* self);
	void (*set_d_parsed_name) (GitgRef* self, GitgParsedRefName* value);
	GList* (*get_d_pushes) (GitgRef* self);
	void (*set_d_pushes) (GitgRef* self, GList* value);
	GitgRefState (*get_state) (GitgRef* self);
	void (*set_state) (GitgRef* self, GitgRefState value);
	gboolean (*get_working) (GitgRef* self);
	void (*set_working) (GitgRef* self, gboolean value);
};


static gpointer gitg_commit_list_view_parent_class = NULL;
static GtkBuildableIface* gitg_commit_list_view_gtk_buildable_parent_iface = NULL;

GType gitg_commit_list_view_get_type (void) G_GNUC_CONST;
enum  {
	GITG_COMMIT_LIST_VIEW_DUMMY_PROPERTY
};
GType gitg_commit_model_get_type (void) G_GNUC_CONST;
GitgCommitListView* gitg_commit_list_view_new (GitgCommitModel* model);
GitgCommitListView* gitg_commit_list_view_construct (GType object_type, GitgCommitModel* model);
GType gitg_repository_get_type (void) G_GNUC_CONST;
GitgCommitListView* gitg_commit_list_view_new_for_repository (GitgRepository* repository);
GitgCommitListView* gitg_commit_list_view_construct_for_repository (GType object_type, GitgRepository* repository);
GitgCommitModel* gitg_commit_model_new (GitgRepository* repository);
GitgCommitModel* gitg_commit_model_construct (GType object_type, GitgRepository* repository);
GtkCellRenderer* gitg_commit_list_view_find_cell_at_pos (GitgCommitListView* self, GtkTreeViewColumn* column, GtkTreePath* path, gint x, gint* width);
static void gitg_commit_list_view_lanes_data_func (GitgCommitListView* self, GtkCellLayout* layout, GtkCellRenderer* cell, GtkTreeModel* model, GtkTreeIter* iter);
GType gitg_cell_renderer_lanes_get_type (void) G_GNUC_CONST;
GType gitg_commit_get_type (void) G_GNUC_CONST;
GitgCommit* gitg_commit_model_commit_from_iter (GitgCommitModel* self, GtkTreeIter* iter);
GType gitg_parsed_ref_name_get_type (void) G_GNUC_CONST;
GType gitg_ref_state_get_type (void) G_GNUC_CONST;
GType gitg_ref_get_type (void) G_GNUC_CONST;
GitgRepository* gitg_commit_model_get_repository (GitgCommitModel* self);
GSList* gitg_repository_refs_for_id (GitgRepository* self, GgitOId* id);
static void _vala_GgitOId_free (GgitOId* self);
void gitg_cell_renderer_lanes_set_commit (GitgCellRendererLanes* self, GitgCommit* value);
void gitg_cell_renderer_lanes_set_next_commit (GitgCellRendererLanes* self, GitgCommit* value);
void gitg_cell_renderer_lanes_set_labels (GitgCellRendererLanes* self, GSList* value);
static void gitg_commit_list_view_real_parser_finished (GtkBuildable* base, GtkBuilder* builder);
static void _gitg_commit_list_view_lanes_data_func_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);


GitgCommitListView* gitg_commit_list_view_construct (GType object_type, GitgCommitModel* model) {
	GitgCommitListView * self = NULL;
	GitgCommitModel* _tmp0_ = NULL;
#line 24 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_val_if_fail (model != NULL, NULL);
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp0_ = model;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	self = (GitgCommitListView*) g_object_new (object_type, "model", _tmp0_, NULL);
#line 24 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	return self;
#line 177 "gitg-commit-list-view.c"
}


GitgCommitListView* gitg_commit_list_view_new (GitgCommitModel* model) {
#line 24 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	return gitg_commit_list_view_construct (GITG_TYPE_COMMIT_LIST_VIEW, model);
#line 184 "gitg-commit-list-view.c"
}


GitgCommitListView* gitg_commit_list_view_construct_for_repository (GType object_type, GitgRepository* repository) {
	GitgCommitListView * self = NULL;
	GitgRepository* _tmp0_ = NULL;
	GitgCommitModel* _tmp1_ = NULL;
	GitgCommitModel* _tmp2_ = NULL;
#line 29 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_val_if_fail (repository != NULL, NULL);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp0_ = repository;
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp1_ = gitg_commit_model_new (_tmp0_);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp2_ = _tmp1_;
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	self = (GitgCommitListView*) gitg_commit_list_view_construct (object_type, _tmp2_);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_g_object_unref0 (_tmp2_);
#line 29 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	return self;
#line 207 "gitg-commit-list-view.c"
}


GitgCommitListView* gitg_commit_list_view_new_for_repository (GitgRepository* repository) {
#line 29 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	return gitg_commit_list_view_construct_for_repository (GITG_TYPE_COMMIT_LIST_VIEW, repository);
#line 214 "gitg-commit-list-view.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	return self ? g_object_ref (self) : NULL;
#line 221 "gitg-commit-list-view.c"
}


GtkCellRenderer* gitg_commit_list_view_find_cell_at_pos (GitgCommitListView* self, GtkTreeViewColumn* column, GtkTreePath* path, gint x, gint* width) {
	gint _vala_width = 0;
	GtkCellRenderer* result = NULL;
	GtkTreeIter iter = {0};
	GtkTreeModel* _tmp0_ = NULL;
	GtkTreeModel* _tmp1_ = NULL;
	GtkTreePath* _tmp2_ = NULL;
	GtkTreeIter _tmp3_ = {0};
	GtkTreeViewColumn* _tmp4_ = NULL;
	GtkTreeModel* _tmp5_ = NULL;
	GtkTreeModel* _tmp6_ = NULL;
	GtkTreeIter _tmp7_ = {0};
	GList* cells = NULL;
	GtkTreeViewColumn* _tmp8_ = NULL;
	GList* _tmp9_ = NULL;
	GList* _tmp10_ = NULL;
#line 34 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 34 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_val_if_fail (column != NULL, NULL);
#line 34 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_val_if_fail (path != NULL, NULL);
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp0_ = gtk_tree_view_get_model ((GtkTreeView*) self);
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp1_ = _tmp0_;
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp2_ = path;
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	gtk_tree_model_get_iter (_tmp1_, &_tmp3_, _tmp2_);
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	iter = _tmp3_;
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp4_ = column;
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp5_ = gtk_tree_view_get_model ((GtkTreeView*) self);
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp6_ = _tmp5_;
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp7_ = iter;
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	gtk_tree_view_column_cell_set_cell_data (_tmp4_, _tmp6_, &_tmp7_, FALSE, FALSE);
#line 44 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp8_ = column;
#line 44 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp9_ = gtk_cell_layout_get_cells ((GtkCellLayout*) _tmp8_);
#line 44 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	cells = _tmp9_;
#line 46 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp10_ = cells;
#line 275 "gitg-commit-list-view.c"
	{
		GList* cell_collection = NULL;
		GList* cell_it = NULL;
#line 46 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		cell_collection = _tmp10_;
#line 46 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		for (cell_it = cell_collection; cell_it != NULL; cell_it = cell_it->next) {
#line 283 "gitg-commit-list-view.c"
			GtkCellRenderer* cell = NULL;
#line 46 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
			cell = (GtkCellRenderer*) cell_it->data;
#line 287 "gitg-commit-list-view.c"
			{
				gint start = 0;
				gint cellw = 0;
				GtkTreeViewColumn* _tmp11_ = NULL;
				GtkCellRenderer* _tmp12_ = NULL;
				gint _tmp13_ = 0;
				gint _tmp14_ = 0;
				gboolean _tmp15_ = FALSE;
				gboolean _tmp16_ = FALSE;
				gint _tmp17_ = 0;
				gint _tmp18_ = 0;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				_tmp11_ = column;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				_tmp12_ = cell;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				_tmp15_ = gtk_tree_view_column_cell_get_position (_tmp11_, _tmp12_, &_tmp13_, &_tmp14_);
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				start = _tmp13_;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				cellw = _tmp14_;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				if (!_tmp15_) {
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					continue;
#line 313 "gitg-commit-list-view.c"
				}
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				_tmp17_ = x;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				_tmp18_ = start;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				if (_tmp17_ >= _tmp18_) {
#line 321 "gitg-commit-list-view.c"
					gint _tmp19_ = 0;
					gint _tmp20_ = 0;
					gint _tmp21_ = 0;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_tmp19_ = x;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_tmp20_ = start;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_tmp21_ = cellw;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_tmp16_ = _tmp19_ <= (_tmp20_ + _tmp21_);
#line 333 "gitg-commit-list-view.c"
				} else {
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_tmp16_ = FALSE;
#line 337 "gitg-commit-list-view.c"
				}
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				if (_tmp16_) {
#line 341 "gitg-commit-list-view.c"
					gint _tmp22_ = 0;
					GtkCellRenderer* _tmp23_ = NULL;
					GtkCellRenderer* _tmp24_ = NULL;
#line 58 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_tmp22_ = cellw;
#line 58 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_vala_width = _tmp22_;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_tmp23_ = cell;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_tmp24_ = _g_object_ref0 (_tmp23_);
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					result = _tmp24_;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_g_list_free0 (cells);
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					if (width) {
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
						*width = _vala_width;
#line 361 "gitg-commit-list-view.c"
					}
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					return result;
#line 365 "gitg-commit-list-view.c"
				}
			}
		}
	}
#line 63 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_vala_width = 0;
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	result = NULL;
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_g_list_free0 (cells);
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	if (width) {
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		*width = _vala_width;
#line 380 "gitg-commit-list-view.c"
	}
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	return result;
#line 384 "gitg-commit-list-view.c"
}


static void _vala_GgitOId_free (GgitOId* self) {
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_boxed_free (ggit_oid_get_type (), self);
#line 391 "gitg-commit-list-view.c"
}


static void gitg_commit_list_view_lanes_data_func (GitgCommitListView* self, GtkCellLayout* layout, GtkCellRenderer* cell, GtkTreeModel* model, GtkTreeIter* iter) {
	GitgCommitModel* m = NULL;
	GtkTreeModel* _tmp0_ = NULL;
	GitgCommitModel* _tmp1_ = NULL;
	GitgCommitModel* _tmp2_ = NULL;
	GitgCellRendererLanes* lanes = NULL;
	GtkCellRenderer* _tmp3_ = NULL;
	GitgCellRendererLanes* _tmp4_ = NULL;
	GitgCommit* commit = NULL;
	GitgCommitModel* _tmp5_ = NULL;
	GtkTreeIter _tmp6_ = {0};
	GitgCommit* _tmp7_ = NULL;
	GitgCommit* _tmp8_ = NULL;
	GtkTreeIter cp = {0};
	GtkTreeIter _tmp9_ = {0};
	GitgCommit* next_commit = NULL;
	GitgCommitModel* _tmp10_ = NULL;
	gboolean _tmp11_ = FALSE;
	GSList* labels = NULL;
	GitgCommitModel* _tmp15_ = NULL;
	GitgRepository* _tmp16_ = NULL;
	GitgRepository* _tmp17_ = NULL;
	GitgCommit* _tmp18_ = NULL;
	GgitOId* _tmp19_ = NULL;
	GgitOId* _tmp20_ = NULL;
	GSList* _tmp21_ = NULL;
	GSList* _tmp22_ = NULL;
	GitgCellRendererLanes* _tmp23_ = NULL;
	GitgCommit* _tmp24_ = NULL;
	GitgCellRendererLanes* _tmp25_ = NULL;
	GitgCommit* _tmp26_ = NULL;
	GitgCellRendererLanes* _tmp27_ = NULL;
	GSList* _tmp28_ = NULL;
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_if_fail (self != NULL);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_if_fail (layout != NULL);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_if_fail (cell != NULL);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_if_fail (model != NULL);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_if_fail (iter != NULL);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp0_ = model;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GITG_TYPE_COMMIT_MODEL) ? ((GitgCommitModel*) _tmp0_) : NULL);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	m = _tmp1_;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp2_ = m;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	if (_tmp2_ == NULL) {
#line 76 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		_g_object_unref0 (m);
#line 76 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		return;
#line 452 "gitg-commit-list-view.c"
	}
#line 79 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp3_ = cell;
#line 79 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GITG_TYPE_CELL_RENDERER_LANES, GitgCellRendererLanes));
#line 79 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	lanes = _tmp4_;
#line 80 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp5_ = m;
#line 80 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp6_ = *iter;
#line 80 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp7_ = gitg_commit_model_commit_from_iter (_tmp5_, &_tmp6_);
#line 80 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	commit = _tmp7_;
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp8_ = commit;
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	if (_tmp8_ == NULL) {
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		_g_object_unref0 (commit);
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		_g_object_unref0 (lanes);
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		_g_object_unref0 (m);
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		return;
#line 480 "gitg-commit-list-view.c"
	}
#line 87 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp9_ = *iter;
#line 87 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	cp = _tmp9_;
#line 88 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	next_commit = NULL;
#line 90 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp10_ = m;
#line 90 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp11_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp10_, &cp);
#line 90 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	if (_tmp11_) {
#line 494 "gitg-commit-list-view.c"
		GitgCommitModel* _tmp12_ = NULL;
		GtkTreeIter _tmp13_ = {0};
		GitgCommit* _tmp14_ = NULL;
#line 92 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		_tmp12_ = m;
#line 92 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		_tmp13_ = cp;
#line 92 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		_tmp14_ = gitg_commit_model_commit_from_iter (_tmp12_, &_tmp13_);
#line 92 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		_g_object_unref0 (next_commit);
#line 92 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		next_commit = _tmp14_;
#line 508 "gitg-commit-list-view.c"
	}
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp15_ = m;
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp16_ = gitg_commit_model_get_repository (_tmp15_);
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp17_ = _tmp16_;
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp18_ = commit;
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp19_ = ggit_object_get_id ((GgitObject*) _tmp18_);
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp20_ = _tmp19_;
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp21_ = gitg_repository_refs_for_id (_tmp17_, _tmp20_);
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp22_ = _tmp21_;
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	__vala_GgitOId_free0 (_tmp20_);
#line 95 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	labels = _tmp22_;
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp23_ = lanes;
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp24_ = commit;
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	gitg_cell_renderer_lanes_set_commit (_tmp23_, _tmp24_);
#line 98 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp25_ = lanes;
#line 98 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp26_ = next_commit;
#line 98 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	gitg_cell_renderer_lanes_set_next_commit (_tmp25_, _tmp26_);
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp27_ = lanes;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp28_ = labels;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	gitg_cell_renderer_lanes_set_labels (_tmp27_, _tmp28_);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_g_object_unref0 (next_commit);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_g_object_unref0 (commit);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_g_object_unref0 (lanes);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_g_object_unref0 (m);
#line 556 "gitg-commit-list-view.c"
}


static void _gitg_commit_list_view_lanes_data_func_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
#line 118 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	gitg_commit_list_view_lanes_data_func ((GitgCommitListView*) self, cell_layout, cell, tree_model, iter);
#line 563 "gitg-commit-list-view.c"
}


static void gitg_commit_list_view_real_parser_finished (GtkBuildable* base, GtkBuilder* builder) {
	GitgCommitListView * self;
	GtkBuilder* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
#line 102 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	self = (GitgCommitListView*) base;
#line 102 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	g_return_if_fail (builder != NULL);
#line 104 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp0_ = builder;
#line 104 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	gitg_commit_list_view_gtk_buildable_parent_iface->parser_finished ((GtkBuildable*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_tree_view_get_type (), GtkTreeView), _tmp0_);
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	_tmp1_ = gtk_tree_view_get_columns ((GtkTreeView*) self);
#line 581 "gitg-commit-list-view.c"
	{
		GList* column_collection = NULL;
		GList* column_it = NULL;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		column_collection = _tmp1_;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		for (column_it = column_collection; column_it != NULL; column_it = column_it->next) {
#line 589 "gitg-commit-list-view.c"
			GtkTreeViewColumn* column = NULL;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
			column = (GtkTreeViewColumn*) column_it->data;
#line 593 "gitg-commit-list-view.c"
			{
				GtkTreeViewColumn* _tmp2_ = NULL;
				GList* _tmp3_ = NULL;
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				_tmp2_ = column;
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
				_tmp3_ = gtk_cell_layout_get_cells ((GtkCellLayout*) _tmp2_);
#line 601 "gitg-commit-list-view.c"
				{
					GList* cell_collection = NULL;
					GList* cell_it = NULL;
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					cell_collection = _tmp3_;
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					for (cell_it = cell_collection; cell_it != NULL; cell_it = cell_it->next) {
#line 609 "gitg-commit-list-view.c"
						GtkCellRenderer* cell = NULL;
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
						cell = (GtkCellRenderer*) cell_it->data;
#line 613 "gitg-commit-list-view.c"
						{
							GitgCellRendererLanes* lanes = NULL;
							GtkCellRenderer* _tmp4_ = NULL;
							GitgCellRendererLanes* _tmp5_ = NULL;
							GitgCellRendererLanes* _tmp6_ = NULL;
							GtkTreeViewColumn* _tmp7_ = NULL;
							GitgCellRendererLanes* _tmp8_ = NULL;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
							_tmp4_ = cell;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
							_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GITG_TYPE_CELL_RENDERER_LANES) ? ((GitgCellRendererLanes*) _tmp4_) : NULL);
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
							lanes = _tmp5_;
#line 113 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
							_tmp6_ = lanes;
#line 113 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
							if (_tmp6_ == NULL) {
#line 115 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
								_g_object_unref0 (lanes);
#line 115 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
								continue;
#line 635 "gitg-commit-list-view.c"
							}
#line 118 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
							_tmp7_ = column;
#line 118 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
							_tmp8_ = lanes;
#line 118 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
							gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp7_, (GtkCellRenderer*) _tmp8_, _gitg_commit_list_view_lanes_data_func_gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
							_g_object_unref0 (lanes);
#line 645 "gitg-commit-list-view.c"
						}
					}
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
					_g_list_free0 (cell_collection);
#line 650 "gitg-commit-list-view.c"
				}
			}
		}
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
		_g_list_free0 (column_collection);
#line 656 "gitg-commit-list-view.c"
	}
}


static void gitg_commit_list_view_class_init (GitgCommitListViewClass * klass) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	gitg_commit_list_view_parent_class = g_type_class_peek_parent (klass);
#line 664 "gitg-commit-list-view.c"
}


static void gitg_commit_list_view_gtk_buildable_interface_init (GtkBuildableIface * iface) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	gitg_commit_list_view_gtk_buildable_parent_iface = g_type_interface_peek_parent (iface);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-commit-list-view.vala"
	iface->parser_finished = (void (*)(GtkBuildable*, GtkBuilder*)) gitg_commit_list_view_real_parser_finished;
#line 673 "gitg-commit-list-view.c"
}


static void gitg_commit_list_view_instance_init (GitgCommitListView * self) {
}


GType gitg_commit_list_view_get_type (void) {
	static volatile gsize gitg_commit_list_view_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_commit_list_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgCommitListViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_commit_list_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgCommitListView), 0, (GInstanceInitFunc) gitg_commit_list_view_instance_init, NULL };
		static const GInterfaceInfo gtk_buildable_info = { (GInterfaceInitFunc) gitg_commit_list_view_gtk_buildable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gitg_commit_list_view_type_id;
		gitg_commit_list_view_type_id = g_type_register_static (gtk_tree_view_get_type (), "GitgCommitListView", &g_define_type_info, 0);
		g_type_add_interface_static (gitg_commit_list_view_type_id, GTK_TYPE_BUILDABLE, &gtk_buildable_info);
		g_once_init_leave (&gitg_commit_list_view_type_id__volatile, gitg_commit_list_view_type_id);
	}
	return gitg_commit_list_view_type_id__volatile;
}



