/* gitg-commit-action-create-tag.c generated by valac 0.56.19, the Vala compiler
 * generated from gitg-commit-action-create-tag.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-object.h>
#include "libgitg-ext.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "libgitg.h"
#include "config.h"
#include <gtk/gtk.h>
#include <libgit2-glib/ggit.h>
#include <gee.h>
#include <glib/gi18n-lib.h>

#define GITG_COMMIT_ACTION_CREATE_TAG_version VERSION
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GITG_TYPE_COMMIT_ACTION_CREATE_TAG (gitg_commit_action_create_tag_get_type ())
#define GITG_COMMIT_ACTION_CREATE_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_COMMIT_ACTION_CREATE_TAG, GitgCommitActionCreateTag))
#define GITG_COMMIT_ACTION_CREATE_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_COMMIT_ACTION_CREATE_TAG, GitgCommitActionCreateTagClass))
#define GITG_IS_COMMIT_ACTION_CREATE_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_COMMIT_ACTION_CREATE_TAG))
#define GITG_IS_COMMIT_ACTION_CREATE_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_COMMIT_ACTION_CREATE_TAG))
#define GITG_COMMIT_ACTION_CREATE_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_COMMIT_ACTION_CREATE_TAG, GitgCommitActionCreateTagClass))

typedef struct _GitgCommitActionCreateTag GitgCommitActionCreateTag;
typedef struct _GitgCommitActionCreateTagClass GitgCommitActionCreateTagClass;
typedef struct _GitgCommitActionCreateTagPrivate GitgCommitActionCreateTagPrivate;
enum  {
	GITG_COMMIT_ACTION_CREATE_TAG_0_PROPERTY,
	GITG_COMMIT_ACTION_CREATE_TAG_APPLICATION_PROPERTY,
	GITG_COMMIT_ACTION_CREATE_TAG_ACTION_INTERFACE_PROPERTY,
	GITG_COMMIT_ACTION_CREATE_TAG_COMMIT_PROPERTY,
	GITG_COMMIT_ACTION_CREATE_TAG_ID_PROPERTY,
	GITG_COMMIT_ACTION_CREATE_TAG_DISPLAY_NAME_PROPERTY,
	GITG_COMMIT_ACTION_CREATE_TAG_DESCRIPTION_PROPERTY,
	GITG_COMMIT_ACTION_CREATE_TAG_NUM_PROPERTIES
};
static GParamSpec* gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GITG_TYPE_CREATE_TAG_DIALOG (gitg_create_tag_dialog_get_type ())
#define GITG_CREATE_TAG_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_CREATE_TAG_DIALOG, GitgCreateTagDialog))
#define GITG_CREATE_TAG_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_CREATE_TAG_DIALOG, GitgCreateTagDialogClass))
#define GITG_IS_CREATE_TAG_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_CREATE_TAG_DIALOG))
#define GITG_IS_CREATE_TAG_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_CREATE_TAG_DIALOG))
#define GITG_CREATE_TAG_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_CREATE_TAG_DIALOG, GitgCreateTagDialogClass))

typedef struct _GitgCreateTagDialog GitgCreateTagDialog;
typedef struct _GitgCreateTagDialogClass GitgCreateTagDialogClass;
typedef struct _Block58Data Block58Data;
#define _g_free0(var) (var = (g_free (var), NULL))
#define __vala_GgitOId_free0(var) ((var == NULL) ? NULL : (var = (_vala_GgitOId_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _GitgCommitActionCreateTag {
	GObject parent_instance;
	GitgCommitActionCreateTagPrivate * priv;
};

struct _GitgCommitActionCreateTagClass {
	GObjectClass parent_class;
	void (*activate) (GitgCommitActionCreateTag* self);
	gchar* (*get_id) (GitgCommitActionCreateTag* self);
	gchar* (*get_description) (GitgCommitActionCreateTag* self);
};

struct _GitgCommitActionCreateTagPrivate {
	GitgExtApplication* _application;
	GitgExtRefActionInterface* _action_interface;
	GitgCommit* _commit;
};

struct _Block58Data {
	int _ref_count_;
	GitgCommitActionCreateTag* self;
	GitgCreateTagDialog* dlg;
};

static gint GitgCommitActionCreateTag_private_offset;
static gpointer gitg_commit_action_create_tag_parent_class = NULL;
static GitgExtUIElementIface * gitg_commit_action_create_tag_gitg_ext_ui_element_parent_iface = NULL;
static GitgExtActionIface * gitg_commit_action_create_tag_gitg_ext_action_parent_iface = NULL;
static GitgExtCommitActionIface * gitg_commit_action_create_tag_gitg_ext_commit_action_parent_iface = NULL;

VALA_EXTERN GType gitg_commit_action_create_tag_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgCommitActionCreateTag, g_object_unref)
VALA_EXTERN void gitg_commit_action_create_tag_activate (GitgCommitActionCreateTag* self);
VALA_EXTERN gchar* gitg_commit_action_create_tag_get_id (GitgCommitActionCreateTag* self);
VALA_EXTERN gchar* gitg_commit_action_create_tag_get_description (GitgCommitActionCreateTag* self);
VALA_EXTERN GitgCommitActionCreateTag* gitg_commit_action_create_tag_new (GitgExtApplication* application,
                                                              GitgExtRefActionInterface* action_interface,
                                                              GitgCommit* commit);
VALA_EXTERN GitgCommitActionCreateTag* gitg_commit_action_create_tag_construct (GType object_type,
                                                                    GitgExtApplication* application,
                                                                    GitgExtRefActionInterface* action_interface,
                                                                    GitgCommit* commit);
static void gitg_commit_action_create_tag_real_activate (GitgCommitActionCreateTag* self);
VALA_EXTERN GType gitg_create_tag_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgCreateTagDialog, g_object_unref)
static Block58Data* block58_data_ref (Block58Data* _data58_);
static void block58_data_unref (void * _userdata_);
VALA_EXTERN GitgCreateTagDialog* gitg_create_tag_dialog_new (GtkWindow* parent);
VALA_EXTERN GitgCreateTagDialog* gitg_create_tag_dialog_construct (GType object_type,
                                                       GtkWindow* parent);
static void __lambda122_ (Block58Data* _data58_,
                   GtkDialog* d,
                   gint resp);
VALA_EXTERN gchar* gitg_create_tag_dialog_get_new_tag_message (GitgCreateTagDialog* self);
VALA_EXTERN gchar* gitg_create_tag_dialog_get_new_tag_name (GitgCreateTagDialog* self);
static void _vala_GgitOId_free (GgitOId* self);
static void ___lambda122__gtk_dialog_response (GtkDialog* _sender,
                                        gint response_id,
                                        gpointer self);
static void gitg_commit_action_create_tag_finalize (GObject * obj);
static GType gitg_commit_action_create_tag_get_type_once (void);
static void _vala_gitg_commit_action_create_tag_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_gitg_commit_action_create_tag_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);

static inline gpointer
gitg_commit_action_create_tag_get_instance_private (GitgCommitActionCreateTag* self)
{
	return G_STRUCT_MEMBER_P (self, GitgCommitActionCreateTag_private_offset);
}

GitgCommitActionCreateTag*
gitg_commit_action_create_tag_construct (GType object_type,
                                         GitgExtApplication* application,
                                         GitgExtRefActionInterface* action_interface,
                                         GitgCommit* commit)
{
	GitgCommitActionCreateTag * self = NULL;
	g_return_val_if_fail (application != NULL, NULL);
	g_return_val_if_fail (action_interface != NULL, NULL);
	g_return_val_if_fail (commit != NULL, NULL);
	self = (GitgCommitActionCreateTag*) g_object_new (object_type, "application", application, "action-interface", action_interface, "commit", commit, NULL);
	return self;
}

GitgCommitActionCreateTag*
gitg_commit_action_create_tag_new (GitgExtApplication* application,
                                   GitgExtRefActionInterface* action_interface,
                                   GitgCommit* commit)
{
	return gitg_commit_action_create_tag_construct (GITG_TYPE_COMMIT_ACTION_CREATE_TAG, application, action_interface, commit);
}

static Block58Data*
block58_data_ref (Block58Data* _data58_)
{
	g_atomic_int_inc (&_data58_->_ref_count_);
	return _data58_;
}

static void
block58_data_unref (void * _userdata_)
{
	Block58Data* _data58_;
	_data58_ = (Block58Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data58_->_ref_count_)) {
		GitgCommitActionCreateTag* self;
		self = _data58_->self;
		_g_object_unref0 (_data58_->dlg);
		_g_object_unref0 (self);
		g_slice_free (Block58Data, _data58_);
	}
}

static void
_vala_GgitOId_free (GgitOId* self)
{
	g_boxed_free (ggit_oid_get_type (), self);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static void
__lambda122_ (Block58Data* _data58_,
              GtkDialog* d,
              gint resp)
{
	GitgCommitActionCreateTag* self;
	GError* _inner_error0_ = NULL;
	self = _data58_->self;
	g_return_if_fail (d != NULL);
	if (resp == ((gint) GTK_RESPONSE_OK)) {
		GgitOId* tagid = NULL;
		GitgRepository* repo = NULL;
		GitgExtApplication* _tmp0_;
		GitgExtApplication* _tmp1_;
		GitgExtApplication* _tmp2_;
		GitgRepository* _tmp3_;
		GitgRepository* _tmp4_;
		GitgRepository* _tmp5_;
		gchar* msg = NULL;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* name = NULL;
		gchar* _tmp11_;
		gchar* _tmp12_;
		GgitRef* tag = NULL;
		GgitOId* _tmp48_;
		GgitRef* _tmp63_;
		tagid = NULL;
		_tmp0_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
		_tmp1_ = _tmp0_;
		_tmp2_ = _tmp1_;
		_tmp3_ = gitg_ext_application_get_repository (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp2_);
		repo = _tmp5_;
		_tmp6_ = gitg_create_tag_dialog_get_new_tag_message (_data58_->dlg);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp9_ = ggit_message_prettify (_tmp8_, FALSE, '#');
		_tmp10_ = _tmp9_;
		_g_free0 (_tmp8_);
		msg = _tmp10_;
		_tmp11_ = gitg_create_tag_dialog_get_new_tag_name (_data58_->dlg);
		_tmp12_ = _tmp11_;
		name = _tmp12_;
		{
			const gchar* _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			_tmp13_ = msg;
			_tmp14_ = strlen (_tmp13_);
			_tmp15_ = _tmp14_;
			if (_tmp15_ == 0) {
				GgitOId* _tmp16_ = NULL;
				GitgRepository* _tmp17_;
				const gchar* _tmp18_;
				GitgCommit* _tmp19_;
				GitgCommit* _tmp20_;
				GgitOId* _tmp21_;
				GgitOId* _tmp22_;
				_tmp17_ = repo;
				_tmp18_ = name;
				_tmp19_ = gitg_ext_commit_action_get_commit ((GitgExtCommitAction*) self);
				_tmp20_ = _tmp19_;
				_tmp21_ = ggit_repository_create_tag_lightweight ((GgitRepository*) _tmp17_, _tmp18_, (GgitObject*) _tmp20_, GGIT_CREATE_NONE, &_inner_error0_);
				_tmp16_ = _tmp21_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				_tmp22_ = _tmp16_;
				_tmp16_ = NULL;
				__vala_GgitOId_free0 (tagid);
				tagid = _tmp22_;
				__vala_GgitOId_free0 (_tmp16_);
			} else {
				GgitSignature* author = NULL;
				GgitOId* _tmp34_ = NULL;
				GitgRepository* _tmp35_;
				const gchar* _tmp36_;
				GitgCommit* _tmp37_;
				GitgCommit* _tmp38_;
				GgitSignature* _tmp39_;
				const gchar* _tmp40_;
				GgitOId* _tmp41_;
				GgitOId* _tmp42_;
				author = NULL;
				{
					GgitSignature* _tmp23_ = NULL;
					GitgRepository* _tmp24_;
					GitgExtApplication* _tmp25_;
					GitgExtApplication* _tmp26_;
					GitgExtApplication* _tmp27_;
					GeeMap* _tmp28_;
					GeeMap* _tmp29_;
					GeeMap* _tmp30_;
					GgitSignature* _tmp31_;
					GgitSignature* _tmp32_;
					GgitSignature* _tmp33_;
					_tmp24_ = repo;
					_tmp25_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
					_tmp26_ = _tmp25_;
					_tmp27_ = _tmp26_;
					_tmp28_ = gitg_ext_application_get_environment (_tmp27_);
					_tmp29_ = _tmp28_;
					_tmp30_ = _tmp29_;
					_tmp31_ = gitg_repository_get_signature_with_environment (_tmp24_, _tmp30_, "COMMITER", &_inner_error0_);
					_tmp32_ = _tmp31_;
					_g_object_unref0 (_tmp30_);
					_g_object_unref0 (_tmp27_);
					_tmp23_ = _tmp32_;
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch1_g_error;
					}
					_tmp33_ = _tmp23_;
					_tmp23_ = NULL;
					_g_object_unref0 (author);
					author = _tmp33_;
					_g_object_unref0 (_tmp23_);
				}
				goto __finally1;
				__catch1_g_error:
				{
					g_clear_error (&_inner_error0_);
				}
				__finally1:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_object_unref0 (author);
					goto __catch0_g_error;
				}
				_tmp35_ = repo;
				_tmp36_ = name;
				_tmp37_ = gitg_ext_commit_action_get_commit ((GitgExtCommitAction*) self);
				_tmp38_ = _tmp37_;
				_tmp39_ = author;
				_tmp40_ = msg;
				_tmp41_ = ggit_repository_create_tag ((GgitRepository*) _tmp35_, _tmp36_, (GgitObject*) _tmp38_, _tmp39_, _tmp40_, GGIT_CREATE_NONE, &_inner_error0_);
				_tmp34_ = _tmp41_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_object_unref0 (author);
					goto __catch0_g_error;
				}
				_tmp42_ = _tmp34_;
				_tmp34_ = NULL;
				__vala_GgitOId_free0 (tagid);
				tagid = _tmp42_;
				__vala_GgitOId_free0 (_tmp34_);
				_g_object_unref0 (author);
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GitgExtApplication* _tmp43_;
			GitgExtApplication* _tmp44_;
			GitgExtApplication* _tmp45_;
			GError* _tmp46_;
			const gchar* _tmp47_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp43_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
			_tmp44_ = _tmp43_;
			_tmp45_ = _tmp44_;
			_tmp46_ = e;
			_tmp47_ = _tmp46_->message;
			gitg_ext_application_show_infobar (_tmp45_, _ ("Failed to create tag"), _tmp47_, GTK_MESSAGE_ERROR);
			_g_object_unref0 (_tmp45_);
			__vala_GgitOId_free0 (tagid);
			tagid = NULL;
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (name);
			_g_free0 (msg);
			_g_object_unref0 (repo);
			__vala_GgitOId_free0 (tagid);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		tag = NULL;
		_tmp48_ = tagid;
		if (_tmp48_ != NULL) {
			{
				GitgRef* _tmp49_ = NULL;
				GitgRepository* _tmp50_;
				const gchar* _tmp51_;
				const gchar* _tmp52_;
				gchar* _tmp53_;
				gchar* _tmp54_;
				GitgRef* _tmp55_;
				GitgRef* _tmp56_;
				GitgRef* _tmp57_;
				_tmp50_ = repo;
				_tmp51_ = name;
				_tmp52_ = string_to_string (_tmp51_);
				_tmp53_ = g_strconcat ("refs/tags/", _tmp52_, NULL);
				_tmp54_ = _tmp53_;
				_tmp55_ = gitg_repository_lookup_reference (_tmp50_, _tmp54_, &_inner_error0_);
				_tmp56_ = _tmp55_;
				_g_free0 (_tmp54_);
				_tmp49_ = _tmp56_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch2_g_error;
				}
				_tmp57_ = _tmp49_;
				_tmp49_ = NULL;
				_g_object_unref0 (tag);
				tag = (GgitRef*) _tmp57_;
				_g_object_unref0 (_tmp49_);
			}
			goto __finally2;
			__catch2_g_error:
			{
				GError* e = NULL;
				GitgExtApplication* _tmp58_;
				GitgExtApplication* _tmp59_;
				GitgExtApplication* _tmp60_;
				GError* _tmp61_;
				const gchar* _tmp62_;
				e = _inner_error0_;
				_inner_error0_ = NULL;
				_tmp58_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
				_tmp59_ = _tmp58_;
				_tmp60_ = _tmp59_;
				_tmp61_ = e;
				_tmp62_ = _tmp61_->message;
				gitg_ext_application_show_infobar (_tmp60_, _ ("Failed to lookup tag"), _tmp62_, GTK_MESSAGE_ERROR);
				_g_object_unref0 (_tmp60_);
				_g_error_free0 (e);
			}
			__finally2:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (tag);
				_g_free0 (name);
				_g_free0 (msg);
				_g_object_unref0 (repo);
				__vala_GgitOId_free0 (tagid);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return;
			}
		}
		_tmp63_ = tag;
		if (_tmp63_ != NULL) {
			GitgExtRefActionInterface* _tmp64_;
			GitgExtRefActionInterface* _tmp65_;
			GgitRef* _tmp66_;
			_tmp64_ = gitg_ext_commit_action_get_action_interface ((GitgExtCommitAction*) self);
			_tmp65_ = _tmp64_;
			_tmp66_ = tag;
			gitg_ext_ref_action_interface_add_ref (_tmp65_, G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, GITG_TYPE_REF, GitgRef));
		}
		_g_object_unref0 (tag);
		_g_free0 (name);
		_g_free0 (msg);
		_g_object_unref0 (repo);
		__vala_GgitOId_free0 (tagid);
	}
	gtk_widget_destroy ((GtkWidget*) _data58_->dlg);
	g_signal_emit_by_name ((GitgExtCommitAction*) self, "finished");
}

static void
___lambda122__gtk_dialog_response (GtkDialog* _sender,
                                   gint response_id,
                                   gpointer self)
{
	__lambda122_ (self, _sender, response_id);
}

static void
gitg_commit_action_create_tag_real_activate (GitgCommitActionCreateTag* self)
{
	Block58Data* _data58_;
	GitgExtApplication* _tmp0_;
	GitgExtApplication* _tmp1_;
	GtkWindow* _tmp2_;
	GitgCreateTagDialog* _tmp3_;
	GitgCreateTagDialog* _tmp4_;
	_data58_ = g_slice_new0 (Block58Data);
	_data58_->_ref_count_ = 1;
	_data58_->self = g_object_ref (self);
	_tmp0_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_window_get_type (), GtkWindow);
	_tmp3_ = gitg_create_tag_dialog_new (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp2_);
	_data58_->dlg = _tmp4_;
	g_signal_connect_data ((GtkDialog*) _data58_->dlg, "response", (GCallback) ___lambda122__gtk_dialog_response, block58_data_ref (_data58_), (GClosureNotify) block58_data_unref, 0);
	gtk_widget_show ((GtkWidget*) _data58_->dlg);
	block58_data_unref (_data58_);
	_data58_ = NULL;
}

void
gitg_commit_action_create_tag_activate (GitgCommitActionCreateTag* self)
{
	GitgCommitActionCreateTagClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = GITG_COMMIT_ACTION_CREATE_TAG_GET_CLASS (self);
	if (_klass_->activate) {
		_klass_->activate (self);
	}
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static GitgExtApplication*
gitg_commit_action_create_tag_real_get_application (GitgExtUIElement* base)
{
	GitgExtApplication* result;
	GitgCommitActionCreateTag* self;
	GitgExtApplication* _tmp0_;
	GitgExtApplication* _tmp1_;
	self = (GitgCommitActionCreateTag*) base;
	_tmp0_ = self->priv->_application;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
gitg_commit_action_create_tag_real_set_application (GitgExtUIElement* base,
                                                    GitgExtApplication* value)
{
	GitgCommitActionCreateTag* self;
	GitgExtApplication* old_value;
	self = (GitgCommitActionCreateTag*) base;
	old_value = gitg_commit_action_create_tag_real_get_application (base);
	if (old_value != value) {
		GitgExtApplication* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_application);
		self->priv->_application = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_APPLICATION_PROPERTY]);
	}
	_g_object_unref0 (old_value);
}

static GitgExtRefActionInterface*
gitg_commit_action_create_tag_real_get_action_interface (GitgExtCommitAction* base)
{
	GitgExtRefActionInterface* result;
	GitgCommitActionCreateTag* self;
	GitgExtRefActionInterface* _tmp0_;
	self = (GitgCommitActionCreateTag*) base;
	_tmp0_ = self->priv->_action_interface;
	result = _tmp0_;
	return result;
}

static void
gitg_commit_action_create_tag_real_set_action_interface (GitgExtCommitAction* base,
                                                         GitgExtRefActionInterface* value)
{
	GitgCommitActionCreateTag* self;
	GitgExtRefActionInterface* old_value;
	self = (GitgCommitActionCreateTag*) base;
	old_value = gitg_commit_action_create_tag_real_get_action_interface (base);
	if (old_value != value) {
		GitgExtRefActionInterface* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_action_interface);
		self->priv->_action_interface = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_ACTION_INTERFACE_PROPERTY]);
	}
}

static GitgCommit*
gitg_commit_action_create_tag_real_get_commit (GitgExtCommitAction* base)
{
	GitgCommit* result;
	GitgCommitActionCreateTag* self;
	GitgCommit* _tmp0_;
	self = (GitgCommitActionCreateTag*) base;
	_tmp0_ = self->priv->_commit;
	result = _tmp0_;
	return result;
}

static void
gitg_commit_action_create_tag_real_set_commit (GitgExtCommitAction* base,
                                               GitgCommit* value)
{
	GitgCommitActionCreateTag* self;
	GitgCommit* old_value;
	self = (GitgCommitActionCreateTag*) base;
	old_value = gitg_commit_action_create_tag_real_get_commit (base);
	if (old_value != value) {
		GitgCommit* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_commit);
		self->priv->_commit = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_COMMIT_PROPERTY]);
	}
}

gchar*
gitg_commit_action_create_tag_get_id (GitgCommitActionCreateTag* self)
{
	GitgCommitActionCreateTagClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = GITG_COMMIT_ACTION_CREATE_TAG_GET_CLASS (self);
	if (_klass_->get_id) {
		return _klass_->get_id (self);
	}
	return NULL;
}

static gchar*
gitg_commit_action_create_tag_real_get_id (GitgCommitActionCreateTag* base)
{
	gchar* result;
	GitgCommitActionCreateTag* self;
	gchar* _tmp0_;
	self = base;
	_tmp0_ = g_strdup ("/org/gnome/gitg/commit-actions/create-tag");
	result = _tmp0_;
	return result;
}

static gchar*
gitg_commit_action_create_tag_real_get_display_name (GitgExtUIElement* base)
{
	gchar* result;
	GitgCommitActionCreateTag* self;
	gchar* _tmp0_;
	self = (GitgCommitActionCreateTag*) base;
	_tmp0_ = g_strdup (_ ("Create tag"));
	result = _tmp0_;
	return result;
}

gchar*
gitg_commit_action_create_tag_get_description (GitgCommitActionCreateTag* self)
{
	GitgCommitActionCreateTagClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = GITG_COMMIT_ACTION_CREATE_TAG_GET_CLASS (self);
	if (_klass_->get_description) {
		return _klass_->get_description (self);
	}
	return NULL;
}

static gchar*
gitg_commit_action_create_tag_real_get_description (GitgCommitActionCreateTag* base)
{
	gchar* result;
	GitgCommitActionCreateTag* self;
	gchar* _tmp0_;
	self = base;
	_tmp0_ = g_strdup (_ ("Create a new tag at the selected commit"));
	result = _tmp0_;
	return result;
}

static void
gitg_commit_action_create_tag_class_init (GitgCommitActionCreateTagClass * klass,
                                          gpointer klass_data)
{
	gitg_commit_action_create_tag_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GitgCommitActionCreateTag_private_offset);
	((GitgCommitActionCreateTagClass *) klass)->activate = (void (*) (GitgCommitActionCreateTag*)) gitg_commit_action_create_tag_real_activate;
	GITG_COMMIT_ACTION_CREATE_TAG_CLASS (klass)->get_id = (gchar* (*) (GitgCommitActionCreateTag*)) gitg_commit_action_create_tag_real_get_id;
	GITG_COMMIT_ACTION_CREATE_TAG_CLASS (klass)->get_description = (gchar* (*) (GitgCommitActionCreateTag*)) gitg_commit_action_create_tag_real_get_description;
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_commit_action_create_tag_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_commit_action_create_tag_set_property;
	G_OBJECT_CLASS (klass)->finalize = gitg_commit_action_create_tag_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_CREATE_TAG_APPLICATION_PROPERTY, gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_APPLICATION_PROPERTY] = g_param_spec_object ("application", "application", "application", GITG_EXT_TYPE_APPLICATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_CREATE_TAG_ACTION_INTERFACE_PROPERTY, gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_ACTION_INTERFACE_PROPERTY] = g_param_spec_object ("action-interface", "action-interface", "action-interface", GITG_EXT_TYPE_REF_ACTION_INTERFACE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_CREATE_TAG_COMMIT_PROPERTY, gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_COMMIT_PROPERTY] = g_param_spec_object ("commit", "commit", "commit", GITG_TYPE_COMMIT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_CREATE_TAG_ID_PROPERTY, gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_CREATE_TAG_DISPLAY_NAME_PROPERTY, gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_DISPLAY_NAME_PROPERTY] = g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_CREATE_TAG_DESCRIPTION_PROPERTY, gitg_commit_action_create_tag_properties[GITG_COMMIT_ACTION_CREATE_TAG_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gitg_commit_action_create_tag_gitg_ext_ui_element_interface_init (GitgExtUIElementIface * iface,
                                                                  gpointer iface_data)
{
	gitg_commit_action_create_tag_gitg_ext_ui_element_parent_iface = g_type_interface_peek_parent (iface);
	iface->activate = (void (*) (GitgExtUIElement*)) gitg_commit_action_create_tag_activate;
	iface->get_application = gitg_commit_action_create_tag_real_get_application;
	iface->set_application = gitg_commit_action_create_tag_real_set_application;
	iface->get_id = (gchar* (*) (GitgExtUIElement*)) gitg_commit_action_create_tag_get_id;
	iface->get_display_name = gitg_commit_action_create_tag_real_get_display_name;
	iface->get_description = (gchar* (*) (GitgExtUIElement*)) gitg_commit_action_create_tag_get_description;
}

static void
gitg_commit_action_create_tag_gitg_ext_action_interface_init (GitgExtActionIface * iface,
                                                              gpointer iface_data)
{
	gitg_commit_action_create_tag_gitg_ext_action_parent_iface = g_type_interface_peek_parent (iface);
}

static void
gitg_commit_action_create_tag_gitg_ext_commit_action_interface_init (GitgExtCommitActionIface * iface,
                                                                     gpointer iface_data)
{
	gitg_commit_action_create_tag_gitg_ext_commit_action_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_action_interface = gitg_commit_action_create_tag_real_get_action_interface;
	iface->set_action_interface = gitg_commit_action_create_tag_real_set_action_interface;
	iface->get_commit = gitg_commit_action_create_tag_real_get_commit;
	iface->set_commit = gitg_commit_action_create_tag_real_set_commit;
}

static void
gitg_commit_action_create_tag_instance_init (GitgCommitActionCreateTag * self,
                                             gpointer klass)
{
	self->priv = gitg_commit_action_create_tag_get_instance_private (self);
}

static void
gitg_commit_action_create_tag_finalize (GObject * obj)
{
	GitgCommitActionCreateTag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_COMMIT_ACTION_CREATE_TAG, GitgCommitActionCreateTag);
	_g_object_unref0 (self->priv->_application);
	_g_object_unref0 (self->priv->_action_interface);
	_g_object_unref0 (self->priv->_commit);
	G_OBJECT_CLASS (gitg_commit_action_create_tag_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gitg_commit_action_create_tag_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgCommitActionCreateTagClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_commit_action_create_tag_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgCommitActionCreateTag), 0, (GInstanceInitFunc) gitg_commit_action_create_tag_instance_init, NULL };
	static const GInterfaceInfo gitg_ext_ui_element_info = { (GInterfaceInitFunc) gitg_commit_action_create_tag_gitg_ext_ui_element_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gitg_ext_action_info = { (GInterfaceInitFunc) gitg_commit_action_create_tag_gitg_ext_action_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gitg_ext_commit_action_info = { (GInterfaceInitFunc) gitg_commit_action_create_tag_gitg_ext_commit_action_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gitg_commit_action_create_tag_type_id;
	gitg_commit_action_create_tag_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgCommitActionCreateTag", &g_define_type_info, 0);
	g_type_add_interface_static (gitg_commit_action_create_tag_type_id, GITG_EXT_TYPE_UI_ELEMENT, &gitg_ext_ui_element_info);
	g_type_add_interface_static (gitg_commit_action_create_tag_type_id, GITG_EXT_TYPE_ACTION, &gitg_ext_action_info);
	g_type_add_interface_static (gitg_commit_action_create_tag_type_id, GITG_EXT_TYPE_COMMIT_ACTION, &gitg_ext_commit_action_info);
	GitgCommitActionCreateTag_private_offset = g_type_add_instance_private (gitg_commit_action_create_tag_type_id, sizeof (GitgCommitActionCreateTagPrivate));
	return gitg_commit_action_create_tag_type_id;
}

GType
gitg_commit_action_create_tag_get_type (void)
{
	static gsize gitg_commit_action_create_tag_type_id__once = 0;
	if (g_once_init_enter (&gitg_commit_action_create_tag_type_id__once)) {
		GType gitg_commit_action_create_tag_type_id;
		gitg_commit_action_create_tag_type_id = gitg_commit_action_create_tag_get_type_once ();
		g_once_init_leave (&gitg_commit_action_create_tag_type_id__once, gitg_commit_action_create_tag_type_id);
	}
	return gitg_commit_action_create_tag_type_id__once;
}

static void
_vala_gitg_commit_action_create_tag_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	GitgCommitActionCreateTag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_COMMIT_ACTION_CREATE_TAG, GitgCommitActionCreateTag);
	switch (property_id) {
		case GITG_COMMIT_ACTION_CREATE_TAG_APPLICATION_PROPERTY:
		g_value_take_object (value, gitg_ext_ui_element_get_application ((GitgExtUIElement*) self));
		break;
		case GITG_COMMIT_ACTION_CREATE_TAG_ACTION_INTERFACE_PROPERTY:
		g_value_set_object (value, gitg_ext_commit_action_get_action_interface ((GitgExtCommitAction*) self));
		break;
		case GITG_COMMIT_ACTION_CREATE_TAG_COMMIT_PROPERTY:
		g_value_set_object (value, gitg_ext_commit_action_get_commit ((GitgExtCommitAction*) self));
		break;
		case GITG_COMMIT_ACTION_CREATE_TAG_ID_PROPERTY:
		g_value_take_string (value, gitg_commit_action_create_tag_get_id (self));
		break;
		case GITG_COMMIT_ACTION_CREATE_TAG_DISPLAY_NAME_PROPERTY:
		g_value_take_string (value, gitg_ext_ui_element_get_display_name ((GitgExtUIElement*) self));
		break;
		case GITG_COMMIT_ACTION_CREATE_TAG_DESCRIPTION_PROPERTY:
		g_value_take_string (value, gitg_commit_action_create_tag_get_description (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gitg_commit_action_create_tag_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	GitgCommitActionCreateTag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_COMMIT_ACTION_CREATE_TAG, GitgCommitActionCreateTag);
	switch (property_id) {
		case GITG_COMMIT_ACTION_CREATE_TAG_APPLICATION_PROPERTY:
		gitg_ext_ui_element_set_application ((GitgExtUIElement*) self, g_value_get_object (value));
		break;
		case GITG_COMMIT_ACTION_CREATE_TAG_ACTION_INTERFACE_PROPERTY:
		gitg_ext_commit_action_set_action_interface ((GitgExtCommitAction*) self, g_value_get_object (value));
		break;
		case GITG_COMMIT_ACTION_CREATE_TAG_COMMIT_PROPERTY:
		gitg_ext_commit_action_set_commit ((GitgExtCommitAction*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

