/* gitg-commit-submodule-info.c generated by valac 0.32.1, the Vala compiler
 * generated from gitg-commit-submodule-info.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2014 - 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>
#include "libgitg/libgitg.h"
#include <stdlib.h>
#include <string.h>


#define GITG_COMMIT_TYPE_SUBMODULE_INFO (gitg_commit_submodule_info_get_type ())
#define GITG_COMMIT_SUBMODULE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_COMMIT_TYPE_SUBMODULE_INFO, GitgCommitSubmoduleInfo))
#define GITG_COMMIT_SUBMODULE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_COMMIT_TYPE_SUBMODULE_INFO, GitgCommitSubmoduleInfoClass))
#define GITG_COMMIT_IS_SUBMODULE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_COMMIT_TYPE_SUBMODULE_INFO))
#define GITG_COMMIT_IS_SUBMODULE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_COMMIT_TYPE_SUBMODULE_INFO))
#define GITG_COMMIT_SUBMODULE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_COMMIT_TYPE_SUBMODULE_INFO, GitgCommitSubmoduleInfoClass))

typedef struct _GitgCommitSubmoduleInfo GitgCommitSubmoduleInfo;
typedef struct _GitgCommitSubmoduleInfoClass GitgCommitSubmoduleInfoClass;
typedef struct _GitgCommitSubmoduleInfoPrivate GitgCommitSubmoduleInfoPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _ggit_submodule_unref0(var) ((var == NULL) ? NULL : (var = (ggit_submodule_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define __vala_GgitOId_free0(var) ((var == NULL) ? NULL : (var = (_vala_GgitOId_free (var), NULL)))

struct _GitgCommitSubmoduleInfo {
	GtkGrid parent_instance;
	GitgCommitSubmoduleInfoPrivate * priv;
};

struct _GitgCommitSubmoduleInfoClass {
	GtkGridClass parent_class;
};

struct _GitgCommitSubmoduleInfoPrivate {
	GtkLabel* d_label_path;
	GtkLabel* d_label_url;
	GtkLabel* d_label_sha1;
	GtkLabel* d_label_subject;
	GgitSubmodule* d_submodule;
};


static gpointer gitg_commit_submodule_info_parent_class = NULL;

GType gitg_commit_submodule_info_get_type (void) G_GNUC_CONST;
#define GITG_COMMIT_SUBMODULE_INFO_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_COMMIT_TYPE_SUBMODULE_INFO, GitgCommitSubmoduleInfoPrivate))
enum  {
	GITG_COMMIT_SUBMODULE_INFO_DUMMY_PROPERTY,
	GITG_COMMIT_SUBMODULE_INFO_SUBMODULE
};
static void gitg_commit_submodule_info_update_info_from_repository (GitgCommitSubmoduleInfo* self, GgitOId* oid, GgitSubmodule* submodule);
static void gitg_commit_submodule_info_on_open_button_clicked (GitgCommitSubmoduleInfo* self);
static void _gitg_commit_submodule_info_on_open_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
GitgCommitSubmoduleInfo* gitg_commit_submodule_info_new (void);
GitgCommitSubmoduleInfo* gitg_commit_submodule_info_construct (GType object_type);
void gitg_commit_submodule_info_set_submodule (GitgCommitSubmoduleInfo* self, GgitSubmodule* value);
static void _vala_GgitOId_free (GgitOId* self);
static void g_cclosure_user_marshal_VOID__BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void gitg_commit_submodule_info_finalize (GObject* obj);
static void _vala_gitg_commit_submodule_info_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static void gitg_commit_submodule_info_update_info_from_repository (GitgCommitSubmoduleInfo* self, GgitOId* oid, GgitSubmodule* submodule) {
	GitgRepository* repo = NULL;
	GtkLabel* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
#line 42 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_return_if_fail (self != NULL);
#line 42 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_return_if_fail (oid != NULL);
#line 42 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_return_if_fail (submodule != NULL);
#line 46 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_tmp0_ = self->priv->d_label_subject;
#line 46 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gtk_label_set_text (_tmp0_, "");
#line 101 "gitg-commit-submodule-info.c"
	{
		GgitRepository* _tmp1_ = NULL;
		GgitSubmodule* _tmp2_ = NULL;
		GgitRepository* _tmp3_ = NULL;
		GgitRepository* _tmp4_ = NULL;
		GitgRepository* _tmp5_ = NULL;
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp2_ = submodule;
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp3_ = ggit_submodule_open (_tmp2_, &_inner_error_);
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp1_ = _tmp3_;
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 116 "gitg-commit-submodule-info.c"
			goto __catch4_g_error;
		}
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp4_ = _tmp1_;
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp1_ = NULL;
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp5_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GITG_TYPE_REPOSITORY) ? ((GitgRepository*) _tmp4_) : NULL;
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		if (_tmp5_ == NULL) {
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
			_g_object_unref0 (_tmp4_);
#line 129 "gitg-commit-submodule-info.c"
		}
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_object_unref0 (repo);
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		repo = _tmp5_;
#line 48 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_object_unref0 (_tmp1_);
#line 137 "gitg-commit-submodule-info.c"
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* e = NULL;
#line 48 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		e = _inner_error_;
#line 48 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_inner_error_ = NULL;
#line 54 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_error_free0 (e);
#line 54 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_object_unref0 (repo);
#line 54 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		return;
#line 153 "gitg-commit-submodule-info.c"
	}
	__finally4:
#line 48 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 48 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_object_unref0 (repo);
#line 48 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 48 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		g_clear_error (&_inner_error_);
#line 48 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		return;
#line 166 "gitg-commit-submodule-info.c"
	}
	{
		GitgCommit* commit = NULL;
		GitgRepository* _tmp6_ = NULL;
		GgitOId* _tmp7_ = NULL;
		gpointer _tmp8_ = NULL;
		GitgCommit* _tmp9_ = NULL;
#line 59 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp6_ = repo;
#line 59 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp7_ = oid;
#line 59 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp8_ = gitg_repository_lookup (_tmp6_, GITG_TYPE_COMMIT, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp7_, &_inner_error_);
#line 59 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		commit = (GitgCommit*) _tmp8_;
#line 59 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 184 "gitg-commit-submodule-info.c"
			goto __catch5_g_error;
		}
#line 61 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp9_ = commit;
#line 61 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		if (_tmp9_ != NULL) {
#line 191 "gitg-commit-submodule-info.c"
			GtkLabel* _tmp10_ = NULL;
			GitgCommit* _tmp11_ = NULL;
			const gchar* _tmp12_ = NULL;
#line 63 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
			_tmp10_ = self->priv->d_label_subject;
#line 63 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
			_tmp11_ = commit;
#line 63 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
			_tmp12_ = ggit_commit_get_subject ((GgitCommit*) _tmp11_);
#line 63 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
			gtk_label_set_text (_tmp10_, _tmp12_);
#line 203 "gitg-commit-submodule-info.c"
		}
#line 57 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_object_unref0 (commit);
#line 207 "gitg-commit-submodule-info.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e = NULL;
#line 57 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		e = _inner_error_;
#line 57 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_inner_error_ = NULL;
#line 57 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_error_free0 (e);
#line 219 "gitg-commit-submodule-info.c"
	}
	__finally5:
#line 57 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 57 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_object_unref0 (repo);
#line 57 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 57 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		g_clear_error (&_inner_error_);
#line 57 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		return;
#line 232 "gitg-commit-submodule-info.c"
	}
#line 42 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_g_object_unref0 (repo);
#line 236 "gitg-commit-submodule-info.c"
}


static void gitg_commit_submodule_info_on_open_button_clicked (GitgCommitSubmoduleInfo* self) {
	GgitSubmodule* _tmp0_ = NULL;
#line 92 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_return_if_fail (self != NULL);
#line 94 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_tmp0_ = self->priv->d_submodule;
#line 94 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_signal_emit_by_name (self, "request-open-repository", _tmp0_);
#line 248 "gitg-commit-submodule-info.c"
}


static void _gitg_commit_submodule_info_on_open_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gitg_commit_submodule_info_on_open_button_clicked ((GitgCommitSubmoduleInfo*) self);
#line 255 "gitg-commit-submodule-info.c"
}


GitgCommitSubmoduleInfo* gitg_commit_submodule_info_construct (GType object_type) {
	GitgCommitSubmoduleInfo * self = NULL;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	self = (GitgCommitSubmoduleInfo*) g_object_new (object_type, NULL);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	return self;
#line 265 "gitg-commit-submodule-info.c"
}


GitgCommitSubmoduleInfo* gitg_commit_submodule_info_new (void) {
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	return gitg_commit_submodule_info_construct (GITG_COMMIT_TYPE_SUBMODULE_INFO);
#line 272 "gitg-commit-submodule-info.c"
}


static gpointer _ggit_submodule_ref0 (gpointer self) {
#line 75 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	return self ? ggit_submodule_ref (self) : NULL;
#line 279 "gitg-commit-submodule-info.c"
}


static void _vala_GgitOId_free (GgitOId* self) {
#line 77 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_boxed_free (ggit_oid_get_type (), self);
#line 286 "gitg-commit-submodule-info.c"
}


void gitg_commit_submodule_info_set_submodule (GitgCommitSubmoduleInfo* self, GgitSubmodule* value) {
	GgitSubmodule* _tmp0_ = NULL;
	GgitSubmodule* _tmp1_ = NULL;
	GgitSubmodule* _tmp2_ = NULL;
#line 73 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_return_if_fail (self != NULL);
#line 75 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_tmp0_ = value;
#line 75 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_tmp1_ = _ggit_submodule_ref0 (_tmp0_);
#line 75 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_ggit_submodule_unref0 (self->priv->d_submodule);
#line 75 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	self->priv->d_submodule = _tmp1_;
#line 77 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_tmp2_ = value;
#line 77 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	if (_tmp2_ != NULL) {
#line 308 "gitg-commit-submodule-info.c"
		GtkLabel* _tmp3_ = NULL;
		GgitSubmodule* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gchar* submodule_url = NULL;
		GgitSubmodule* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		GtkLabel* _tmp12_ = NULL;
		GgitOId* oid = NULL;
		GgitSubmodule* _tmp13_ = NULL;
		GgitOId* _tmp14_ = NULL;
		GtkLabel* _tmp15_ = NULL;
		GgitOId* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		GgitOId* _tmp19_ = NULL;
		GgitSubmodule* _tmp20_ = NULL;
#line 79 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp3_ = self->priv->d_label_path;
#line 79 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp4_ = value;
#line 79 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp5_ = ggit_submodule_get_path (_tmp4_);
#line 79 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		gtk_label_set_text (_tmp3_, _tmp5_);
#line 80 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp6_ = value;
#line 80 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp7_ = ggit_submodule_get_url (_tmp6_);
#line 80 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp8_ = g_strdup (_tmp7_);
#line 80 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		submodule_url = _tmp8_;
#line 81 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp10_ = submodule_url;
#line 81 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		if (_tmp10_ != NULL) {
#line 348 "gitg-commit-submodule-info.c"
			const gchar* _tmp11_ = NULL;
#line 81 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
			_tmp11_ = submodule_url;
#line 81 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
			_tmp9_ = _tmp11_;
#line 354 "gitg-commit-submodule-info.c"
		} else {
#line 81 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
			_tmp9_ = "";
#line 358 "gitg-commit-submodule-info.c"
		}
#line 81 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp12_ = self->priv->d_label_url;
#line 81 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		gtk_label_set_text (_tmp12_, _tmp9_);
#line 83 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp13_ = value;
#line 83 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp14_ = ggit_submodule_get_workdir_id (_tmp13_);
#line 83 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		oid = _tmp14_;
#line 84 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp15_ = self->priv->d_label_sha1;
#line 84 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp16_ = oid;
#line 84 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp17_ = ggit_oid_to_string (_tmp16_);
#line 84 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp18_ = _tmp17_;
#line 84 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		gtk_label_set_text (_tmp15_, _tmp18_);
#line 84 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_free0 (_tmp18_);
#line 86 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp19_ = oid;
#line 86 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_tmp20_ = value;
#line 86 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		gitg_commit_submodule_info_update_info_from_repository (self, _tmp19_, _tmp20_);
#line 77 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		__vala_GgitOId_free0 (oid);
#line 77 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		_g_free0 (submodule_url);
#line 392 "gitg-commit-submodule-info.c"
	}
#line 73 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_object_notify ((GObject *) self, "submodule");
#line 396 "gitg-commit-submodule-info.c"
}


static void g_cclosure_user_marshal_VOID__BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__BOXED) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_VOID__BOXED callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_return_if_fail (n_param_values == 2);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		data1 = closure->data;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		data2 = param_values->data[0].v_pointer;
#line 415 "gitg-commit-submodule-info.c"
	} else {
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		data1 = param_values->data[0].v_pointer;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		data2 = closure->data;
#line 421 "gitg-commit-submodule-info.c"
	}
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	callback = (GMarshalFunc_VOID__BOXED) (marshal_data ? marshal_data : cc->callback);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	callback (data1, g_value_get_boxed (param_values + 1), data2);
#line 427 "gitg-commit-submodule-info.c"
}


static void gitg_commit_submodule_info_class_init (GitgCommitSubmoduleInfoClass * klass) {
	gint GitgCommitSubmoduleInfo_private_offset;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gitg_commit_submodule_info_parent_class = g_type_class_peek_parent (klass);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_type_class_add_private (klass, sizeof (GitgCommitSubmoduleInfoPrivate));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_commit_submodule_info_set_property;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_commit_submodule_info_finalize;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_SUBMODULE_INFO_SUBMODULE, g_param_spec_boxed ("submodule", "submodule", "submodule", ggit_submodule_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	GitgCommitSubmoduleInfo_private_offset = g_type_class_get_instance_private_offset (klass);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/gitg/ui/gitg-commit-submodule-info.ui");
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	g_signal_new ("request_open_repository", GITG_COMMIT_TYPE_SUBMODULE_INFO, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOXED, G_TYPE_NONE, 1, ggit_submodule_get_type ());
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label_path", FALSE, GitgCommitSubmoduleInfo_private_offset + G_STRUCT_OFFSET (GitgCommitSubmoduleInfoPrivate, d_label_path));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label_url", FALSE, GitgCommitSubmoduleInfo_private_offset + G_STRUCT_OFFSET (GitgCommitSubmoduleInfoPrivate, d_label_url));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label_sha1", FALSE, GitgCommitSubmoduleInfo_private_offset + G_STRUCT_OFFSET (GitgCommitSubmoduleInfoPrivate, d_label_sha1));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label_subject", FALSE, GitgCommitSubmoduleInfo_private_offset + G_STRUCT_OFFSET (GitgCommitSubmoduleInfoPrivate, d_label_subject));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_open_button_clicked", G_CALLBACK(_gitg_commit_submodule_info_on_open_button_clicked_gtk_button_clicked));
#line 459 "gitg-commit-submodule-info.c"
}


static void gitg_commit_submodule_info_instance_init (GitgCommitSubmoduleInfo * self) {
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	self->priv = GITG_COMMIT_SUBMODULE_INFO_GET_PRIVATE (self);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 468 "gitg-commit-submodule-info.c"
}


static void gitg_commit_submodule_info_finalize (GObject* obj) {
	GitgCommitSubmoduleInfo * self;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_COMMIT_TYPE_SUBMODULE_INFO, GitgCommitSubmoduleInfo);
#line 27 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_g_object_unref0 (self->priv->d_label_path);
#line 30 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_g_object_unref0 (self->priv->d_label_url);
#line 33 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_g_object_unref0 (self->priv->d_label_sha1);
#line 36 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_g_object_unref0 (self->priv->d_label_subject);
#line 38 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	_ggit_submodule_unref0 (self->priv->d_submodule);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	G_OBJECT_CLASS (gitg_commit_submodule_info_parent_class)->finalize (obj);
#line 488 "gitg-commit-submodule-info.c"
}


GType gitg_commit_submodule_info_get_type (void) {
	static volatile gsize gitg_commit_submodule_info_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_commit_submodule_info_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgCommitSubmoduleInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_commit_submodule_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgCommitSubmoduleInfo), 0, (GInstanceInitFunc) gitg_commit_submodule_info_instance_init, NULL };
		GType gitg_commit_submodule_info_type_id;
		gitg_commit_submodule_info_type_id = g_type_register_static (gtk_grid_get_type (), "GitgCommitSubmoduleInfo", &g_define_type_info, 0);
		g_once_init_leave (&gitg_commit_submodule_info_type_id__volatile, gitg_commit_submodule_info_type_id);
	}
	return gitg_commit_submodule_info_type_id__volatile;
}


static void _vala_gitg_commit_submodule_info_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GitgCommitSubmoduleInfo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_COMMIT_TYPE_SUBMODULE_INFO, GitgCommitSubmoduleInfo);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
	switch (property_id) {
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		case GITG_COMMIT_SUBMODULE_INFO_SUBMODULE:
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		gitg_commit_submodule_info_set_submodule (self, g_value_get_boxed (value));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		break;
#line 515 "gitg-commit-submodule-info.c"
		default:
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-info.vala"
		break;
#line 521 "gitg-commit-submodule-info.c"
	}
}



