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


#define GITG_TYPE_REF_ACTION_RENAME (gitg_ref_action_rename_get_type ())
#define GITG_REF_ACTION_RENAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REF_ACTION_RENAME, GitgRefActionRename))
#define GITG_REF_ACTION_RENAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_REF_ACTION_RENAME, GitgRefActionRenameClass))
#define GITG_IS_REF_ACTION_RENAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REF_ACTION_RENAME))
#define GITG_IS_REF_ACTION_RENAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_REF_ACTION_RENAME))
#define GITG_REF_ACTION_RENAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_REF_ACTION_RENAME, GitgRefActionRenameClass))

typedef struct _GitgRefActionRename GitgRefActionRename;
typedef struct _GitgRefActionRenameClass GitgRefActionRenameClass;
typedef struct _GitgRefActionRenamePrivate GitgRefActionRenamePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _GitgRefActionRename {
	GObject parent_instance;
	GitgRefActionRenamePrivate * priv;
};

struct _GitgRefActionRenameClass {
	GObjectClass parent_class;
};

struct _GitgRefActionRenamePrivate {
	GitgExtApplication* _application;
	GitgExtRefActionInterface* _action_interface;
	GitgRef* _reference;
};


static gpointer gitg_ref_action_rename_parent_class = NULL;
static GitgExtUIElementIface* gitg_ref_action_rename_gitg_ext_ui_element_parent_iface = NULL;
static GitgExtActionIface* gitg_ref_action_rename_gitg_ext_action_parent_iface = NULL;
static GitgExtRefActionIface* gitg_ref_action_rename_gitg_ext_ref_action_parent_iface = NULL;

GType gitg_ref_action_rename_get_type (void) G_GNUC_CONST;
#define GITG_REF_ACTION_RENAME_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_REF_ACTION_RENAME, GitgRefActionRenamePrivate))
enum  {
	GITG_REF_ACTION_RENAME_DUMMY_PROPERTY,
	GITG_REF_ACTION_RENAME_APPLICATION,
	GITG_REF_ACTION_RENAME_ACTION_INTERFACE,
	GITG_REF_ACTION_RENAME_REFERENCE,
	GITG_REF_ACTION_RENAME_ID,
	GITG_REF_ACTION_RENAME_DISPLAY_NAME,
	GITG_REF_ACTION_RENAME_DESCRIPTION,
	GITG_REF_ACTION_RENAME_ENABLED
};
#define GITG_REF_ACTION_RENAME_version VERSION
GitgRefActionRename* gitg_ref_action_rename_new (GitgExtApplication* application, GitgExtRefActionInterface* action_interface, GitgRef* reference);
GitgRefActionRename* gitg_ref_action_rename_construct (GType object_type, GitgExtApplication* application, GitgExtRefActionInterface* action_interface, GitgRef* reference);
static void gitg_ref_action_rename_real_activate (GitgExtUIElement* base);
static void gitg_ref_action_rename_on_ref_name_editing_done (GitgRefActionRename* self, const gchar* new_text, gboolean cancelled);
static void _gitg_ref_action_rename_on_ref_name_editing_done_gitg_ext_ref_name_editing_done (const gchar* new_name, gboolean cancelled, gpointer self);
static void gitg_ref_action_rename_finalize (GObject* obj);
static void _vala_gitg_ref_action_rename_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gitg_ref_action_rename_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GitgRefActionRename* gitg_ref_action_rename_construct (GType object_type, GitgExtApplication* application, GitgExtRefActionInterface* action_interface, GitgRef* reference) {
	GitgRefActionRename * self = NULL;
	GitgExtApplication* _tmp0_ = NULL;
	GitgExtRefActionInterface* _tmp1_ = NULL;
	GitgRef* _tmp2_ = NULL;
#line 32 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_return_val_if_fail (application != NULL, NULL);
#line 32 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_return_val_if_fail (action_interface != NULL, NULL);
#line 32 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_return_val_if_fail (reference != NULL, NULL);
#line 36 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = application;
#line 36 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = action_interface;
#line 36 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp2_ = reference;
#line 36 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) g_object_new (object_type, "application", _tmp0_, "action-interface", _tmp1_, "reference", _tmp2_, NULL);
#line 32 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return self;
#line 115 "gitg-ref-action-rename.c"
}


GitgRefActionRename* gitg_ref_action_rename_new (GitgExtApplication* application, GitgExtRefActionInterface* action_interface, GitgRef* reference) {
#line 32 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return gitg_ref_action_rename_construct (GITG_TYPE_REF_ACTION_RENAME, application, action_interface, reference);
#line 122 "gitg-ref-action-rename.c"
}


static void _gitg_ref_action_rename_on_ref_name_editing_done_gitg_ext_ref_name_editing_done (const gchar* new_name, gboolean cancelled, gpointer self) {
#line 67 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	gitg_ref_action_rename_on_ref_name_editing_done ((GitgRefActionRename*) self, new_name, cancelled);
#line 129 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_real_activate (GitgExtUIElement* base) {
	GitgRefActionRename * self;
	GitgExtRefActionInterface* _tmp0_ = NULL;
	GitgExtRefActionInterface* _tmp1_ = NULL;
	GitgRef* _tmp2_ = NULL;
	GitgRef* _tmp3_ = NULL;
#line 65 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 67 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = gitg_ext_ref_action_get_action_interface ((GitgExtRefAction*) self);
#line 67 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = _tmp0_;
#line 67 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp2_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
#line 67 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp3_ = _tmp2_;
#line 67 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	gitg_ext_ref_action_interface_edit_ref_name (_tmp1_, _tmp3_, _gitg_ref_action_rename_on_ref_name_editing_done_gitg_ext_ref_name_editing_done, g_object_ref (self), g_object_unref);
#line 151 "gitg-ref-action-rename.c"
}


static const gchar* string_to_string (const gchar* self) {
	const gchar* result = NULL;
#line 1412 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1413 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	result = self;
#line 1413 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	return result;
#line 163 "gitg-ref-action-rename.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 109 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return self ? g_object_ref (self) : NULL;
#line 170 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_on_ref_name_editing_done (GitgRefActionRename* self, const gchar* new_text, gboolean cancelled) {
	gboolean _tmp0_ = FALSE;
	gchar* orig = NULL;
	gchar* prefix = NULL;
	GitgParsedRefName* pn = NULL;
	GitgRef* _tmp1_ = NULL;
	GitgRef* _tmp2_ = NULL;
	GitgParsedRefName* _tmp3_ = NULL;
	GitgParsedRefName* _tmp4_ = NULL;
	GitgParsedRefName* _tmp5_ = NULL;
	GitgRefType _tmp6_ = 0;
	GitgRefType _tmp7_ = 0;
	const gchar* _tmp30_ = NULL;
	const gchar* _tmp31_ = NULL;
	const gchar* _tmp32_ = NULL;
	const gchar* _tmp33_ = NULL;
	const gchar* _tmp34_ = NULL;
	const gchar* _tmp35_ = NULL;
	gchar* _tmp36_ = NULL;
	gchar* _tmp37_ = NULL;
	gboolean _tmp38_ = FALSE;
	gboolean _tmp39_ = FALSE;
	GgitBranch* branch = NULL;
	GitgRef* _tmp50_ = NULL;
	GitgRef* _tmp51_ = NULL;
	GgitBranch* _tmp52_ = NULL;
	GitgRef* new_ref = NULL;
	GitgExtRefActionInterface* _tmp81_ = NULL;
	GitgExtRefActionInterface* _tmp82_ = NULL;
	GitgRef* _tmp83_ = NULL;
	GitgRef* _tmp84_ = NULL;
	GitgRef* _tmp85_ = NULL;
	GError * _inner_error_ = NULL;
#line 70 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_return_if_fail (self != NULL);
#line 70 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_return_if_fail (new_text != NULL);
#line 72 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = cancelled;
#line 72 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	if (_tmp0_) {
#line 74 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		return;
#line 217 "gitg-ref-action-rename.c"
	}
#line 80 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
#line 80 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp2_ = _tmp1_;
#line 80 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp3_ = gitg_ref_get_parsed_name (_tmp2_);
#line 80 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp4_ = _tmp3_;
#line 80 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	pn = _tmp4_;
#line 82 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp5_ = pn;
#line 82 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp6_ = gitg_parsed_ref_name_get_rtype (_tmp5_);
#line 82 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp7_ = _tmp6_;
#line 82 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	if (_tmp7_ == GITG_REF_TYPE_REMOTE) {
#line 237 "gitg-ref-action-rename.c"
		GitgParsedRefName* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		GitgParsedRefName* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		GitgParsedRefName* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
		gchar* _tmp20_ = NULL;
		gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
#line 84 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp8_ = pn;
#line 84 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp9_ = gitg_parsed_ref_name_get_remote_branch (_tmp8_);
#line 84 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp10_ = _tmp9_;
#line 84 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (orig);
#line 84 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		orig = _tmp10_;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp11_ = pn;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp12_ = gitg_parsed_ref_name_get_prefix (_tmp11_);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp13_ = _tmp12_;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp14_ = g_strconcat (_tmp13_, "/", NULL);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp15_ = _tmp14_;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp16_ = pn;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp17_ = gitg_parsed_ref_name_get_remote_name (_tmp16_);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp18_ = _tmp17_;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp19_ = _tmp18_;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp20_ = g_strconcat (_tmp15_, _tmp19_, NULL);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp21_ = _tmp20_;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp22_ = g_strconcat (_tmp21_, "/", NULL);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (prefix);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		prefix = _tmp22_;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (_tmp21_);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (_tmp19_);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (_tmp15_);
#line 297 "gitg-ref-action-rename.c"
	} else {
		GitgParsedRefName* _tmp23_ = NULL;
		gchar* _tmp24_ = NULL;
		gchar* _tmp25_ = NULL;
		GitgParsedRefName* _tmp26_ = NULL;
		const gchar* _tmp27_ = NULL;
		const gchar* _tmp28_ = NULL;
		gchar* _tmp29_ = NULL;
#line 89 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp23_ = pn;
#line 89 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp24_ = gitg_parsed_ref_name_get_shortname (_tmp23_);
#line 89 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp25_ = _tmp24_;
#line 89 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (orig);
#line 89 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		orig = _tmp25_;
#line 90 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp26_ = pn;
#line 90 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp27_ = gitg_parsed_ref_name_get_prefix (_tmp26_);
#line 90 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp28_ = _tmp27_;
#line 90 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp29_ = g_strdup (_tmp28_);
#line 90 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (prefix);
#line 90 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		prefix = _tmp29_;
#line 328 "gitg-ref-action-rename.c"
	}
#line 93 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp30_ = orig;
#line 93 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp31_ = new_text;
#line 93 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	if (g_strcmp0 (_tmp30_, _tmp31_) == 0) {
#line 95 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (pn);
#line 95 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (prefix);
#line 95 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (orig);
#line 95 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		return;
#line 344 "gitg-ref-action-rename.c"
	}
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp32_ = prefix;
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp33_ = string_to_string (_tmp32_);
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp34_ = new_text;
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp35_ = string_to_string (_tmp34_);
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp36_ = g_strconcat (_tmp33_, _tmp35_, NULL);
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp37_ = _tmp36_;
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp38_ = ggit_ref_is_valid_name (_tmp37_);
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp39_ = !_tmp38_;
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_free0 (_tmp37_);
#line 98 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	if (_tmp39_) {
#line 366 "gitg-ref-action-rename.c"
		gchar* msg = NULL;
		const gchar* _tmp40_ = NULL;
		const gchar* _tmp41_ = NULL;
		gchar* _tmp42_ = NULL;
		GitgExtRefActionInterface* _tmp43_ = NULL;
		GitgExtRefActionInterface* _tmp44_ = NULL;
		GitgExtApplication* _tmp45_ = NULL;
		GitgExtApplication* _tmp46_ = NULL;
		GitgExtApplication* _tmp47_ = NULL;
		const gchar* _tmp48_ = NULL;
		const gchar* _tmp49_ = NULL;
#line 100 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp40_ = _ ("The specified name ‘%s’ contains invalid characters");
#line 100 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp41_ = new_text;
#line 100 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp42_ = g_strdup_printf (_tmp40_, _tmp41_);
#line 100 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		msg = _tmp42_;
#line 102 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp43_ = gitg_ext_ref_action_get_action_interface ((GitgExtRefAction*) self);
#line 102 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp44_ = _tmp43_;
#line 102 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp45_ = gitg_ext_ref_action_interface_get_application (_tmp44_);
#line 102 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp46_ = _tmp45_;
#line 102 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp47_ = _tmp46_;
#line 102 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp48_ = _ ("Invalid name");
#line 102 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp49_ = msg;
#line 102 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		gitg_ext_application_show_infobar (_tmp47_, _tmp48_, _tmp49_, GTK_MESSAGE_ERROR);
#line 102 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (_tmp47_);
#line 106 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (msg);
#line 106 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (pn);
#line 106 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (prefix);
#line 106 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (orig);
#line 106 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		return;
#line 414 "gitg-ref-action-rename.c"
	}
#line 109 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp50_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
#line 109 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp51_ = _tmp50_;
#line 109 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp52_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp51_, ggit_branch_get_type ()) ? ((GgitBranch*) _tmp51_) : NULL);
#line 109 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	branch = _tmp52_;
#line 110 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	new_ref = NULL;
#line 426 "gitg-ref-action-rename.c"
	{
		GgitBranch* _tmp53_ = NULL;
#line 114 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp53_ = branch;
#line 114 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		if (_tmp53_ != NULL) {
#line 433 "gitg-ref-action-rename.c"
			GgitBranch* _tmp54_ = NULL;
			GgitBranch* _tmp55_ = NULL;
			const gchar* _tmp56_ = NULL;
			GgitBranch* _tmp57_ = NULL;
			GgitBranch* _tmp58_ = NULL;
			GitgRef* _tmp59_ = NULL;
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp55_ = branch;
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp56_ = new_text;
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp57_ = ggit_branch_move (_tmp55_, _tmp56_, GGIT_CREATE_NONE, &_inner_error_);
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp54_ = _tmp57_;
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 450 "gitg-ref-action-rename.c"
				goto __catch102_g_error;
			}
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp58_ = _tmp54_;
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp54_ = NULL;
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp59_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp58_, GITG_TYPE_REF) ? ((GitgRef*) _tmp58_) : NULL;
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			if (_tmp59_ == NULL) {
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
				_g_object_unref0 (_tmp58_);
#line 463 "gitg-ref-action-rename.c"
			}
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_g_object_unref0 (new_ref);
#line 116 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			new_ref = _tmp59_;
#line 114 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_g_object_unref0 (_tmp54_);
#line 471 "gitg-ref-action-rename.c"
		} else {
			gchar* msg = NULL;
			GitgRef* _tmp60_ = NULL;
			GitgRef* _tmp61_ = NULL;
			const gchar* _tmp62_ = NULL;
			const gchar* _tmp63_ = NULL;
			gchar* _tmp64_ = NULL;
			GgitRef* _tmp65_ = NULL;
			GitgRef* _tmp66_ = NULL;
			GitgRef* _tmp67_ = NULL;
			const gchar* _tmp68_ = NULL;
			const gchar* _tmp69_ = NULL;
			GgitRef* _tmp70_ = NULL;
			GgitRef* _tmp71_ = NULL;
			GitgRef* _tmp72_ = NULL;
#line 121 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp60_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
#line 121 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp61_ = _tmp60_;
#line 121 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp62_ = ggit_ref_get_name ((GgitRef*) _tmp61_);
#line 121 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp63_ = new_text;
#line 121 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp64_ = g_strdup_printf ("rename: ref %s to %s", _tmp62_, _tmp63_);
#line 121 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			msg = _tmp64_;
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp66_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp67_ = _tmp66_;
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp68_ = new_text;
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp69_ = msg;
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp70_ = ggit_ref_rename ((GgitRef*) _tmp67_, _tmp68_, FALSE, _tmp69_, &_inner_error_);
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp65_ = _tmp70_;
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
				_g_free0 (msg);
#line 515 "gitg-ref-action-rename.c"
				goto __catch102_g_error;
			}
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp71_ = _tmp65_;
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp65_ = NULL;
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_tmp72_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp71_, GITG_TYPE_REF) ? ((GitgRef*) _tmp71_) : NULL;
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			if (_tmp72_ == NULL) {
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
				_g_object_unref0 (_tmp71_);
#line 528 "gitg-ref-action-rename.c"
			}
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_g_object_unref0 (new_ref);
#line 124 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			new_ref = _tmp72_;
#line 114 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_g_object_unref0 (_tmp65_);
#line 114 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
			_g_free0 (msg);
#line 538 "gitg-ref-action-rename.c"
		}
	}
	goto __finally102;
	__catch102_g_error:
	{
		GError* e = NULL;
		GitgExtRefActionInterface* _tmp73_ = NULL;
		GitgExtRefActionInterface* _tmp74_ = NULL;
		GitgExtApplication* _tmp75_ = NULL;
		GitgExtApplication* _tmp76_ = NULL;
		GitgExtApplication* _tmp77_ = NULL;
		const gchar* _tmp78_ = NULL;
		GError* _tmp79_ = NULL;
		const gchar* _tmp80_ = NULL;
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		e = _inner_error_;
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_inner_error_ = NULL;
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp73_ = gitg_ext_ref_action_get_action_interface ((GitgExtRefAction*) self);
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp74_ = _tmp73_;
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp75_ = gitg_ext_ref_action_interface_get_application (_tmp74_);
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp76_ = _tmp75_;
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp77_ = _tmp76_;
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp78_ = _ ("Failed to rename");
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp79_ = e;
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp80_ = _tmp79_->message;
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		gitg_ext_application_show_infobar (_tmp77_, _tmp78_, _tmp80_, GTK_MESSAGE_ERROR);
#line 131 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (_tmp77_);
#line 135 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_error_free0 (e);
#line 135 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (new_ref);
#line 135 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (branch);
#line 135 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (pn);
#line 135 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (prefix);
#line 135 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (orig);
#line 135 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		return;
#line 591 "gitg-ref-action-rename.c"
	}
	__finally102:
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (new_ref);
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (branch);
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_object_unref0 (pn);
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (prefix);
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_g_free0 (orig);
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.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 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		g_clear_error (&_inner_error_);
#line 112 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		return;
#line 612 "gitg-ref-action-rename.c"
	}
#line 138 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp81_ = gitg_ext_ref_action_get_action_interface ((GitgExtRefAction*) self);
#line 138 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp82_ = _tmp81_;
#line 138 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp83_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
#line 138 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp84_ = _tmp83_;
#line 138 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp85_ = new_ref;
#line 138 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	gitg_ext_ref_action_interface_replace_ref (_tmp82_, _tmp84_, _tmp85_);
#line 70 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_object_unref0 (new_ref);
#line 70 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_object_unref0 (branch);
#line 70 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_object_unref0 (pn);
#line 70 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_free0 (prefix);
#line 70 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_free0 (orig);
#line 636 "gitg-ref-action-rename.c"
}


static GitgExtApplication* gitg_ref_action_rename_real_get_application (GitgExtUIElement* base) {
	GitgExtApplication* result;
	GitgRefActionRename* self;
	GitgExtApplication* _tmp0_ = NULL;
	GitgExtApplication* _tmp1_ = NULL;
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = self->priv->_application;
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	result = _tmp1_;
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return result;
#line 655 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_real_set_application (GitgExtUIElement* base, GitgExtApplication* value) {
	GitgRefActionRename* self;
	GitgExtApplication* _tmp0_ = NULL;
	GitgExtApplication* _tmp1_ = NULL;
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = value;
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_object_unref0 (self->priv->_application);
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self->priv->_application = _tmp1_;
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_notify ((GObject *) self, "application");
#line 675 "gitg-ref-action-rename.c"
}


static GitgExtRefActionInterface* gitg_ref_action_rename_real_get_action_interface (GitgExtRefAction* base) {
	GitgExtRefActionInterface* result;
	GitgRefActionRename* self;
	GitgExtRefActionInterface* _tmp0_ = NULL;
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = self->priv->_action_interface;
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	result = _tmp0_;
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return result;
#line 691 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_real_set_action_interface (GitgExtRefAction* base, GitgExtRefActionInterface* value) {
	GitgRefActionRename* self;
	GitgExtRefActionInterface* _tmp0_ = NULL;
	GitgExtRefActionInterface* _tmp1_ = NULL;
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = value;
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_object_unref0 (self->priv->_action_interface);
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self->priv->_action_interface = _tmp1_;
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_notify ((GObject *) self, "action-interface");
#line 711 "gitg-ref-action-rename.c"
}


static GitgRef* gitg_ref_action_rename_real_get_reference (GitgExtRefAction* base) {
	GitgRef* result;
	GitgRefActionRename* self;
	GitgRef* _tmp0_ = NULL;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = self->priv->_reference;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	result = _tmp0_;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return result;
#line 727 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_real_set_reference (GitgExtRefAction* base, GitgRef* value) {
	GitgRefActionRename* self;
	GitgRef* _tmp0_ = NULL;
	GitgRef* _tmp1_ = NULL;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = value;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_object_unref0 (self->priv->_reference);
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self->priv->_reference = _tmp1_;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_notify ((GObject *) self, "reference");
#line 747 "gitg-ref-action-rename.c"
}


static gchar* gitg_ref_action_rename_real_get_id (GitgExtUIElement* base) {
	gchar* result;
	GitgRefActionRename* self;
	gchar* _tmp0_ = NULL;
#line 43 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 43 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = g_strdup ("/org/gnome/gitg/ref-actions/rename");
#line 43 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	result = _tmp0_;
#line 43 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return result;
#line 763 "gitg-ref-action-rename.c"
}


static gchar* gitg_ref_action_rename_real_get_display_name (GitgExtUIElement* base) {
	gchar* result;
	GitgRefActionRename* self;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 48 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 48 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = _ ("Rename");
#line 48 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 48 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	result = _tmp1_;
#line 48 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return result;
#line 782 "gitg-ref-action-rename.c"
}


static gchar* gitg_ref_action_rename_real_get_description (GitgExtUIElement* base) {
	gchar* result;
	GitgRefActionRename* self;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 53 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 53 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp0_ = _ ("Rename the selected reference");
#line 53 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 53 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	result = _tmp1_;
#line 53 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return result;
#line 801 "gitg-ref-action-rename.c"
}


static gboolean gitg_ref_action_rename_real_get_enabled (GitgExtUIElement* base) {
	gboolean result;
	GitgRefActionRename* self;
	gboolean _tmp0_ = FALSE;
	GitgRef* _tmp1_ = NULL;
	GitgRef* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
#line 58 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = (GitgRefActionRename*) base;
#line 60 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp1_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
#line 60 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp2_ = _tmp1_;
#line 60 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_tmp3_ = ggit_ref_is_branch ((GgitRef*) _tmp2_);
#line 60 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	if (_tmp3_) {
#line 60 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp0_ = TRUE;
#line 824 "gitg-ref-action-rename.c"
	} else {
		GitgRef* _tmp4_ = NULL;
		GitgRef* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
#line 61 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp4_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
#line 61 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp5_ = _tmp4_;
#line 61 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp6_ = ggit_ref_is_tag ((GgitRef*) _tmp5_);
#line 61 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		_tmp0_ = _tmp6_;
#line 837 "gitg-ref-action-rename.c"
	}
#line 60 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	result = _tmp0_;
#line 60 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	return result;
#line 843 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_class_init (GitgRefActionRenameClass * klass) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	gitg_ref_action_rename_parent_class = g_type_class_peek_parent (klass);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_type_class_add_private (klass, sizeof (GitgRefActionRenamePrivate));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_ref_action_rename_get_property;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_ref_action_rename_set_property;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_ref_action_rename_finalize;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_RENAME_APPLICATION, g_param_spec_object ("application", "application", "application", GITG_EXT_TYPE_APPLICATION, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_RENAME_ACTION_INTERFACE, g_param_spec_object ("action-interface", "action-interface", "action-interface", GITG_EXT_TYPE_REF_ACTION_INTERFACE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_RENAME_REFERENCE, g_param_spec_object ("reference", "reference", "reference", GITG_TYPE_REF, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_RENAME_ID, g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_RENAME_DISPLAY_NAME, g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_RENAME_DESCRIPTION, g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_RENAME_ENABLED, g_param_spec_boolean ("enabled", "enabled", "enabled", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 872 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_gitg_ext_ui_element_interface_init (GitgExtUIElementIface * iface) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	gitg_ref_action_rename_gitg_ext_ui_element_parent_iface = g_type_interface_peek_parent (iface);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->activate = (void (*)(GitgExtUIElement*)) gitg_ref_action_rename_real_activate;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->get_application = gitg_ref_action_rename_real_get_application;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->set_application = gitg_ref_action_rename_real_set_application;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->get_id = gitg_ref_action_rename_real_get_id;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->get_display_name = gitg_ref_action_rename_real_get_display_name;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->get_description = gitg_ref_action_rename_real_get_description;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->get_enabled = gitg_ref_action_rename_real_get_enabled;
#line 893 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_gitg_ext_action_interface_init (GitgExtActionIface * iface) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	gitg_ref_action_rename_gitg_ext_action_parent_iface = g_type_interface_peek_parent (iface);
#line 900 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_gitg_ext_ref_action_interface_init (GitgExtRefActionIface * iface) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	gitg_ref_action_rename_gitg_ext_ref_action_parent_iface = g_type_interface_peek_parent (iface);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->get_action_interface = gitg_ref_action_rename_real_get_action_interface;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->set_action_interface = gitg_ref_action_rename_real_set_action_interface;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->get_reference = gitg_ref_action_rename_real_get_reference;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	iface->set_reference = gitg_ref_action_rename_real_set_reference;
#line 915 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_instance_init (GitgRefActionRename * self) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self->priv = GITG_REF_ACTION_RENAME_GET_PRIVATE (self);
#line 922 "gitg-ref-action-rename.c"
}


static void gitg_ref_action_rename_finalize (GObject* obj) {
	GitgRefActionRename * self;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_REF_ACTION_RENAME, GitgRefActionRename);
#line 28 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_object_unref0 (self->priv->_application);
#line 29 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_object_unref0 (self->priv->_action_interface);
#line 30 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	_g_object_unref0 (self->priv->_reference);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	G_OBJECT_CLASS (gitg_ref_action_rename_parent_class)->finalize (obj);
#line 938 "gitg-ref-action-rename.c"
}


GType gitg_ref_action_rename_get_type (void) {
	static volatile gsize gitg_ref_action_rename_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_ref_action_rename_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgRefActionRenameClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_ref_action_rename_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgRefActionRename), 0, (GInstanceInitFunc) gitg_ref_action_rename_instance_init, NULL };
		static const GInterfaceInfo gitg_ext_ui_element_info = { (GInterfaceInitFunc) gitg_ref_action_rename_gitg_ext_ui_element_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo gitg_ext_action_info = { (GInterfaceInitFunc) gitg_ref_action_rename_gitg_ext_action_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo gitg_ext_ref_action_info = { (GInterfaceInitFunc) gitg_ref_action_rename_gitg_ext_ref_action_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gitg_ref_action_rename_type_id;
		gitg_ref_action_rename_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgRefActionRename", &g_define_type_info, 0);
		g_type_add_interface_static (gitg_ref_action_rename_type_id, GITG_EXT_TYPE_UI_ELEMENT, &gitg_ext_ui_element_info);
		g_type_add_interface_static (gitg_ref_action_rename_type_id, GITG_EXT_TYPE_ACTION, &gitg_ext_action_info);
		g_type_add_interface_static (gitg_ref_action_rename_type_id, GITG_EXT_TYPE_REF_ACTION, &gitg_ext_ref_action_info);
		g_once_init_leave (&gitg_ref_action_rename_type_id__volatile, gitg_ref_action_rename_type_id);
	}
	return gitg_ref_action_rename_type_id__volatile;
}


static void _vala_gitg_ref_action_rename_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GitgRefActionRename * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_REF_ACTION_RENAME, GitgRefActionRename);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	switch (property_id) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_APPLICATION:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		g_value_take_object (value, gitg_ext_ui_element_get_application ((GitgExtUIElement*) self));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_ACTION_INTERFACE:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		g_value_set_object (value, gitg_ext_ref_action_get_action_interface ((GitgExtRefAction*) self));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_REFERENCE:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		g_value_set_object (value, gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_ID:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		g_value_take_string (value, gitg_ext_ui_element_get_id ((GitgExtUIElement*) self));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_DISPLAY_NAME:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		g_value_take_string (value, gitg_ext_ui_element_get_display_name ((GitgExtUIElement*) self));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_DESCRIPTION:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		g_value_take_string (value, gitg_ext_ui_element_get_description ((GitgExtUIElement*) self));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_ENABLED:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		g_value_set_boolean (value, gitg_ext_ui_element_get_enabled ((GitgExtUIElement*) self));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 1007 "gitg-ref-action-rename.c"
		default:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 1013 "gitg-ref-action-rename.c"
	}
}


static void _vala_gitg_ref_action_rename_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GitgRefActionRename * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_REF_ACTION_RENAME, GitgRefActionRename);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
	switch (property_id) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_APPLICATION:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		gitg_ext_ui_element_set_application ((GitgExtUIElement*) self, g_value_get_object (value));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_ACTION_INTERFACE:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		gitg_ext_ref_action_set_action_interface ((GitgExtRefAction*) self, g_value_get_object (value));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		case GITG_REF_ACTION_RENAME_REFERENCE:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		gitg_ext_ref_action_set_reference ((GitgExtRefAction*) self, g_value_get_object (value));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 1041 "gitg-ref-action-rename.c"
		default:
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-ref-action-rename.vala"
		break;
#line 1047 "gitg-ref-action-rename.c"
	}
}



